Imports the metadata of a relational database schema, i.e. schemas, tables and columns.
NOTE The JDBC driver must be available on the jQAssistant classpath, e.g. as dependency of the Maven plugin or copied to the plugins/ folder of the distribution.
The connection information may be specified as URI using scope rdbms:connection
, e.g. on the command line
jqassistant.sh scan -u rdbms:connection::jdbc:oracle:thin:username/password@host:1521:sid
The connection properties can also be read from property files having
a file name with prefix jqassistant.plugin.rdbms
, e.g.
jqassistant.plugin.rdbms_test.properties
. Each of them must contain at
least the properties driver
, url
, user
and password
, e.g.
## Required configuration properties
driver=org.hsqldb.jdbc.JDBCDriver
url=jdbc:hsqldb:file:target/myDatabase
user=SA
password=
## Optional properties which are passed to Schema Crawler (http://schemacrawler.sourceforge.net/), they affect the level of queried information.
## The name of the database specific driver provided by schema crawler, supported values are "sybaseiq", "sqlserver", "sqlite", "postgresql", "oracle", "mysql", "hsqldb", "derby", "db2"
# bundled_driver=mysql
## It may be necessary to use another info level for performance or compatibility reasons, e.g. if a database does not support retrieving metadata for stored
## procedures you might try to set "retrieve_routines=false". Allowed values are "standard", "minimum", "maximum" or "detailed"
# info_level=standard
## Activation/deactivation of single options on the selected info level
# retrieve_additional_column_attributes=true
# retrieve_additional_database_info=true
# retrieve_additional_jdbc_driver_info=true
# retrieve_additional_table_attributes=true
# retrieve_foreign_keys=true
# retrieve_indices=true
# retrieve_index_information=true
# retrieve_routines=true
# retrieve_routine_columns=true
# retrieve_routine_information=true
# retrieve_schema_crawler_info=true
# retrieve_sequence_information=true
# retrieve_tables=true
# retrieve_table_columns=true
# retrieve_trigger_information=true
# retrieve_view_information=true
Represents a file containing the connection properties described above which have been used to read the schema metadata. It provides the same properties and relations as [:File:Properties].
:Rdbms:Connection:Properties
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
DESCRIBES_SCHEMA |
Nodes labeled with |
1 |
References the schema |
Describes a database schema.
:Rdbms:Schema
Name | Description |
---|---|
name |
The name of the schema. |
:Rdbms:Schema
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
HAS_TABLE |
Nodes labeled with |
0..n |
References the tables in the schema |
HAS_VIEW |
Nodes labeled with |
0..n |
References the views in the schema |
HAS_SEQUENCE |
Nodes labeled with |
0..n |
References the sequences in the schema |
Describes a database table.
:Rdbms:Table
Name | Description |
---|---|
name |
The name of the table. |
:Rdbms:Table
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
HAS_COLUMN |
Nodes labeled with `:Rdbms:Column |
0..n |
References the columns of the table |
HAS_PRIMARY_KEY |
Nodes labeled with |
0..1 |
References the primary key of the table |
HAS_INDEX |
Nodes labeled with |
0..* |
References indices defined for the table |
Describes a database view.
.Rdbms:View
Name | Description |
---|---|
name |
The name of the view. |
:Rdbms:View
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
HAS_COLUMN |
Nodes labeled with `:Rdbms:Column |
0..n |
References the columns of the view |
Describes a column of a table.
:Rdbms:Column
Name | Description |
---|---|
name |
The name of the column |
autoIncremented |
Indicates an auto incremented value |
generated |
Indicates a generated value |
defaultValue |
The default value |
size |
The size of the column |
decimalDigits |
The number of digits for decimal types |
partOfIndex |
Indicates that the column is part of an index |
partOfPrimaryKey |
Indicates that the column is part of the primary key |
partOfForeignKey |
Indicates that the column is part of a foreign key |
:Rdbms:Column
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
OF_COLUMN_TYPE |
Nodes labeled with |
1 |
References the column type |
Describes a column data type, e.g. VARCHAR
.
:Rdbms:ColumnType
Name | Description |
---|---|
databaseType |
The database specific name of the type |
autoIncrementable |
Indicates that values of this type can auto incremented |
precision |
The precision |
minimumScale |
The minimum scale |
maximumScale |
The maximum scale |
fixedPrecisionScale |
The fixed precision scale |
numericPrecisionRadix |
The numeric precision radix |
caseSensitive |
Indicates that the type is case sensitive |
unsigned |
Indicates that the type is unsigned |
userDefined |
Indicates that the type is user defined |
Describes a primary key of a table.
:Rdbms:PrimaryKey
Name | Description |
---|---|
name |
The name of the primary key. |
:Rdbms:PrimaryKey
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
Nodes labeled with |
1 |
References a primary key column |
Describes the properties of a column in a primary key.
ON_PRIMARY_KEY_COLUMN
Name | Description |
---|---|
indexOrdinalPosition |
The ordinal position of the column in the primary key. |
sortSequence |
The sort sequence, i.e. "ascending" or "descending". |
Describes an index defined for table.
:Rdbms:Index
Name | Description |
---|---|
name |
The name of the index. |
unique |
|
cardinality |
The cardinality of the index. |
indexType |
The index type. |
pages |
The pages. |
:Rdbms:Index
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
Nodes labeled with |
1 |
References an indexed column |
Describes the properties of a column used by an index.
ON_INDEX_COLUMN
Name | Description |
---|---|
indexOrdinalPosition |
The ordinal position of the column in the primary key. |
sortSequence |
The sort sequence, i.e. |
Describes a foreign key.
Name | Description |
---|---|
name |
The name of the foreign key |
deferrability |
The deferrability |
deleteRule |
The delete rule, e.g. |
updateRule |
The update rule |
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
HAS_FOREIGN_KEY_REFERENCE |
Nodes labeled with |
1..n |
The foreign key references |
Describes a foreign key reference, i.e. a pair consisting of a foreign key referencing a primary key.
:Rdbms:ForeignKeyReference
Name | Target label(s) | Cardinality | Description |
---|---|---|---|
FROM_FOREIGN_KEY_COLUMN |
Nodes labeled with `:Rdbms:Column |
1 |
The foreign key column |
TO_PRIMARY_KEY_COLUMN |
Nodes labeled with `:Rdbms:Column |
1 |
The primary key column |
Describes a database sequence.
:Rdbms:Sequence
Name | Description |
---|---|
name |
The name of the sequence |
minimumValue |
The minimum value |
maximumValue |
The maximum value |
increment |
The increment |
cycle |
Indicates that the sequence restarts at the minimumValue if the the maximumValue has been reached. |