Overview

The Repository Browser presents a hierarchical view of the contents of a Repository.

One of the key features of the Repository Browser is its ability to visualize data. Visualization is a key to locating and working with Repository data. The Repository Browser accepts four optional command line input arguments that tell which Repository database to access. They are:

  • Access=filename

  • DSN=dataSourceName

  • UID=userID

  • PWD=password

You can use the Access argument to specify the path to an Access database that is the Repository database. You can use the DSN argument to specify a data source that has been defined for the Repository database. You can use the UID and PWD arguments to identify yourself to the SQL Server that is hosting the Repository database. When using more than one argument, use a semicolon as a separator. For example,

Repbrows.exe DSN=MyServer; UID=MyID; PWD=MyPassword

Repository Browser User Interface

Repository Root and the Repository Browser

Repository Browser Hierarchy


Repository Browser User Interface

The Repository Browser is designed to provide a look-and-feel that is similar to the Windows Explorer. This familiar interface allows a user to easily browse the contents of a Repository.

The following tables describe the purpose of some of the Browser menus:

File Menu | Description
Open Repository | Opens a Repository database file.

Edit Menu | Description
Copy | Copies property values from the Browser into the Windows clipboard.
Paste | Pastes property values from the clipboard into the Browser.
Delete | Deletes the selected object.
Relationship | Displays the Relationship dialog box where you can view and edit the relationship between the selected target object and its source object.
Delete Relationship | Deletes the relationship between the selected target object and its source object.

View Menu | Description
Toolbar | Toggles the display of the toolbar.
Status Bar | Toggles the display of the status bar.
Refresh | Updates the Browser view.
Properties | Displays a dialog box to view object properties.
Filters | Displays the Repository Filters dialog box to enable you to change the Repository view.


Repository Root and the Repository Browser

See Also

The Repository has a unique root object, which is where the Repository Browser starts its browsing. The Repository Browser displays Repository data by iterating through all of the interfaces attached to the root object, then iterating through the collections attached to those interfaces, and so on.

Each information model normally adds an interface either to the Repository root object, or to some other object that is ultimately connected to the Repository root object. The added interface is then defined to contain one or more collections that relate to other objects in that information model.


Repository Browser Hierarchy

All objects are normally related to the Repository root, either directly, or indirectly through other objects and relationships. This makes it possible to navigate the Repository hierarchically. The Browser visualizes Repository data in a hierarchical fashion.

Browser data may be thought of as having a set of repeating patterns: interfaces have collections; collections contain Repository objects; Repository objects have interfaces. The following figure illustrates this point.

To reduce the amount of information that is displayed, use the Repository Filter dialog to filter out interfaces from the Browser display.


Information Models in the Repository Browser

An information model is an object model for a software tool (or a set of software tools). An information model is composed of classes, relationship types, interfaces, property definitions, methods, and collection types.

Information models are stored in the Repository. Each information model describes the types of objects and relationships that are used by one or more software tools. For example, Visual Basic provides an information model named “MdoTypeLib”. This information model describes the forms, controls, and other objects that make up a Visual Basic project. It also describes the relationships between those objects; projects contain modules and forms, forms contain controls, and so on.

The Type Information Model is the information model that the Repository uses to understand all other information models.

Interfaces

Repository Objects

Relationships

Collections

Object Properties


Interfaces

A class implements one or more interfaces. A Repository object is an instance of a class, and therefore provides one or more interfaces, as defined by the class to which it conforms. The Repository object is encapsulated and is only accessible through its interfaces. Each interface is composed of properties, methods, and collections.

By default, the Repository Browser displays interfaces in the Repository hierarchy. If you find the visualization of interfaces distracting, use the Repository Filter dialog to turn off the display of Repository interfaces.


Repository Objects

A Repository object is an instance of a class that has been defined in a Repository information model. In the following figure “Project1” and “RepVbBrowser” are both instances of the class “MdoProject”, and they both belong to the collection entitled “MdoProjects”.

A Repository object provides one or more interfaces. Each interface defines a set of properties, methods, and collections. The definition of a Repository object may be extended by adding interfaces to its corresponding class, or by adding properties, methods, or collections to an existing interface.


