Support > Repository > Model definition > Specify sub database
ja | en

Multiple databases can be used from one Wagby application. R7.8

In WagbyIn model unitsYou can specify which database to use.The first one is called the "main database", and the second and later are called the "sub database".

The purpose of the sub database is to refer the master data of the existing system directly to the Wagby application.

The difference between the two is as follows.

Main database (standard) Sub database
Number that can be set You need one. It is position as option.Up to three sub databases can be specified.
function It can read and write.Writing also supports transaction control. Read only.

Restrictions on using sub databases

Since the model that uses the sub database is read only, there are the following restrictions.

  • You can not create a table.(Assuming reuse of existing tables)
  • Wagby's cache is invalid.
  • Full text search function can not be used.
  • Workflow can not be used.
  • Transactions can not be used.Includes parent-child model simultaneous update.
  • When parent-child relationships are different databases, they can not be updated by recalculation.(Only display is possible).
  • Main model and sub model are not available.(You do not specify separate databases for main model and submodel.)
  • Update buttons such as registration, update, and deletion are invalid.
  • It is not possible to specify a system model (such as juser) as a sub database.
  • The built-in database (HSQLDB) can not be used.
  • When the reference destination model exists in the sub database, "Save the reference linkage item to the reference modelFunction can not be used.Because this involves updating.
  • When the referenced model exists in the sub-database, it is not possible to designate the reference interlock item (without DB saving) as the retrieval item.To become a search across databases.
  • Sub databaseA table can not contain a schema.
When setting the sub database, the registration and update screen and button are hidden.After that, even if canceling the setting of the sub database (returning to the main database), the hidden button setting remains unchanged.Set the sub databasetryIn case it is recommended to back up the repository in advance.

Database setting

From "Environment> Database", specify the main database and sub database.

Figure 1 Main database setting (standard)

Up to 3 sub-databases can be specified.

Fig. 2 Sub database setting.

Model setting

For each model you can specify which database to use.Only the set sub-database will be prepared as a choice.

When blank (standard), use the main database.

Figure 3 Specifying the database