For some time now, the Platform has allowed the creation of ontologies associated with tables already existing in relational databases, which is very useful when you have data that is already loaded in external databases and you simply want to use those data in the Platform because. as you know, data within the Platform always have to be treated as ontologies.
But, from Release 2.0.0 (fireball), we are adding more possibilities to this functionality, allowing you to create new tables on an external relational database at the same time that you create the corresponding Ontology. This simplifies your work a lot, since it is not necessary to enter the database to create the table, then create its Ontology, because you can do everything in only one step.
To do this, use the menu option that allows you to create this type of ontology:
In the form for creating the ontology, you will see that a new option has been added:
Activating this check will allow you to add fields to the Ontology and to relate the fields to the necessary constraints.
In the case of the fields we’ll see a form like this:
With this form, you can add the fields to your Ontology, which will correspond to the columns of the table in the database.
In the case of the constraints, we have the following form:
These are the properties assigned to a column or to a column set, in a table that prevent certain types of inconsistent data values from being added.
Once the fields of the Ontology and the constraints are defined, the system will automatically create the SQL instance that will in turn create your table:
Finally, create the ontology, and then a table associated to that ontology will be automatically created in the selected relational database.
Remember that this is a very simple example of how the new functionality to create Ontologies on relational databases of the Platform works, so if you are interested in knowing more about this tool, we recommend you our help guide.
Any doubt or problem you have? Leave us a comment and we will analyze it as soon as you see us.