Relationships

A relationship is a logical connection between one Repository object, the origin object, and a second Repository object, the destination object.

The Repository Browser visualizes the Repository contents by browsing through relationships from the Repository root object (the source object) to all of the target objects in collections that are attached to the Repository root. Each target object can then be the source object of another relationship collection, and so on.

Relationships themselves are not directly visualized in the Repository Browser. They are implied by the collections that are displayed in the Repository Browser's hierarchical tree metaphor.

To view relationship information for an object

  1. Click the object to select it.

  2. On the Edit menu, click Relationship.
    -or-
    The Relationship toolbar button.
    -or-
    The Relationship command on the pop-up context menu.

The Relationship dialog box, shown in the following figure, appears.

You can delete an existing relationship. In effect, this will remove the target object of this particular relationship from the collection that contains the relationship.

To delete a relationship

  1. Click the object to select it.

  2. Click Delete Relationship on the Edit menu
    -or-
    Delete on the Relationship dialog box
    -or-
    Delete Relationship on the context menu.

To edit the name of a relationship

  1. Display the Relationship dialog box.

  2. Type the new name for the relationship in the Relationship Name text box.


Collections

A collection is a set of Repository objects that are all connected to a common source object via a relationship collection.

A collection is displayed in the Browser as a node in the Browser tree. The objects within a particular object collection are displayed underneath the collection node, and connected to it. Using Windows Explorer as an analogy, the contents of a folder on your hard disk can be thought of as a collection of file and subfolder objects. In this case, the common source object to which all of the files and subfolders are connected is the parent folder object. In this analogy, only one type of collection is defined for a folder; namely, the collection of files and subfolders. Consequently, in Windows Explorer, the actual collection object is not displayed to you. In the Repository, however, multiple collections of different types can be attached to any single parent object. This is why the Repository Browser displays the collection between the parent object and the objects within the collection.

A relationship between objects is actually a relationship between the interfaces of two objects. This is a key point in working with Repository data: the Repository contains collections of relationships between interfaces of objects.


Object Properties

The Repository Browser can view two kinds of properties: properties that are common to all Repository objects, and properties that are specific to a particular class of Repository object.

The Repository Browser displays the properties that are common to all Repository objects in a special tabbed dialog box. The following table describes the contents of this dialog box.

Properties that are specific to a particular class of object are not displayed in this dialog box. They are represented as members of the Members collection of the interfaces that are implemented by the object.

To view the Properties dialog box

  • On the View menu, click Properties.

The Properties dialog box, shown in the following figure, appears.

Property Name | Value
Type | The type of Repository object, that is, the class of which the object is an instance.
Parent | The location of the Access MDB Repository or SQL Server name.
Contains | If viewing properties of a collection, this property contains the count of objects contained within the collection.
Has | If viewing properties of a Repository object, this property contains the count of members attached to the object.


Working with Objects

Viewing Object Types

Unnamed Objects

Deleting Objects

The Object ID

Filtering Data

Origin and Destination

Source and Target


Viewing Object Types

Every Repository object conforms to a specific class or object type. The type of an object can be viewed by selecting the object in the Browser tree and viewing the type in the second status panel at the bottom of the Browser, or by viewing the Properties dialog box.


Unnamed Objects

In the Repository Browser, it is possible to display objects that have no names. An object without a name is assigned the name <unnamed object>. The following figure shows the Properties dialog box for an unnamed object.


Deleting Objects

The Repository Browser enables you to delete an object instance from the Repository. Deleting an object instance removes it from both the Browser interface and the Repository.

To delete an object instance

  1. Click the object to select it.

  2. Click Delete, on the Edit menu
    –or-
    The Delete toolbar button
    -or-
    Delete on the context menu.

    A confirmation dialog box appears as shown in the following figure.

  3. To confirm the deletion click OK.
    -or-
    To cancel the process click Cancel.


The Object ID

An object ID is a twenty-byte number maintained in the Repository as binary data. This number is converted to ASCII text and displayed in the right pane of the Repository Browser. For example, an object ID would be displayed as:

