skip to main content
Schema definition and management : Schema Database configuration : Schema Database management through direct schema tables manipulation : Adding your tables
 

Adding your tables

Add one entry for each table in the OA_TABLES table. For each table entry, you will add the associated columns in the OA_COLUMNS table. You will also set up the OA_STATISTICS and OA_FKEYS tables to indicate any indexes and foreign keys.
If you will be repeating these steps as you incrementally define your Schema Database, make sure to start with a clean Schema Database. This is achieved by deleting all information you added for your IP. You cannot delete all the contents of these tables, because they are required by the OpenAccess SDK SQL engine to access your IP.
The best way to avoid creating duplicate records when using the INSERT command is to perform a DELETE query for the specified entry before adding it. For example, before inserting an entry for the example table CURVALUE, delete all entries from OA_TABLES where the TABLE_NAME=CURVALUE:
ISQL> DELETE FROM OA_TABLES WHERE TABLE_NAME LIKE 'CURVALUE';
Note that the LIKE operator is used instead of the = operator to make the comparison case-insensitive.
Table 29 shows the queries for inserting rows into each of the Schema Database tables. Use them as templates to create a file to contain the queries to set up the Schema Database for your IP. Always update the Schema Database from a script file instead of interactively. This allows you to maintain the source for the schema in a format that will continue to be supported in future releases of OpenAccess SDK.