A physical database file can contain more than one logical database. Each logical database is a complete, independent group of database objects, such as tables, indexes, procedures, triggers, and so on. Each logical database is a catalog. Note that a solidDB catalog is not just limited to indexes (as in the traditional sense of a library card catalog, which serves to locate an item without containing the full contents of the item).
Catalogs allow you to logically partition databases so that you can complete the following tasks:
▪ organize your data to meet the needs of your business, users, and, applications,
▪ specify multiple master or replica databases (by using logical databases) for synchronization within one physical database server. For more details on implementing synchronization in multi-master environments, see Multi-master synchronization model.
When creating a new database or converting an old database to a new format, you are prompted for a default catalog name.
The following table describes the statements used to manage catalogs.
Note If the autocommit mode is set to OFF, you must commit your work by using the following SQL statement:
COMMIT WORK;
If the autocommit mode is set to ON, the transactions are committed automatically.
Task
Example
Reference
Create a catalog and set the catalog context.
The following example creates a catalog named C and assumes the userid is SMITH
CREATE CATALOG C; SET CATALOG C; CREATE TABLE T (i INTEGER); SELECT * FROM T; --The name T is resolved to C.SMITH.T