{{90591B0C-24F7-11CF-920A-00AA00A1EB95},0000002C}

The object ID is also displayed in the Properties dialog box as a read-only value as shown in the following figure. You can copy the object ID into the Windows clipboard, either from the Browser, or from the Properties dialog box.


Filtering Data

The Repository Browser provides the Repository Filters dialog box, shown in the following figure, for filtering data.

To open this dialog box click Filters on the View menu. The dialog box has two tabs:

  • The Visual tab provides a way to view tree nodes and list items using different types of images. If you change an option in the Visual tab and click OK, the nodes and list items are merely redrawn.

  • The Type tab allows you to specify whether or not Repository interfaces in the tree are displayed. If you change any option in the Type tab and click OK, the entire tree will be closed and redrawn.


Origin and Destination

In each Repository relationship, there is an origin and a destination. Consider this relationship example: Fred drives a black truck. "Person drives vehicle" is the relationship type, Fred is the origin of the relationship, and the black truck is the destination of the relationship.

Don't confuse the terms origin and destination with the terms source and target. For any particular relationship, the source and target are dependent upon whether you are navigating via the collection of origin objects or the collection of destination objects. The origin and destination for the relationship are not dependent upon which collection is being navigated.


Source and Target

When browsing into or out of a Repository collection, the source object is the one object to which all objects in the collection are related. The target object can be any one of the objects in the collection.

Don't confuse the terms source and target with the terms origin and destination. For any particular relationship, the source and target are dependent upon whether you are navigating via the collection of origin objects or the collection of destination objects. The origin and destination for the relationship are not dependent which collection is being navigated.


Migration Wizard Overview

The Microsoft Repository Migration Wizard (the Migration Wizard) converts Microsoft Repository's underlying database information from Repository 1.0 to Repository 2.0. The database information includes the core repository tables, the defined Information Models, and the associated data.

The Migration Wizard has a Graphical User Interface (GUI) that calls the core OLE interface(s) to perform the actual migration.

This Migration Wizard automatically converts all Information Models and instance data as defined by the Type Information Model in Repository 1.0. It attempts to provide guidance for anomalies created by the user; however, it cannot handle nonstandard extensions.

Note You must register the Microsoft Repository 2.0 engine before running the Migration Wizard program (MigRepV2.exe).

What Does the Migration Wizard Do?

The Migration Wizard supports the following capabilities:

  1. Converts all Information Models and their data.

  2. Maintains internal identifier consistency.

  3. Identifies any alterations to the Type Information Model tables.

  4. Preserves the Microsoft Repository 1.0 database.

  5. Supports table owners.

  6. Allows database name selection for a given Data Source Name (DSN).

  7. Supports security and permissions. This version allows Open Database Connectivity (ODBC) connections to specify a user name and password. Later versions may address copying security GRANTs.

What Doesn't the Migration Wizard Do?

The Migration Wizard does not support the following capabilities:

  1. Merging data into an existing Microsoft Repository 2.0 database.

  2. Handling nonstandard extensions.


Using the Interactive Mode

When you run the Migration Wizard program (MigRepV2.exe), the following dialog box appears on the screen. The dialog box contains information about the capabilities and main features of the Migration Wizard.

Click Next to step to the next dialog box, where you type the Repository 1.0 database information, as shown in the following figure. The dialog box contains three text boxes:

  • Data source — where you type the full pathname of the Repository 1.0 database. You may also use the Browse button to the right of the text box to locate the database file.

  • User name and Password — required only with SQL server, if you are not using a trusted connection.

The dialog box displays all the Information Models detected in your Repository 1.0 database, as shown in the example in the following figure. Click Next.

In the next dialog box, shown in the following figure, type the information required to create the Repository 2.0 database. In the Data source text box, type the path for your Repository 2.0 database, or click Browse to locate the file. A User name and Password are required only for SQL Server, if you are not using a trusted account.

If the file exists, it will be replaced by the new one automatically. If either the Repository 2.0 database file or the specified folder does not exist, the following dialog box appears, asking you if you want to create it.

The next dialog box displays both the Repository 1.0 database (source) and Repository 2.0 database (target) paths, as shown in the following figure. Verify the information and make any necessary changes. Click Begin to start the migration process.

