Introduction to the Default SQL Projection
Introduction to the Default SQL Projection
For any persistent class, the compiler generates an SQL table definition, so that the stored data can be accessed via SQL in addition to via the object interface.
The table contains one record for each saved object, and the table can be queried via InterSystems SQL. The following shows the results of a query of the Sample.Person table:
The following table summarizes the default projection:
From (Object Concept) ... | To (Relational Concept) ... |
---|---|
Package | Schema |
Class | Table |
OID | Identity field |
Data type property | Field |
Reference property | Reference field |
Embedded object | Set of fields |
List property | List field |
Array property | Child table |
Stream property | BLOB |
Index | Index |
Class method | Stored procedure |
Other topics provide details and describe any changes you can make:
-
For information on the table name and the name of the schema to which it belongs, see Defining Persistent Classes.
The same topic also has information on how you can control the projection of subclasses.
-
For information on the projection of literal properties, see Defining and Using Literal Properties.
-
For information on the projection of collection properties, see Storage and SQL Projection of Collection Properties.
-
For information on the projection of stream properties, see Working with Streams.
-
For information on the projection of object-valued properties, see Defining and Using Object-Valued Properties.
-
For information on the projection of relationships, see Defining and Using Relationships.