SQL-DMO objects are exposed as properties of other SQL-DMO objects. The relationship provides developers with a logical, tree-like structure for SQL-DMO that simplifies programming with automation controllers. Many objects can be referenced using the familiar dot notation used to reference properties or methods.
For example, the Database object exposes a Tables collection. Each Table object within the collection represents a single table of an Microsoft® SQL Server™ installation. Obtaining a SQL-DMO Table object referencing a specific table can be done with the following syntax:
Set oTable = oDatabase.Tables("Employees")
The SQLServer object forms the trunk of the SQL-DMO object tree. Three main branches are visible in the tree: