|
|
CREATE DATABANK
Usage
Embedded/Interactive/ODBC/JDBC.
Description
A new databank is created, i.e. a physical file is created in the host file system and formatted for use as a Mimer SQL databank. The initial file size is the number of Mimer SQL pages (2K in size) specified by the integer parameter. A value of 1000 Mimer SQL pages is assumed if an initial file size is not specified.
The filename-string specifies the name of the new databank file in the host file system and this is stored in the data dictionary as the location of the databank file. If a file name is not specified, it will be the same as databank-name (and the databank will be created in the database home directory).
The databank is created with the transaction and logging options as specified:
- LOG
All operations on the databank are performed under transaction control. All transactions are logged, i.e. it will be possible to restore the databank from a backup.
- TRANS
All operations on the databank are performed under transaction control. No transactions are logged. (This databank option is assumed if one is not explicitly specified.)
- NULL
All operations on the databank are performed without transaction control (even if they are requested within a transaction) and they are not logged.
Set operations (DELETE, UPDATE and INSERT on several rows) which are interrupted, will not be rolled back. All secondary indexes created in the databank are flagged as not consistent. A secondary index that is flagged as not consistent will not offer optimal performance when used in a query, see UPDATE STATISTICS for information on how to ensure that secondary indexes are consistent.
Restrictions
CREATE DATABANK requires that the current ident has DATABANK privilege.
The databank name must not be the same as that of an existing databank or shadow.
The databank must be created with either the TRANS or LOG option if any of the following are true:
- the databank is to be shadowed
- the databank will be used to store tables defined with foreign or unique keys
- the databank will be used to store tables that are referenced in a foreign key context
- the databank will be used to store tables holding UNIQUE indexes
- the databank will be used to store tables on which triggers have been created
- the databank contains tables that will accept updates in their primary key column(s)
Notes
The creator of the databank is granted TABLE privilege on the new databank, with the WITH GRANT OPTION.
The value of filename-string must always be enclosed in string delimiters. The maximum length of the filename string is 256 characters.
Refer to Specifying the Location of User Databanks for details concerning the specification of path name components in filename-string.
Example
CREATE DATABANK mimer_store OF 1500 PAGES IN 'mimer_store.dbf' WITH LOG OPTION;Standard Compliance
Standard
Compliance
Comments
X/Open-95
SQL-92 MIMER EXTENSION The CREATE DATABANK statement is a Mimer SQL extension.
|
Upright Database Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 dbtechnology@upright.se |
|
|