ComponentOne FlexPivot for WinForms
Base Tables
C1DataEngine Overview > Using C1DataEngine > Base Tables

Base tables are simply data imported into DataEngine from external sources using connectors. Base tables act as input data for queries. Since a query or query result is also a table, you can distinguish between the two by the fact that base tables are not produced by queries. Every base table has a name (it must be unique in the workspace) and a collection of columns. When a workspace is initialized in code, some base tables can already exist (their data stored in the workspace's folder in memory-mapped files) and some can be added after workspace initialization.

A query is based on a table or on multiple tables if it's a join query. We will consider queries based on a single table first. A simple, non-join query is based on a base table or another query. Let us start with a simple case of a query over a base table first. To define query, you need to get hold of a base table first. This can be done using the syntax below.

Syntax

Dim od As Object = workspace.table("OrderDetails")
dynamic od = workspace.table("OrderDetails");

This is an object representing a base table with the name "OrderDetails". Note that such table must already exist (i.e. must have been created earlier by importing data via a connector). This object is dynamic to make it easy (and type-safe) for you to reference table columns. For example, od.ProductID is the ProductID column, and od.Discount is the Discount column of the OrderDetails table.