If you do not specify the schema, Caché supplies the schema as follows:įor DDL operations, Caché uses the system-wide default schema name. An unqualified name does not specify the schema: name. A qualified name specifies the schema: schema.name. You can specify an SQL name as qualified or unqualified. A schema (and its corresponding package) is automatically created when the first item is assigned to it and automatically deleted when the last item is deleted from it. A schema name must be unique within its namespace. Schemas are defined within a specific namespace. Schema-to-package mapping is further described in SQL to Class Name Transformations. Commonly a schema has the same name as its corresponding package, but these names may differ because of different schema naming conventions or because different names have been deliberately specified. SQL schemas correspond to persistent class packages. An application can specify tables in multiple schemas. The use of schemas helps prevent naming collisions at the table level, because a table, view, or stored procedure name must only be unique within its schema. SQL schemas provides a means of grouping sets of related tables, views, stored procedures, and cached queries. See the chapters “ Defining Foreign Keys” and “ Defining Triggers.” Copy link to this section Schemas In order to enforce referential integrity you can define foreign keys and triggers on tables. See the chapter “ Defining and Building Indices.” in the Caché SQL Optimization Guide.
In order to make queries against tables more efficient, you can define indices on tables.
#Sql prompt internal time format how to
To find out more on how to define views, see the chapter “ Defining Views.” To find out more on how to define tables, see the chapter “ Defining Tables.” There are two basic types of tables: base tables (which contain data and are usually referred to simply as tables) and views (which present a logical view based on one or more tables). The following terms are roughly equivalent: Data Termsįor further details, refer to “ Introduction to the Default SQL Projection” in the “Introduction to Persistent Objects” chapter of Using Caché Objects.
A table may contain zero or more rows of data values. Each table is defined to contain a number of columns.
Within Caché SQL, data is presented within tables. This chapter discusses the following topics: It assumes prior knowledge of SQL and is not designed to serve as an introduction to SQL concepts or syntax. This chapter provides an overview of the features of Caché SQL, especially those that are not covered by the SQL standard or are related to the Caché Unified Data Architecture.