Understanding the ZENworks for Desktops Inventory Database Schema

This section describes the design of the ZfD Inventory database schema implemented using the Common Information Model (CIM) of Distributed Management Task Force (DMTF). To understand this document effectively, you should be familiar with terminology such as CIM and Desktop Management Interface (DMI). You should also have a solid understanding of relational database based managed systems (RDBMS) and database concepts.

The following sections provide in-depth information:


Overview

The DMTF is the industry organization leading the development, adoption, and unification of management standards and initiatives for desktop, enterprise, and Internet environments. For more information about DMTF, see the DMTF Web site.

The DMTF CIM is an approach to system and network management that applies the basic structuring and conceptualization techniques of the object-oriented paradigm. The approach uses a uniform modeling formalism that together with the basic repertoire of object-oriented constructs supports the cooperative development of an object-oriented schema across multiple organizations.

A management schema is provided to establish a common conceptual framework at the level of a fundamental topology, both with respect to classification and association, and to a basic set of classes intended to establish a common framework for a description of the managed environment. The management schema is divided into the following conceptual layers:

CIM comprises a specification and a schema (see the DMTF Web site. The specification defines the meta-schema plus a concrete representation language called Managed Object Format (MOF).


CIM Schema

The elements of the meta schema are classes, properties, and methods. The meta schema also supports indications and associations as types of classes and references as types of properties.

Classes can be arranged in a generalization hierarchy that represents subtype relationships between classes. The generalization hierarchy is a rooted, directed graph that does not support multiple inheritance.

A regular class may contain scalar or array properties of any intrinsic type such as Boolean, integer, string, and others. It cannot contain embedded classes or references to other classes.

An association is a special class that contains two or more references. It represents a relationship between two or more objects. Because of the way associations are defined, it is possible to establish a relationship between classes without affecting any of the related classes. That is, addition of an association does not affect the interface of the related classes. Only associations can have references.

The schema fragment in the following illustration shows the relationships between some CIM objects that ZfD uses.


The CIM schema as it maps to an RDBMS schema

The illustration shows how the CIM schema maps to a relational DBMS schema. The classes are shown with the class name as the box heading. The associations are labeled within the lines between two classes.

The inheritance hierarchy of this schema fragment is shown in the following illustration of the CIM 2.2 schema. The references shown as type Ref are in bold with each association sub-type narrowing the type of the reference.


The CIM 2.2 schema and its inheritance hierarchy


CIM-to-Relational Mapping

CIM is an object model complete with classes, inheritance, and polymorphism. The generated mapping to a relational schema preserves these features to the maximum extent. The following two aspects are part of the relational mapping:

A table in the database represents each class in the CIM hierarchy. A column of the appropriate type in the table represents each non-inherited property in the class. Each table also has a primary key, id$, which is a 64-bit integer that uniquely identifies an instance. An instance of a CIM class is represented by a row in each table that corresponds to a class in its inheritance hierarchy. Each row has the same value for id$.

Each CIM class is also represented by a view that uses id$ to join rows from the various tables in the inheritance hierarchy to yield a composite set of properties (inherited plus local) for an instance of that class. The view also contains an extra column, class$, of type integer that represents the type of the actual (leaf-most) class of the instance.

Associations are mapped in the same manner as regular classes, with a reference property being represented by a column with the id$ field of the referenced object instance. Thus associations can be traversed by doing a join between the reference field in the association and the id$ field in the referenced table. The following illustration depicts a typical query using this mapping:


A query to find all computers on a network

This query finds all the computers attached to a given network segment. The classes and relationships involved are highlighted with borders.

The following topics describe both the schema types:


Logical Schema

The logical schema is the database schema as seen by users of the database and the application program. The schema consists of stored procedures and views. The underlying tables are not visible to the application.

Typically, each CIM class has the following:

ZfD Inventory components use JDBC to issue SQL statements to the RDBMS and to convert between RDBMS data types and Java data types. The use of JDBC with stored procedures and views provides a level of abstraction that insulates application code from the underlying database technology and from changes to the physical schema.

The various elements of the logical schema are discussed in more detail in the following sections:


Naming Schema Elements

We recommend that you use the CIM names unchanged in the database schema. Some problems may still ensue because of the differences in the naming schemes, such as the following:

Most of these problems are avoided during schema generation by preserving the case of CIM names, abbreviating any names longer than 30 characters, and placing quotes around any name that is in the union of the sets of reserved words.

Any name longer than 28 characters is abbreviated to a root name of 28 or fewer characters to allow a two-character prefix so that all associated SQL schema elements can use the same root name. The abbreviation algorithm shortens a name so that it is mnemonic, recognizable, and also unique within its scope. The abbreviated name is given a # character as a suffix (note that # is an illegal character in CIM) to prevent clashes with other names. If two or more names within the same scope generate the same abbreviation, an additional digit is appended to make the name unique. For example, AttributeCachingForRegularFilesMin is abbreviated to AttCacForRegularFilesMin#.

All such mangled names are written to the mangled name table so that a program can look up the real CIM name and retrieve the mangled name to use with the SQL.

Views are the schema elements that are most often manipulated by application code and queries. They use the same name as the CIM class they represent. For example, the CIM_UnitaryComputerSystem class is represented by a view named CIM.UnitaryComputerSystem.

When necessary, names for indexes and auxiliary tables are created by concatenating the class name and property name separated by a $ character. These names are usually abbreviated. For example, NetworkAdapter$NetworkAddresses is abbreviated to NetAdapter$NetAddresses#. This does not have any adverse impact on ZfD schema users.


Users and Roles

In SQL, a user with the same name as the schema is the owner of each schema, for example, CIM, ManageWise®, ZENworks, and others.

Additionally, there is an MW_DBA user that has Database Administrator privileges and rights to all schema objects. The MW_Reader role has read-only access to all schema objects and the MW_Updater role has read-write-execute access to all schema objects.

Application programs should access the database as either MW_Reader or MW_Updater for a Sybase database and MWO_Reader or MWO_Updater for an Oracle database, depending on their requirements.


Data Types

CIM data types are mapped to the most appropriate data type provided by the database. Usually, the Java application does not require the type because it uses JDBC to access the data.

Java does not natively support unsigned types, so you should use classes or integer types of the next size to represent them. Also, ensure that there are no problems while reading or writing to the database. For example, reading or writing a negative number to an unsigned field in the database is likely cause an error.

Strings in CIM and Java are Unicode*, so the database is created using the UTF8 character set. Internationalization does not pose any problems; however, it may create problem with case sensitivity in queries.

All databases preserve the case of string data stored within them, but may access the data as either case sensitive or otherwise during queries. In ZfD, the Inventory Query component is not affected because the queried data is retrieved from the database before being queried and so case sensitivity is automatically taken care of.

In CIM, strings may be specified with or without a maximum size in characters. Many strings have no specified size, which means they can be unlimited in size. For efficiency reasons, these unlimited strings are mapped to a variable string with maximum size of 254 characters. CIM strings with a maximum size are mapped to variable database strings of the same size. The size in the database is in bytes and not as characters because a Unicode character may require more than one byte for storage.


Views

Each CIM class is represented in the database by a view that contains all the local and inherited non-array properties of that class. The view is named the same as the CIM class. For example, the CIM class CIM_System represents a SQL view named CIM.System, as shown in the following illustration.

The CIM.System view is created with attributes that are selected from multiple tables. These attributes include: id$ selected from cim.t$ManagedSystemElement,class$ is filled up automatically using the function mw_dba.extractClass, Caption selected from cim.t$ManagedSystemElement, Description selected from cim.t$ManagedSystemElement, InstallDate selected from cim.t$ManagedSystemElement, Status selected from cim.t$ManagedSystemElement, CreationClassName selected from cim.t$System, Name selected from cim.t$ManagedSystemElement. NameFormat selected from cim.t$System.NameFormat, PrimaryOwnerContact selected from cim.t$System, and PrimaryOwnerName selected from cim.t$System. The view is created by joining the tables CIM.t$ManagedSystemElement and CIM.t$System where the id$ of both the tables are same.

The CIM.SYSTEM view is as follows:

CREATE VIEW CIM.System

{

  id$, 

  class$,

  Caption,

  Description,

  InstallDate,

  Status,

  CreationClassName,

  Name,

  NameFormat,

  PrimaryOwnwerContact,

  PrimaryOwnerName

}

AS SELECT

  CIM.t$ManagedSystemElement.id$

  MW_DBA.extractClass(CIM.t$ManagedSystemElement.id$),

  CIM.t$ManagedSystemElement.Caption,

  CIM.t$ManagedSystemElement.Description,

  CIM.t$ManagedSystemElement.InstallDate,

  CIM.t$ManagedSystemElement.Status,

  CIM.t$System.CreationClassName,

  CIM.t$ManagedSystemElement.Name,

  CIM.t$System.NameFormat,

  CIM.t$System.PrimaryOwnerContact,

  CIM.t$System.PrimaryOwnerName

FROM

  CIM.t$ManagedSystemElement,

  CIM.t$System

WHERE

  CIM.t$ManagedSystemElement.id$ = CIM.t$System.id$

In addition to the properties of the class, the view has the following two additional fields:

Views can be queried using the SELECT statement and updated using the UPDATE statement. Because views cannot be used with the INSERT and DELETE statements, use the constructor and destructor procedures.


Object Identifier Id$

Id$ is a 64-bit object identifier that uniquely identifies a particular instance of a class. This object identifier is usually used as an opaque handle to a particular instance. Id$ is modeled as a signed number for ease of manipulation in Java as a long data type.

Id$ contains the following three parts of information, which can each be extracted by invoking the appropriate stored procedure.

The id$ field is used in its entirety as an opaque handle to an instance of a class. When an association class represents a relationship between instances of two classes, the reference fields of the association hold the id$ of the referenced instances (like the pointers). Therefore, id$ and these reference fields are frequently used in Join conditions when constructing the database queries that reference more than one view.


Constructor

Each concrete (non-abstract) CIM class has a constructor stored procedure that must be called to create an instance of the class. This stored procedure has input parameters that allow the user to specify a value for each property in the class, and a single output parameter that returns the id$ allocated to the created instance. The application uses this returned id$ value to construct association classes that reference that particular instance.

The constructor is named by prefixing the root name with c$, and each parameter is named by prefixing the root property name with p$. For example, the constructor for CIM_UnitaryComputerSystem, a subclass of CIM_System, is named CIM.c$UnitaryComputerSystem and is constructed for Oracle as shown in the following example.

CREATE PROCEDURE CIM.c$UnitaryComputerSystem

(

p$id$  OUT NUMBER,

p$Caption IN CIM.t$ManagedSystemElement.Caption%TYPE DEFAULT  NULL,

p$Description IN CIM.t$ManagedSystemDescription%TYPE DEFAULT NULL,

p$InstallDate IN CIM.t$ManagedSystemElement.InstallDate%TYPE DEFAULT NULL,

p$Status IN CIM.t$ManagedSystemElement.Status%TYPE DEFAULT NULL,

p$CreationClassName IN CIM.t$System.CreationClassName%TYPE DEFAULT NULL,

p$Name IN CIM.t$ManagedSystemElement.Name%TYPE DEFAULT NULL,

p$PrimaryOwnerContact IN CIM.t$System.PrimaryOwnerContact%TYPE DEFAULT NULL,

p$PrimaryOwnerName IN CIM.t$System.PrimaryOwnerName%TYPE DEFAULT NULL,

p$NameFormat IN CIM.t$System.NameFormat%TYPE DEFAULT NULL,

p$LastLoadInfo IN CIM.t$UnitaryComputerSystem.LastLoadInfo%TYPE DEFAULT NULL,

p$ResetCapability IN CIM.t$UnitaryComputerSystem.ResetCapability%TYPE DEFAULT NULL,

p$PowerManagementSupported IN CIM.t$UnitaryComputerSystem.PowerManagementSupported%TYPE DEFAULT NULL,

p$PowerState IN CIM.t$UnitaryComputerSystem.PowerState%TYPE DEFAULT NULL

)IS

  temp NUMBER;

BEGIN

  LOOP

  SELECT CIM.s$UnitaryComputerSystem.NEXTVAL INTO temp FROM DUAL;

  SELECT MW_DBA.makeId(240, temp) INTO temp FROM DUAL;

  EXIT WHEN MOD(temp,100) != 0;

  END LOOP; 

  p$id$ := temp;

INSERT INTO CIM.t$ManagedSystemElement (id$, classOid$, Caption, Description, InstallDate, Status, Name)VALUES( p$id$, HEXTORAW('0302100203'), p$Caption, p$Description, p$InstallDate, p$Status, p$Name);

INSERT INTO CIM.t$System ( id$, CreationClassName, PrimaryOwnerContact, PrimaryOwnerName, NameFormat )VALUES( p$id$, p$CreationClassName, p$PrimaryOwnerContact, p$PrimaryOwnerName, p$NameFormat );

INSERT INTO CIM.t$UnitaryComputerSystem (id$, LastLoadInfo, ResetCapability, PowerManagementSupported, PowerState ) VALUES( p$id$, p$LastLoadInfo, p$ResetCapability, p$PowerManagementSupported, p$PowerState );

END;

Stored procedures can be called with either positional arguments or keyword arguments, or with a combination of the two. If any positional arguments are supplied, they must precede any keyword arguments. Always use keyword arguments when calling constructor stored procedures. This provides better insulation from CIM schema changes that cause either the insertion of extra parameters or the recording of existing parameters, either of which can break a positional call in a possible undetectable way. The procedures are generated such that any omitted parameters will default to NULL.

It is permissible to use the positional notation for the first parameter p$id$, which is the output parameter that returns the object identifier of the newly created instance.

The following code sample shows how to call a stored procedure using positional notation for the first argument and keyword notation for all subsequent arguments on Sybase.

CallableStatement CS = 

conn.prepareCall( "{call CIM.c$UnitaryComputerSystem( ?,  p$Name=?, p$Description=?)}" )

cs.registerOutParameter ( 1, java.sql.Types.BIGINT ); //id$

cs.setString( 2, "Bogus_UCS_1") ; //Name

cs.setString( 3, "Created with mixture of positional & keyword args" ); // Description

cs.executeUpdate();

long id = cs.getLong ( 1 );

SQLWarning w = cs.getWarnings();

if( w != null )

  printWarnings( w );

else

  System.out.println("Created UCS id$ = " + id );

The syntax for keyword notation differs in Sybase ASA and Oracle. In Sybase ASA, the syntax is KEYWORD=value. In Oracle, the syntax is KEYWORD => value. Properly written code will dynamically construct the call string using syntax appropriate for the database in use.


Destructor

Each non-abstract CIM class has a destructor stored procedure that is called to destroy an instance of the class. This stored procedure has only one input parameter that specifies the object identifier (id$) of the instance to be destroyed and returns no value.

The destructor deletes the appropriate rows in all relevant tables, including the rows in the inheritance chain and any associations that reference the instance being destroyed. Only the association is destroyed; the associated objects associated are not destroyed. If there is need to destroy the association, the programmers must ensure that they are not destroyed.The destructor is named by prefixing the root name with d$ and the single object identifier parameter is named p$id$. This procedure is called using positional notation. For example, the destructor for CIM_UnitaryComputerSystem, a concrete subclass of CIM_System, is named as CIM.d$UnitaryComputerSystem.


Physical Schema

The physical schema comprises elements necessary to implement the database. The physical schema differs for each database. A typical physical schema consists of:

The logical schema is layered on top of the physical schema and makes it unnecessary for users and applications to know the physical schema.


Inventory Database Schema in ZfD

The following section describes the database schema classes and the extensions and associations made to the CIM schema for use in ZfD. These extensions have ZENworks or ManageWise as their schema name. ZENworks.classname refers to the extended class in the ZENworks schema and ManageWise.classname refers to the extended class in the ManageWise schema.

The following sections will help you understand the ZfD database schema:


Case Study of CIM Schema Implementation in ZfD

The following scenario describes a managed workstation that has two parallel ports with a specified interrupt number.

In the following schema diagram, the CIM_UnitaryComputerSystem represents a managed inventory system.

In this illustration, class CIM.PointingDevice associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemDevice.PartComponent pointing to CIM.PointingDevice. The relationship between the two classes is one to many. This means a computer system might have more than one pointing devices.

Class CIM.IRQ associates to CIM.PointingDevice using the association CIM.AllocatedResource. Dependent pointing to CIM.PointingDevice and Antecedent pointing to CIM.IRQ.

Class ZENworks.ZENKeyboard associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemDevice.PartComponent pointing to ZENworks.ZENKeyboard. The relationship between the two classes is one to one. This means a computer system can have only one Keyboard.

Class ZENworks.BIOS associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemBIOS.PartComponent pointing to ZENworks.BIOS. The relationship between the two classes is one to one. This means a computer system can have only one BIOS.

Class CIM.ZENworks.ParallelPort associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemDevice.PartComponent pointing to CIM.ZENworks.ParallelPort. The relationship between the two classes is one to many. This means a computer system might have more than one parallel port.

Class ZENworks.BUS associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemBUS.PartComponent pointing to ZENworks.BUS. The relationship between the two classes is one to one. This means a computer system can have only one BUS.

Class ManageWise.User associates to CIM.UnitaryComputerSystem using the association CIM.ManageWise.ObjectContact with Client.

Class CIM.IRQ associates to CIM.ParallelPort using the association CIM.AllocatedResource. Dependent pointing to CIM.ParallelPort and Antecedent pointing to CIM.IRQ.


Schema diagram for CIM_UnitaryComputerSystem with its associations

The schema diagram illustrates the following:

All other classes follow similar representation. For an explanation of the CIM and extended classes, see CIM Classes and Extension Classes in ZfD . For schema diagrams of other classes, see Schema Diagrams of CIM and the Extension Schema in ZfD .


Legends for Schema Diagrams

The legends for reading the schema diagrams are as follows:

For an explanation about CIM schema, see the CIM 2.2 schema specification on the DMTF Web site.


Leaf Objects in the Database

A leaf object in the Inventory database has only one instance at any given point of time. In terms of relational mapping, a table that is made as a leaf object will have only one row and this row will be shared across multiple workstation objects in the database. The advantages of this approach are better optimized storage and better performance for queries.

Any Inventory component object behaves like a leaf object in the database if it is same across several workstations and no other objects are associated under it. For example, a software application installed on the workstation is a leaf object. The following classes are leaf nodes in the ZfD Inventory database:

  1. ZENworks_PointingDeviceDeviceDriver
  2. ZENworks_ZENKeyboard
  3. ZENworks_Bus
  4. CIM_IRQ
  5. CIM_DMA
  6. ZENworks_ZENOperatingSystem
  7. CIM_Processor
  8. CIM_Memory
  9. CIM_VideoBIOSElement
  10. CIM_Product
  11. ZENworks_NetwareClient
  12. CIM_POTSModem
  13. ZENworks_SoundCard
  14. ZENworks_MotherBoard
  15. CIM_PowerSupply
  16. ZENworks_PhysicalDisk
  17. ZENworks_PhysicalDiskette
  18. ZENworks_LogicalDiskette
  19. ZENworks_PhysicalCDROM
  20. Zenworks.NetworkAdapterDriver

CIM Classes and Extension Classes in ZfD describes the CIM classes that ZfD uses.


Non-CIM Tables and Views in the ZfD Database Schema

There are a few tables called "support tables" in the ZfD database. These tables and views do not follow the CIM specification. These tables and views are as follows:

View Name Description Table that the View Uses Inventory Component that Uses the View

ZENworks.Processor.Family

Contains the enum values and strings indicating the processor families. These enum values are described in the DMI specification.

t$ProcessorFamily

Inventory Reporting

ZENworks.ProcessorRole

Contains the enum values and strings indicating the processor roles. These enum values are described in the DMI specification.

t$ProcessorRole

Inventory Reporting

ZENworks.OperatingSystemType

Contains the enum values and strings indicating the types of operating systems. These enum values are described in the DMI specification.

t$OperatingSystemType

Inventory Reporting

ZENworks.VideoArchitecture

Contains the enum values and strings indicating the different video adapter types. These enum values are described in the DMI specification.

t$VideoArchitecture

Inventory Reporting

MW_DBA.LockTable

Inventory Storer maintains modification time stamps indicating the last modified time of the inventory information. The Storer will not store the inventory scan received if the time stamp is the same.

t$LockTable

Inventory Storer


CIM Classes and Extension Classes in ZfD

The following table describes the CIM and extension classes that ZfD uses:

CIM and Extension Class in ZfD Description of the details that the Class Models

CIM.PointingDevice

Any pointing device available on the managed system. Mostly used to model the mouse.

ZENworks.SystemInfo

Identification details about the system such as serial number and asset tag.

ZENworks.Site

Site ID and site name of the Inventory database.

ZENworks.PointingDeviceDeviceDriver

Device driver that is installed with the pointing device.

ZENworks.SerialPort

Serial ports on the managed system.

ZENworks.ParallelPort

Parallel ports on the managed system.

ZENworks.ZENKeyboard

Attributes modeling the properties of the system keyboard.

ZENworks.BIOS

BIOS software on the system.

ZENworks.Bus

System bus in the system.

ManageWise.User

Details of the user who was logged in to the workstation.

ManageWise.MSDomainName

Name of the domain to which the Windows NT workstation is attached.

ManageWise.NDSName

DN name and tree under which the managed workstation is registered in eDirectory.

CIM.VideoBIOSElement:

Video driver.

CIM.Processor

Processor of the workstation.

CIM.Memory

Total memory of the workstation.

ZENworks.VirtualMemory

Total virtual memory size of the workstation.

ZENworks.Videoadapter

Properties of the monitor and the adapter connecting it.

ZENworks.ZENOperatingSystem

Details of the operating system.

ZENworks.InventoryScanner

Details of the inventory scanner that has scanned for hardware and software details of the managed workstation

ZENworks.NetwareClient

NetWare client version of the workstation

CIM.Product

Software installed on the managed system. Key attributes are the names of the product, vendor, and version.

CIM.EthernetAdapter

Information on the properties of the network adapter.

ZENworks.NetworkAdapterDriver

Network card adapter driver information.

CIM.IPProtocolEndpoint

IP address of the workstation.

CIM.IPXProtocolEndpoint

IPX address of the workstation.

CIM.LANEndpoint

Active MAC address.

ManageWise.DNSName

DNS name of the workstation.

ZENworks.SoundCard

Description of the multimedia adapter on the workstation.

CIM_POTSModem

Physical configuration of the modem device.

CIM_DMA

Information about the system DMA channels.

CIM.CacheMemory

Information about the configured system cache.

CIM.IRQ

List of Interrupt channels and their status on the system. They are also associated to devices that use the specified interrupt number.

ZENworks.MotherBoard

Information about the motherboard on the workstation.

CIM.PowerSupply

Information about the power supply unit of the workstation.

CIM.Battery

Physical details of the system battery.

CIM.Card

Details of adapter cards mounted on the system board.

CIM.Slot

Expansion slots available on the system board.

ZENworks.StoragePhysicalMedia

Physical information about the storage devices on the workstation, such as hard disk, floppy drives, CD drives, and others.

ZENworks.LogicalDiskette

Drive mapped to the floppy drive.

ZENworks.PhysicalDiskette

Derived from ZENworks.StoragePhysicalMedia to model the floppy disk drive.

ZENworks.PhysicalDiskDrive

Derived from ZENworks.StoragePhysicalMedia to model the hard disk.

ZENworks.LogicalDiskDrive

Information about the local drives on the hard disk.

CIM.LocalFileSystem

Information about the local file system mounted on the hard disk.

ZENworks.PhysicalCDROM

Derived from ZENworks.StoragePhysicalMedia to model the CD drive.

ZENworks.LogicalCDROM

Drive mapped to the CD drive.

ZENworks.BackupDisk

Derived from ZENworks.StoragePhysicalMedia to model other backup disks like Jaz drives and Zip disks.

ZENworks.LogicalBackupDisk

Drives mapped to the backup devices on the workstation.


Schema Diagrams of CIM and the Extension Schema in ZfD

The following schema diagrams of the CIM and extension schema model the Inventory database in ZfD:

In the following schema diagram, the CIM_UnitaryComputerSystem represents a managed inventory system.

In this illustration, class CIM.PointingDevice associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemDevice.PartComponent pointing to CIM.PointingDevice. The relationship between the two classes is one to many. This means a computer system might have more than one pointing devices.

Class CIM.IRQ associates to CIM.PointingDevice using the association CIM.AllocatedResource. Dependent pointing to CIM.PointingDevice and Antecedent pointing to CIM.IRQ.

Class ZENworks.ZENKeyboard associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemDevice.PartComponent pointing to ZENworks.ZENKeyboard. The relationship between the two classes is one to one. This means a computer system can have only one Keyboard.

Class ZENworks.BIOS associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemBIOS.PartComponent pointing to ZENworks.BIOS. The relationship between the two classes is one to one. This means a computer system can have only one BIOS.

Class CIM.ZENworks.ParallelPort associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemDevice.PartComponent pointing to CIM.ZENworks.ParallelPort. The relationship between the two classes is one to many. This means a computer system might have more than one parallel port.

Class ZENworks.BUS associates to CIM.UnitaryComputerSystem using the association CIM.SystemDevice with SystemDevice.GroupComponent pointing to CIM.UnitaryComputerSystem and SystemBUS.PartComponent pointing to ZENworks.BUS. The relationship between the two classes is one to one. This means a computer system can have only one BUS.

Class ManageWise.User associates to CIM.UnitaryComputerSystem using the association CIM.ManageWise.ObjectContact with Client.

Class CIM.IRQ associates to CIM.ParallelPort using the association CIM.AllocatedResource. Dependent pointing to CIM.ParallelPort and Antecedent pointing to CIM.IRQ.


Schema diagram for CIM_UnitaryComputerSystem and extension schema model


Schema diagram for CIM_UnitaryComputerSystem


Schema diagram for CIM_UnitaryComputerSystem


Schema diagram for CIM_UnitaryComputerSystem.


Schema diagram for CIM_UnitaryComputerSystem


Schema diagram for CIM_UnitaryComputerSystem


Sample Inventory Database Queries

The following are sample queries for retrieving the inventory information from the ZfD Inventory database.

Refer to the schema diagrams in Schema Diagrams of CIM and the Extension Schema in ZfD to find out the associated schema classes and attribute information.

  1. Retrieve the name and ID of all workstations from the database and also to the tree to which these workstations are registered. The query is as follows:

    SELECT u.id$,m.label,m.tree FROM managewise.NDSName m,cim.UnitaryComputerSystem u,managewise.Designates s where s.Designation=m.id$and s.HOST=u.id$

  2. Retrieve the asset tag, manufacturer, and serial number of all the workstations in the database. The query is as follows:

    SELECT m.Tag,m.Manufacturer,m.SerialNumber FROM cim.UnitaryComputerSystem u,zenworks.SystemInfo m,cim.ComputerSystemPackage s WHERE s.Antecedent=m.id$and s.Dependent=u.id$

  3. Retrieve all the software applications with their versions that are installed on the workstation 'SJOHN164_99_139_79.WS' registered under the 'NOVELL_AUS' tree. The query is as follows:

    SELECT m.name,m.version FROM cim.Product m,cim.UnitaryComputerSystem u,zenworks.InstalledProduct s,managewise.NDSName m1,managewise.Designates s1 WHERE (s.Product=m.id$and s.ComputerSystem=u.id$) AND (s1.Designation=m1.id$and s1.Host=u.id$) AND m1.label='SJOHN164_99_139_79.WS' and m1.tree='Novell_AUS'

  4. Retrieve the processor information for the workstation 'SJOHN164_99_139_79.WS'. The query is as follows:

    SELECT m.DeviceID,m.Family,m.Stepping,m.OtherFamilyDescription, m.MaxClockSpeed,m.Role,m.UpgradeMethod FROM cim.Processor m,cim.UnitaryComputerSystem u,cim.ComputerSystemProcessor s managewise.NDSName m1,managewise.Designates s1 WHERE (s.PartComponent=m.id$and s.GroupComponent=u.id$) AND m1.label='SJOHN164_99_139_79.WS'

  5. Retrieve the ID of the UnitaryComputerSystem used for the workstation 'SJOHN164_99_139_79.WS'. The query is as follows:

    SELECT s.host FROM managewise.NDSName m,managewise.Designates s WHERE m.label='SJOHN164_99_139_79.WS' and m.id$=s.Designation

  6. When you know the ID of the UnitaryComputerSystem for a particular workstation from the query as shown in query 5, query 4 can be modified as:

    SELECT m.DeviceID,m.Family,m.Stepping,m.OtherFamilyDescription,m.MaxClockSpeed,m.Role,m.UpgradeMethod FROM cim.Processor m,cim.UnitaryComputerSystem u, cim.ComputerSystemProcessor s u.id$=? and s.PartComponent=m.id$ and s.GroupComponent=u.id$

    Substitute the ID of the specified workstation in place of the ? value for u.id in the query.

  7. List the IP address, IPX address, and MAC address of all workstations in the database. The query is as follows:

    SELECT ip.Address, ipx.Address, mac.MACAddress FROM cim.IPProtocolEndpoint ip, cim.IPXProtocolEndpoint ipx, cim.LANEndpoint mac, cim.UnitaryComputerSystem u, cim.HostedAccessPoint s WHERE (s.Dependent=ip.id$ and s.Antecedent=u.id$) AND (s.Dependent=ipx.id$ and s.Antecedent=u.id$) AND (s.Dependent=mac.id$ and s.Antecedent=u.id$)

    Modify the same query to get the information for a specified workstation as follows:

    SELECT ip.Address, ipx.Address, mac.MACAddress FROM cim.IPProtocolEndpoint ip, cim.IPXProtocolEndpoint ipx, cim.LANEndpoint mac, cim.UnitaryComputerSystem u, cim.HostedAccessPoint s WHERE (s.Dependent=ip.id$ and s.Antecedent=u.id$) AND (s.Dependent=ipx.id$ and s.Antecedent=u.id$) AND (s.Dependent=mac.id$ and s.Antecedent=u.id$)AND u.id$=?

    Use the query as shown in query 5 to retrieve the ID of the specified workstation and substitute the ID in place of the ? value for u.id in the query.

  8. Retrieve the name and other properties of the drives on the hard disk of the specified workstation.

    SELECT m.DEVICEID, m.TotalSize, m.VolumeSerialNumber, m.Caption FROM zenworks.LogicalDiskDrive m, cim.UnitaryComputerSystem u, cim.SystemDevice s WHERE s.PartComponent=m.id$ AND s.GroupComponent=u.id$ and u.id$=?

    Use the query shown in query 5 to retrieve the ID of the specified workstation and substitute the ID in place of the ? for u.id$ in the query.