Models are designed to be loaded incrementally to maximize performance. A model consists of one global file, with a separate file for each entity. Entity descriptions are loaded in to an application as needed. Models have an .eomodeld file wrapper (which is actually a directory), and the individual entity files within the model are in ASCII format. If you want to view the ASCII files in a model, open the .eomodeld directory. This displays the individual entity, stored procedure, and fetch specification files in the model. The entity files have a .plist extension, indicating that the files' contents are in ASCII property list format. The stored procedure files have the extension .storedProcedure. The fetch specification files have the extension .fspec.You can view the individual files in a text editor.
The global file has the name index.eomodeld. It contains the connection dictionary, the adaptor name, and a list of all of the entities in the model.
Models describe the database-to-enterprise object mapping by using the modeling classes EOModel, EOEntity, EOAttribute, and EORelationship (EORelationships include additional information in the form of EOJoin objects).
The following table describes the database-to-object mapping provided in a model:
While the modeling classes correspond to elements in a relational database, a model represents a level of abstraction above the database. Consequently, the mapping between modeling classes and database components doesn't have to be one-to-one. So, for example, while an EOEntity object described in a model corresponds to a database table, in reality it can contain references to multiple tables. In that sense, a model is actually more analogous to a database view. Similarly, an EOAttribute can either correspond directly to a column in the root entity, or it can be derived or flattened. A derived attribute typically has no corresponding database column, while a flattened attribute is added to one entity from another entity. For more information, see the chapter Adding Derived Properties.
Table of Contents Next Section