In the solidDB® server, you use catalogs and schemas to organize your data. The use of schemas in the solidDB® server conforms to the SQL standard, but the use of catalogs is an extension to the SQL standard. In general, a catalog can be thought of as a logical database. A schema typically corresponds to a user.
Catalogs and schemas help you to group database objects (tables, sequences, and so on) in a hierarchical way. This allows you to put related items into the same group. For example, all the tables related to the accounting system might be in one group (for example, a catalog), while all the tables related to the human resources system might be in another group. You can also group database objects by user. For example, all of the tables used by Jane Smith might be in a single schema.
Catalogs are the highest (broadest) level of the hierarchy. Schema names are the mid-level. Specific database objects, such as tables, are the lowest (narrowest) level of the hierarchy. Thus, a single catalog may contain multiple schemas, and each of those schemas may contain multiple tables.
Object names must be unique within a group, but do not have to be unique across groups. Thus, for example, Jane Smith’s schema and Robin Trower’s schema might each have a table named “bills”. These two tables have nothing to do with each other. They may have different structures and different data, even though they have the same name. Similarly, the catalog “accounting_catalog” and the catalog “human_resources_catalog” might each have a schema named “david_jones”. Those schemas are unrelated to each other, even though they have the same name.
If you want to specify a particular table and that table name is not unique in the database, you can identify it by specifying the catalog, schema, and table name, for example:
accounting_catalog.david_jones.bills
If you do not specify the complete name (that is, if you omit the schema, or the schema and the catalog), the server uses the current/default catalog and schema name to determine which table to use.