The DAO Object Model
As the name Data Access Objects suggests, the DAO is, at least in part, an object-oriented environment. In particular, the DAO is implemented as a hierarchy of collections of objects. Figure 14.5 shows the DAO Object Model, describing the collections and their objects.
Figure 14-5. The DAO Object Model
Each of the shaded boxes represents a collection of objects. (Thus DBEngine is the only noncollection.) The name of the objects contained within a given collection is just the singular of the collection name. For instance, the TableDefs collection holds TableDef objects and the Documents collection holds Document objects. DBEngine is the only standalone object—not contained in any collection.
There is a potential point of confusion about the DAO object hierarchy in Figure 14.5 that we should address. Consider, for example, the relationship between the Databases and Workspaces collections. It would be incorrect to say, as one might infer from the diagram, that the Databases collection is contained in the Workspaces collection. Indeed, the line from Workspaces to Databases means that each Workspace object has (or as Microsoft would say, “contains”) a Databases collection.
Perhaps the best way to view the situation is to say that each object in the DAO hierarchy has associated with it three things: collections, methods, and properties. For instance, a Workspace
Get Access Database Design and Programming, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.