Type to start searching...

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 : alias

Data source alias for JNDI lookup.

Valid values based on“string”.
[\p{L}_][\p{L}\p{N}\-_]*
aspects : aspectList

List 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 : boolean

True if instance creation is supported.

delete : boolean

True if instance deletion is supported.

description : string

Data source description.

execute : boolean

True if instance execution is supported.

indexfill : unsignedByte

Default index page fill factor percent, 1-100 (0 or empty for the database default).

indexspace : dbObjName

Default 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 : boolean

Not 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 : dbObjName

Default 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 : boolean

True 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.

prefix

Prefix 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 : boolean

True if instance retrieval is supported.

readLimit : nonNegativeInt

The maximum number of instances that can be returned by read() (0 for unlimited).

Valid values based on“int”.
0 (minInclusive)
role : dbObjName

Role that is granted access to the schema objects.

Valid values based on“string”.
[A-Za-z][_A-Za-z\d]*
tablespace : dbObjName

Default tablespace or file group name. Use "default" for the database default.

Valid values based on“string”.
[A-Za-z][_A-Za-z\d]*
update : boolean

True if instance updating is supported.

versionTable : tableName

Table 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:

  • Sequence of:

    • Tables [0..1] - The set of tables in the logical database schema.

    • Objects [0..1] - The set of stored procedure objects in the logical database schema.

  • Sequence of:

See
DataSource RelationalDatabaseAspect RelationalDatabaseAugment