Figure 2 Information Models Used in Metadata

OIM Groupings by Subject Areas OIM Information Models Namespace Identifier
Analysis and design model Unified Modeling Language uml
UML extensions umx
Common data types dtm
Generic elements gen
Object and component description model Component descriptions cde
Database and data warehousing Database schema elements dbm
Data transformation elements tfm
OLAP schema elements olp
Record oriented legacy rec
Knowledge management model Semantic definition elements sim

Figure 6 Metadata in the Repository


Figure 7 Database Items
<?xml version="1.0" encoding="windows-1252" ?> 
    <oim:Transfer xmlns:oim="http://www.mdcinfo.com/oim/oim.dtd" 
     xmlns:Umx="REPOS:Umx.dtd" xmlns:Tfm="REPOS:Tfm.dtd" 
     xmlns:Gen="REPOS:Gen.dtd" xmlns:Uml="REPOS:Uml.dtd" 
     xmlns:Dbm="REPOS:Dbm.dtd">
        <oim:TransferHeader Exporter="MSMDCXML" ExporterVersion="2.0"   
          TransferDateTime="2002-09-04T12:18:54" /> 
        <Dbm:DeployedCatalog oim:id="_0" oim:objid="{{C376B717-BB5A-4504-
          83ED-256CCDB477FB},00000001}" RepositoryUpdatedBy="dbo" 
          RepositoryUpdated="2002-08-10T18:51:02" URL="AppContent" 
          name="AppContent">
          <Uml:NamespaceOwnedElement>
            <Dbm:Schema oim:id="_1" oim:objid="{{C376B717-BB5A-4504-83ED-
              256CCDB477FB},00000003}" oim:label="dbo" name="dbo">
       <Uml:ClassifierFeature /> 
           <Uml:NamespaceOwnedElement>
             <Dbm:DeployedTable oim:id="_2" oim:objid="{{C376B717-BB5A-
               4504-83ED-256CCDB477FB},00000041}" oim:label="Contents" 
               name="Contents">
  •••
             <Dbm:Index oim:href="#_8" oim:objid="{{C376B717-BB5A-4504-
               83ED-256CCDB477FB},0000004D}" 
               oim:label="Contents.PK_Contents" /> 
             <Dbm:DeployedTable oim:id="_10" oim:objid="{{C376B717-BB5A-
               4504-83ED-256CCDB477FB},00000053}" oim:label="Images" 
               name="Images">
  •••
             <Dbm:Index oim:href="#_16" oim:objid="{{C376B717-BB5A-4504-
               83ED-256CCDB477FB},0000005F}" oim:label="Images.PK_Images" 
               /> 
             <Dbm:DeployedTable oim:id="_18" oim:objid="{{C376B717-BB5A-
               4504-83ED-256CCDB477FB},00000065}" oim:label="MenuItems" 
               name="MenuItems">
  ••• 
             <Dbm:Index oim:href="#_24" oim:objid="{{C376B717-BB5A-4504-
               83ED-256CCDB477FB},00000071}" 
               oim:label="MenuItems.PK_MenuItems" /> 
             <Dbm:DeployedTable oim:id="_26" oim:objid="{{C376B717-BB5A-
               4504-83ED-256CCDB477FB},00000077}" oim:label="Menus" 
               name="Menus">
  ••• 
             <Dbm:Index oim:href="#_31" oim:objid="{{C376B717-BB5A-4504-
               83ED-256CCDB477FB},00000081}" oim:label="Menus.PK_Menus" /> 
             <Dbm:DeployedTable oim:id="_33" oim:objid="{{C376B717-BB5A-
               4504-83ED-256CCDB477FB},00000087}" oim:label="Pages" 
               name="Pages">
  ••• 
        <Dbm:Index oim:href="#_37" oim:objid="{{C376B717-BB5A-4504-83ED-
          256CCDB477FB},0000008F}" oim:label="Pages.PK_Pages" /> 
      </Uml:NamespaceOwnedElement>
      </Dbm:Schema>
    </Uml:NamespaceOwnedElement>
  </Dbm:DeployedCatalog>
</oim:Transfer>

Figure 8 Export from Visual Basic
Public Sub ExportRepositoryData()
    Dim objMDExport As MSMDCXMLLib.Export
    Dim objMyObject As RepositoryTypeLib.RepositoryObject
    Dim objRepository As New RepositoryTypeLib.Repository()
    Dim objRoot As RepositoryTypeLib.RepositoryObject
    Dim objRepID As Integer

Call objRepository.Open("SERVER=(local);DATABASE=AppContent", "sa", "")
    objMyObject = objRepository.Object(objRepID)
    Call objMDExport.Add(objMyObject)
    Call objMDExport.Export("C:\XMLFile.xml")
    objMyObject = Nothing
    objRoot = Nothing
    objRepository = Nothing
    objMDExport = Nothing
End Sub

Figure 9 RetrieveDataTypeStr
// Create conection using ADO
myConnection.Provider="SQLOLEDB.1";
myConnection.Open("Data Source=<xsl:value-of select="$DBServer"/>;User 
  ID=<xsl:value-of select="$DBUsername"/>;Password=<xsl:value-of 
  select="$DBPassword"/>;Initial Catalog=msdb");
// Querying the corresponding Object
sSQL = 'SELECT dbo.RTblNamedObj.[Name]' +
                    ' FROM dbo.RTblNamedObj' +
                    ' WHERE dbo.RTblNamedObj.IntID = ' +
                    ' (SELECT DstID' +
                    '  FROM dbo.RTblRelships' +
                    '  INNER JOIN dbo.RTblNamedObj' +
                    '  ON dbo.RTblRelships.OrgId = ' +
                    '  dbo.RTblNamedObj.IntID' +
                    '  WHERE SUBSTRING(ORGID, 2, 4) = " +
                    '  CONVERT(BINARY(8)," 0x' + sID + ')' +
                    '  AND RTblNamedObj.Name = \'' + sName+ '\')';
                myTable.Open(sSQL, myConnection, 2, 2);
                sValue = myTable.fields(0).value;

Figure 10 Run the Function