Repository Engine Programming Enhancements

Meta Data Services

Meta Data Services

Repository Engine Programming Enhancements

Repository engine version 3.0 is backward compatible with version 2.0 functionality and interfaces. You can use version 3.0 with no change to the databases. In this case, only the version 2.0 features will work. You can upgrade the database version 2.0 to the database version 3.0 format by passing the REPOS_CONN_UPGRADE flag when you open the repository database. Another way to upgrade a repository database is through Meta Data Browser, during repository database registration. Upgrading allows you to use all the features of version 3.0. After you upgrade, however, you cannot open the upgraded database using a version 2.0 engine.

Microsoft® SQL Server™ 2000 Meta Data Services introduces the following new repository engine features in version 3.0. These features extend your ability to program against an information model that resides in a repository database.

View Generation

View generation provides a way to automatically generate relational views based on classes, interfaces, and relationships in an information model. You can use the relational views that you define to simplify repository database queries. To generate views, four new interfaces have been exposed to the repository engine. For more information, see Generating Views.

New COM Interfaces

IViewClassDef Interface

IViewInterfaceDef Interface

IViewPropertyDef Interface

IViewRelationshipDef Interface

Performance Hints

New performance hints described in this documentation can be used to optimize engine performance. In addition to the existing list of optimization techniques, you can adjust cache aging to vary aging for different row types, enable atomicity of operations, and preload object collections for each repository object. The new performance enhancements can be implemented through IReposOptions. For adjustable cache aging, set one or more of the AGEOUT options. For atomicity of operations, set OPT_ATOMICMODE. For preloading object collections, set OPT_EXPORT_MODE or OPT_PRELOAD_COL_MODE to specify the maximum number of objects in each collection.

New COM Interfaces

IReposOptions Interface

Property Extensions for BLOBs and Large Text Fields

Property extensions have been exposed to the repository engine to handle large properties or binary large objects (BLOBs) and give access to the meta data about the object. For more information, see Programming BLOBs and Large Text Fields.

New COM Interfaces

IReposProperty2 Interface

IReposPropertyLarge Interface

IRepositoryObject2 Interface

Collection Filters

Collection filters now support SQL selection criteria through the repository API. In this version of the repository engine, you can specify selection criteria for any target object at run time to precisely select objects of interest. To set criteria, use the GetCollection method of the IReposQuery interface.

New COM Interfaces

IReposQuery Interface

Integration with MS DTC

The repository engine is integrated with Microsoft Distributed Transaction Coordinator (MS DTC), so that an application that is using the repository engine can execute a transaction that spans multiple database systems. For more information, see Integration with Distributed Transaction Coordinator.

New COM Interfaces

IRepositoryTransaction2 Interface

Version Propagation

Version propagation behavior has been extended to relationships through two new flags. You can set COLLECTION_NEWDESTVERSIONADD to specify that an origin object always links to the latest version of a destination object. This eliminates manual versioning of an origin object in response to a new versioned destination object. The second new flag, COLLECTION_NEWDESTVERSIONPROPAGATE, has the opposite effect. It can be set to expand propagation behavior deeper into a chain of relationships. In cases where an object is both an origin and a destination, setting this flag creates a reverse-cascade versioning effect. A new destination object version causes the creation of a new origin object version, repeating this behavior until the engine reaches an unfrozen object. Setting this flag automates a task that developers previously had to handle in application code. For more information, see Propagating Versions and CollectionDefFlags Enumeration.

See Also

Meta Data Services Overview

Repository Engine Modeling Enhancements

Upgrading the Repository Engine

What's New in Meta Data Services