RelationalDatabase
RelationalDatabase
A RelationalDatabase datasource is a logical representation of the structure of a database.

Description
RelationalDatabase datasources (AKA Relational Datasources) define a logical set of tables and views with columns and indexes as well as database objects such as stored procedures. The reason we say "logical" is because this is done without regard to the eventual target database type e.g. MSSQL, Oracle, DB2, ... At deploy-time we bind the logical database representation to the physical database.
The datasource is used by various tools (Data Load Tool, Data Schema Tool, ...) and the Model Server to create, maintain, and use a physical database.
Classes use their persistence mapping to connect the business model to tables and columns in the datasource (and subsequently the database) for creating, reading, writing, and deleting instances.
Relational Datasources may be modularly enhanced and augmented by using RelationalDatabaseAspects and RelationalDatabaseAugments.
A pattern used to support versioning of databases and upgrades is to add a special Version table to the datasource to keep track of it's state. The structure of a Version table can be seen in the DefaultRelationalDatabase.datasource file. See also the versionTable property.
Properties
alias : aliasData source alias for JNDI lookup.
Valid values based on“string”. [\p{L}_][\p{L}\p{N}\-_]* aspects : aspectListList of names of aspect datasources to include in or exclude from (if prefixed with !) this datasource. If an aspect datasource is included in this datasource, the aspect datasources's table aspects are appended to this datasources's items.
- See
- RelationalDatabaseAspect
Valid values based on“token”. (!?:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*\s+)*(!?:?[\p{L}_][\p{L}\p{N}_]*(:[\p{L}_][\p{L}\p{N}_]*)*)? Each element in the list must begin with a letter or underscore. Elements are space delimited. To exclude a token, prefix it with the character "!".
create : booleanTrue if instance creation is supported.
delete : booleanTrue if instance deletion is supported.
description : stringData source description.
execute : booleanTrue if instance execution is supported.
indexfill : unsignedByteDefault index page fill factor percent, 1-100 (0 or empty for the database default).
indexspace : dbObjNameDefault index tablespace or file group name. Use "default" for the database default.
Valid values based on“string”. [A-Za-z][_A-Za-z\d]* join : booleanNot supported.
Currently, joins are not supported across DataSources. When this feature is implemented, this value will be true if schema objects from this data source can be joined to objects from another data source.longspace : dbObjNameDefault long column tablespace or file group name. Use "default" for the database default.
Valid values based on“string”. [A-Za-z][_A-Za-z\d]* portable : booleanTrue if schema object portability naming restrictions are enforced.
This limits the properties to the lowest common denominator of supported database types.- Example
For a database schema to be portable to any supported database, the column name
lengths can't be longer than the shortest length supported by any of the database
types.
prefixPrefix automatically added to all managed tables without owners and aliases.
This is useful in avoiding naming conflicts between modules.- Example
The DefaultRelationalDatabase prefix is "NJ" so all persistence operations to do with
its tables are prefixed with "NJ". Account -> NJAccount
Valid values based on“string”. [A-Za-z][_A-Za-z\d]*(\.([A-Za-z][_A-Za-z\d]*)?)? read : booleanTrue if instance retrieval is supported.
readLimit : nonNegativeIntThe maximum number of instances that can be returned by read() (0 for unlimited).
Valid values based on“int”. 0 (minInclusive) role : dbObjNameRole that is granted access to the schema objects.
Valid values based on“string”. [A-Za-z][_A-Za-z\d]* tablespace : dbObjNameDefault tablespace or file group name. Use "default" for the database default.
Valid values based on“string”. [A-Za-z][_A-Za-z\d]* update : booleanTrue if instance updating is supported.
versionTable : tableNameTable name for schema version checking with columns
(namespace nvarchar(128) primary key, version nvarchar(128), step int, upgradable bit, test bit, loaded bit).Valid values based on“string”. [A-Za-z][_A-Za-z\d]*(\.[A-Za-z][_A-Za-z\d]*)?
Content
Sequence of:
t_RelationalDatabase_SQLHook [0..1]
Sequence of:
t_BaseRelationalDatasource_Tables [0..1] - The set of tables in the logical database schema.
t_BaseRelationalDatasource_Objects [0..1] - The set of stored procedure objects in the logical database schema.
Sequence of:
t_DataSource_Properties [0..1]
See DataSource RelationalDatabaseAspect RelationalDatabaseAugment
t_BaseRelationalDatasource_Tables
The set of tables in the logical database schema.t_BaseRelationalDatasource_Objects
The set of stored procedure objects in the logical database schema.
Parent topic: references