While the migration process is underway, you will see a dialog box showing progress of the process. It also includes status lines to indicate the detailed progress of the operation, as shown in the following figure.

If the Repository 2.0 database file is created successfully, you will see the following dialog box; otherwise, the proper error message will be displayed.

After the process is complete, you can choose to rename the Repository 2.0 database using the same name as that of the Repository 1.0 database. If you accept this option, the Repository 1.0 database filename will be modified with the "_old" string, for example, MyV1.mdb becomes MyV1_old.mdb. This option is explained in the dialog box in following figure.


Using the Command Mode

You can use the command mode to run the Migration Wizard. You can use either DSNs (Data Source Names), or MDBs (Microsoft Jet database files). In either case, you must specify both the Repository 1.0 database (source) and the Repository 2.0 database (target). The following are the parameters to qualify the source:

/SN    Source DSN
/SO    Source Owner
/SU    Source Username
/SP    Source Password
/SD    Source Database

and these are the parameters to qualify the target:

/TN    Target DSN
/TO    Target Owner
/TU    Target Username
/TP    Target Password
/TD    Target Database

Note The parameters /SD, SO, /TD, and TO are needed only with SQL server.

Example (using DSNs)

MigRepV2 /SN=DSN=MyV1DSN /SO=Owner /SU=MyName /SP=MyPassword /SD=MyV1db /TN=DSN=MyV2DSN /TO=Owner /TU=MyName /TP=MyPassword /TD=MyV2db

Example (using MDBs)

MigRepV2 /SN=C:\V1Repostry.mdb /TN=D:\V2Repostry.mdb

The following are additional parameters that you can use as indicated:

/TF    to force the creation of the target Repository 2.0 file if it does not exist.
/R        to rename the Repository 2.0 database using the same name of the Repository 1.0 database, and modify the Repository 1.0 database name with the "_old" string, for example, MyV1.mdb becomes MyV1_old.mdb.

Note If you don't supply any parameters MigRepV2.exe will run in the interactive mode.

A log file, MigRepV2.log, is generated. This may be checked for any errors. All error messages that would be reported to the user in both Interactive and Command Mode are written to this log file.


The Migration Algorithm

The Migration Wizard uses the Repository 2.0 engine to create Microsoft Repository 2.0 tables. Pure SQL Data Manipulation Language (DML) and Data Definition Language (DDL) are used to move all the Repository information — both Information Models and instance data.

The General Flow

The following sections describe the algorithm that converts Repository 1.0 to Repository 2.0.

Application Startup

  • Ascertain nationality.

  • Load the correct localization resource file.

ODBC Initialization

  • Determine all DSNs defined to the machine.

Preparation

  • Read Type Information Model control tables to acquire any other Type Information Model tables and column definitions.

  • If any Repository 2.0 tables exist, destroy them, then recreate them.

Copy Type Information Model

  • Allow Repository 2.0 engine to build Type Information Model.

  • Add any Repository 1.0 Information Models into the Repository 2.0.

  • Synchronize all relationships.

  • Convert RTblObjects into RTblVersions and set the values of Z_VE_Z and Z_BranchID_Z to zero.

  • Verify that no additional columns are defined in the Repository 1.0 Type Information Model tables; provide an error message if additional data is found.

Copy Information Models

  • Copy data in Repository 1.0 tables using SQL SELECT/INSERT statements.

  • All inserts use default version and branch information.

Table Mapping

Version 1 | Version 2
RtblClassDefs | RTblClassDefs
RtblIfaceDefs | RTblIfaceDefs
RtblIfaceMem | RTblIfaceMem
RtblITimestamp | RTblITimestamp
RtblNamedObj | RTblNamedObj
RtblObjects | RTblVersions
RtblPropDefs | RTblPropDefs
RtblProps | RTblProps
RtblRelColDefs | RTblRelColDefs
RtblRelColPairs | RTblRelColPairs
RtblRelshipProps | RTblRelshipProps
RtblRelships | RTblRelships
RtblRoot | RTblRoot
RtblSites | RTblSites
RtblTypeLibs | RTblTypeLibs
None needed | RTblWorkspaceItems

