Using Meta Data Services to Program Information Models

Meta Data Services Programming

Meta Data Services Programming

Using Meta Data Services to Program Information Models

You can program against an information model that is installed in a repository database. Programming against an information model adds, updates, removes, and retrieves data from a repository database.

Typically, the data that you add and otherwise manipulate is design data about a tool or application that you create. Furthermore, the data that you can add and manipulate is defined by the information model. You can think of the information model as a template to which the data you add must conform. For example, to create an application that manipulates a schema, tables, and columns, you need an information model that defines what a schema is, what a table is, and what a column is.

As a programmer who is coding such an application, you populate the schema, table, and column types with meta data instances to be used by the tools and applications you create. The following example provides a simplistic look at how you can program elements of a database application using the Open Information Model (OIM).

What OIM defines What you create
Schema A schema for a Microsoft® SQL Server™ database, a Microsoft Jet database, or a new version of each database. In this case, four instances of Schema are stored in your information model.
Tables Tables for Customers, Orders, and Products. For example, you can vary the table definitions based on the schema types, or you can reuse the tables for each schema. Creating separate tables for each schema results in twelve instances of tables in your information model.
Columns Columns for Customer, Order, and Product tables. Assuming no reuse strategy, you can have a separate column instance for each table and for each schema.

Notice that the instance data you store is all about definitions. Instead of storing "Joe Smith" customer name, you store data about the CustomerName column.

Meta data is, by definition, unbiased. The following suggestions describe different ways to reuse meta data.

  • Use the meta data objects in two development environments (Microsoft Visual C++® for a desktop application and Microsoft Visual J++® for a Web application), using the syntax of each language to call the same object. For more information about declaring objects, see Programming Fundamentals: Declaring Objects.

  • Use the meta data objects in development projects in the same environment (one project for an application you are maintaining for an existing customer, one project for new development). You can use versioned objects and workspaces to isolate changes.

  • Export the meta data as Extensible Markup Language (XML) to a different repository.

See Also

Information Models

OIM in Meta Data Services

Repository API Reference