|
Sentence type tables (ST-tables) are (optional) duplications of sentences in the
SQL-type knowledge base's chain
tables. They only form an indirect part of the knowledge base.
Sentences in chain tables are stored as term-strings (and very difficult to read (browse) or make use of by other systems, sentences in ST-tables are in NL-format and unpacked with the columns corresponding to the sentence type's data element types. ST-tables can in this way serve as interfaces to other systems, or be used by the KE for data browsing or as masters for data entry or update. Each ST-table includes all the sentences of that type (one record per sentence). An ST-table has one column per data element type in the sentence type in the same sequence as the sentence type. Column- and table-names in ST-tables created by Pro/3 is based on ST- and data element NL-names and the preferences set in Directories, Files and SQL-preferences-window. ST-tables can optionally be located in an SQL-database different from the database containing the KB (which in fact is recommended). An import-table acts as a master table for the sentence type. The sentences in the ST-table is copied into the knowledge base (i.e. into the relevant chain table), each time sentence derivation which involves the sentence type is carried out. (This can however be suppressed in the Sentence Derivation-window). The import will normally replace all sentences of the sentence type in the KB unless the incremental import option is used. The incremental import option will not touch existing sentences in the KB, it will only add sentences which are new (i.e. not found in the KB). Note!
An export-table works in the reverse way, i.e. the ST-table is re-created automatically each time a sentence type is derived by Pro/3. Pro/3 will generate column names from the data element type names in the KB. The sequence of columns will be the same as the sequence of data element types in the sentence type. Ad-hoc tables are not defined in the KB as such - they are simply tables used (import) or created (export) ad-hoc by the KE, and the import or export is performed once. ST-tables are defined via the SQL-table is in the KB-sentence type. The SQL Sentence Type Table-window can be used to maintain these definitions in an easy way.
Note in the above example, that table names can be prefixed with an SQL database name (e.g. the ratings-table is located in the bikebase database). By default, ST-tables are located according to the default ST-table database (refer to the Directories, Files and SQL Preferences-window. |