Notes

  1. For each row in RTblObjects table, the Migration Wizard creates one row in the RTblVersions table.

  2. The RTblWorkspaceItems table is created with no rows.


Appendixes

  • Technical Notes

  • Mapping Issues


Technical Notes

Assigning Versions

All instances are inserted into the Repository 2.0 tables on branch 0, version 0, in a non-frozen state.

User Extensions to Repository Tables

The Migration Wizard checks all the Repository 1.0 Type Information Model tables for any additional columns that are created using the SQL ALTER statement, and are not represented by the Type Information Model model. The detection triggers a dialog box and a text file noting these tables to the user. It is the user's responsibility to recreate these tables in the Repository 2.0.

User Tables with Foreign Keys to Microsoft Repository

Users can create their own tables with a foreign key relationship back against the Type Information Model tables, based on the InternalID of each repository object. The Migration Wizard will copy all rows to the Repository 2.0 tables, leaving the InternalID unchanged. This prevents loss of referential integrity, and preserves foreign key dependencies based upon InternalID. The Migration Wizard does not move, copy, or alter user tables. Note that user tables are not the same as user-created Information Models.

Tables to Convert

The Migration Wizard focuses only upon the Type Information Model tables and any Type Information Model instance data tables defined in the repository. All tables named in the Information Models will be converted.

Database Connectivity

Both Repository 1.0 and Repository 2.0 databases are accessed via Remote Data Access (RDO)/Open Database Connectivity (ODBC) connections. This requires the user to have predefined the ODBC DSNs for SQL Server databases. The Migration Wizard generates temporary DSNs for the Access MDBs that are not already associated with DSNs.


Mapping Issues

General

  • The exact values for all the Repository 1.0 database fields are copied over.

  • The new Repository 2.0 database fields, which take the form Z_???_Z, are treated as follows:
    • Those marked NULLABLE have the value NULL inserted.

    • Those marked NON NULL have 0 as their value.

    • All the Z_VE_Z fields are set to the constant VERINFINITY (hex 7fffffff).

Objects — General Principles

  • Inserting the objects requires adding entries to RTblVersion table, where the IntID will correspond to the RTblObject's IntID.

  • For the RTblVersion table, the columns Z_BranchID_Z and Z_VS_Z will conform to the above standards.

Relationships — General Principles

  • For the table RTblRelships in the Repository 2.0 database, the values of the following columns are set as follows:

    Z_OrgBrID_Z = 0

    Z_OrgVS_Z = 0

    Z_DstBrID_Z = 0

    Z_DstVE_Z = 0

    Z_DstVS_Z = 0

    Z_OrgVE_Z = VERINFINITY

Properties

  • For the table RTblPropDefs in the Repository 2.0 database, the following columns are set as follows:

    Z_VS_Z = 0

    Z_VE_Z = VERINFINITY

Exceptions to the Rule

  • For the table RTblVersions, both Z_PredBrID_Z and Z_PredVer_Z are set to VERINFINITY

Information Model Tables

  • The Migration Wizard adds the columns Z_VS_Z, Z_VE_Z, and Z_BranchID_Z.

  • The following columns are set as follows:

    Z_VS_Z = 0

    Z_VE_Z = VERINFINITY

    Z_BranchID_Z = 0

Information Model Keys

The Information Model's primary keys are extended to include Z_VS_Z, and Z_BranchID_Z.

Information Model Indexes

Indexes are checked. Non-unique indexes are recreated. Unique indexes are displayed or logged for user intervention.

JET Compaction

After the migration is complete, the ODBC driver is used to compact the new MDB.


Topic Not Found

No matching topic was found. Some possible reasons and remedies are as follows:

  • The file (.chm) that contains the destination topic is not in the expected location.

    Remedy: Rerun the MSDN Library Setup.

  • The file (.chm) that contains the current topic or destination topic is out-of-date and the link is no longer valid.

    Remedy: Install the latest version of the MSDN Library.

  • The MSDN Library CD is not in the CD-ROM drive.

    Remedy: Insert the MSDN Library CD into the CD-ROM drive.