Step 1: How Datasources are transformed into a Corticon Vocabulary
- Last Updated: January 6, 2023
- 2 minute read
- Corticon
- Version 7.2
- Documentation
The relationships between relational data sources and Corticon Vocabulary elements are:
| Relational database | Corticon Vocabulary |
|---|---|
| Schema | Vocabulary |
| Table | Vocabulary: Entity |
| Table Column or Field | Vocabulary: Attribute |
| Relationship between Tables | Vocabulary: Association |
After you connect to a data source and import its metadata, you can constrain the tables and attributes that will be evaluated. Then, the internal algorithm makes its best effort to populate the Vocabulary.
Assuming that you are creating a new Vocabulary, these are the steps it takes:
- For each selected Table in the Datasource, create a new Entity in the Vocabulary.
- For each Column in the Table:
- Create a new Attribute in the Entity.
- Determine the best Corticon data type for the Attribute by referring to the column's data type information.
- If the column is part of the Table's primary key, then mark the Attribute as part of the Entity identity.
- After all Tables and Columns are processed, Associations are created for each foreign key for each table (if the source and target tables are both mapped in the Datasource).
The creation process tries to be complete and accurate, but it has limited abilities:
- Columns that are referenced by foreign keys are not added as Attributes.
- Tables that do not have any valid columns are not created (such as, Association middle tables or Sequence tables).
- The data type for an attribute is evaluated in this order: Datetime, Time, Date, Decimal, Integer, String, and Boolean. Some Corticon data types might not get picked for attributes because of an overload of possible mappings (such as, Date and Time could always be created as Datetime). Note that these decisions are derived from data when data is in a REST source that has no schema.
Step 2: The Vocabulary generation process for RDBMS sources shows the procedure for populating a new Vocabulary.