Databases Reference
In-Depth Information
delete it before running this program. Also, you may need to switch away from and then
return to the
Query
tab to refresh the list.)
14.2 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.