Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
Using Caché Objects - InterSystems Documentation
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
13<br />
<strong>Objects</strong> and SQL<br />
A key aspect of <strong>Caché</strong> functionality is that it makes data visible both as objects and relational<br />
tables: data that composes a set of class instances is projected as one or more relational tables.<br />
In its relational form, this data is available for use with <strong>Caché</strong> SQL, which provides highperformance<br />
relational access to the <strong>Caché</strong> data engine.<br />
This chapter describes how objects are projected for SQL access; it assumes knowledge and<br />
experience with SQL. For more information on classes and their definition, see the chapter<br />
Classes.<br />
The interconnection of <strong>Caché</strong> SQL and <strong>Caché</strong> objects allows your application to refer to a<br />
class instantiation either as a particular object or as a part of a relational table. Generally, a<br />
class definition's relational projection is a table: instantiations are rows within the table and<br />
properties are columns within the table.<br />
Note:<br />
Certain features of a <strong>Caché</strong> class definition may not be accessible as both object and<br />
relational features, due to the nature of the object and relational models (rather than<br />
the limitations of <strong>Caché</strong> or any other tools).<br />
13.1 Inheritance and SQL<br />
Since inheritance is not part of the relational model, the Class Compiler projects a “flattened”<br />
representation of the class as a relational table. The projected table contains all the appropriate<br />
fields for the class, including those that are inherited. Hence, the projection of a subclass is<br />
a table composed of:<br />
<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 113