25.01.2015 Views

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The Object-SQL Projection<br />

13.2 The Object-SQL Projection<br />

This section describes the manner in which the various elements of a class are projected from<br />

an object-based form to one that is SQL-based.<br />

Fundamentally, a persistent <strong>Caché</strong> class is projected to a unique SQL table, where each of<br />

its instances is projected as a row within that table. Other items are projected as listed below.<br />

The Object-SQL Projection<br />

From (Object Concept)...<br />

Package<br />

Class<br />

OID<br />

Data type property<br />

Reference property<br />

Embedded object<br />

List property<br />

Array property<br />

Stream property<br />

Index<br />

Method<br />

To (Relational Concept)...<br />

Schema<br />

Table<br />

Identity field<br />

Field<br />

Reference field<br />

Set of Fields<br />

List field<br />

Child table<br />

BLOB<br />

Index<br />

Stored procedure (class methods only)<br />

See the appropriate section below for more information on each individual topic.<br />

You can also include SQL triggers in your classes; for information on their projection, see<br />

the section on SQL Triggers below.<br />

13.2.1 Identity (OIDs Projected to SQL)<br />

Each object that inherits from %Persistent is uniquely identified by its OID (object identifier);<br />

in the projection, each instance is uniquely identified by the value of its entry in the generated<br />

identity (ID) column in the class' table. The value of the instance's entry in the identity column<br />

is the same as that of the ID portion of its OID.<br />

<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 115

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!