Database

The Database category is located in the Root > Script > Objects category, and can contain the following items that define how databases are modeled for your DBMS.

Item

Description

[Common items]

The following common object items may be defined for databases:

  • AfterCreate, AfterDrop, AfterModify

  • BeforeCreate, BeforeDrop, BeforeModify

  • Create, Drop

  • Enable

  • ModifiableAttributes

  • Options, DefOptions

  • Permission

  • ReversedQueries, ReversedStatements

  • SqlAttrQuery, SqlListQuery, SqlOptsQuery, SqlPermQuery

For a description of each of these common items, see Common object items.

BeforeCreate Database

Controls the order in which databases, tablespaces, and storages are generated. The following settings are available:

  • Yes – [default] Create Tablespace and Create Storage statements are generated before the Create Database statement.

  • No - Create Tablespace and Create Storage statements are generated after the Create Database statement

CloseDatabase

Specifies the command for closing the database. If this parameter is empty, the Database/Close option on the Options tab of the Generate Database box is unavailable.

EnableMany Databases

Enables support for multiple databases in the same model.

OpenDatabase

Specifies the command for opening the database. If this parameter is empty, the Database/Open option on the Options tab of the Generate Database box is unavailable.

Example (ASE 15):

use %DATABASE%

The %DATABASE% variable is the code of the database associated with the generated model.