# DataEngine Fundamentals

A summary of fundamentals about DatEgine. This topic is essential for users who want to get started with using the C1DataEngine product.

## Content



Prior to learning how to use DataEngine library, it is important to have an idea about the following DataEngine components:

*   **Base Tables**: The data imported from external sources such as a C# class, database file, CSV file or JSON file is stored in DataEngine tables called the Base Tables, which act as input data for queries. Every base table has a name and collection of columns. The name should be unique in the workspace. Unlike query results, base tables are not produced by queries.
    
*   **Connectors**: The Data connectors are used to fill base tables with data. The DataEngine has two built-in connectors, one for getting data from databases and the other for getting data from any **IEnumerable** collection. For importing data from an arbitrary IEnumerable collection to a base table, the DataEngine’s [ObjectConnector](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.ObjectConnector-1.html) class is used and for importing data from a database to the base table, the DataEngine’s [DbConnector](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.DbConnector.html) class is used.
    
*   **Workspace**: A workspace is a repository created to store all the base tables, queries and query results of the DataEngine. The DataEngine library represents the workspace by the [Workspace](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.html) class. The [Init](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.Init.html) method of the **Workspace** class is used to create a new workspace folder or open an existing folder created during an earlier run. The base tables can exist prior to workspace initialization in code. In such a case, the data can be stored in the workspace's folder in memory-mapped files. Some base tables can also be added after workspace initialization. The **Workspace** class allows us to create queries based on single table or multiple tables using [query](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.query.html) and [join](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.join.html) methods. We can retrieve base table data or query result data using [GetTableData](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.GetTableData.html) and [GetQueryData](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.GetQueryData.html) methods of the Workspace class. For using base table in constructing queries, the [table](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.table.html) method of the Workspace class can be used. Further, the [TableExists](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.TableExists.html) and [QueryExists](/componentone/api/services/online-dataengine/dotnet-standard-api/C1.DataEngine/C1.DataEngine.Workspace.QueryExists.html) methods of the **Workspace** class can be used to check whether the specified base table/query exists in the workspace or not.
    
*   **Query**: A query is an operation that retrieves data from one or more base tables. The result of a query is also a table. If the query is based on multiple tables, then it is called a join query. You can also generate derived queries by feeding the results of one query as an input into another query. A query can be defined using the **query** method of the **Workspace** class.<br />