Database Definition Services

There are two object servers that are used within dbObjects to define a database. One is used to define connection specifications when accessing a MultiValue (Pick) Database system. This is the MultiValue Server Definition (MSD) object server (VPMsd20.dll). The second is a general Database Definition server (VPVdd20.dll) and is used to define a “virtual” representation of any database source, including Relational Database systems and MultiValue (Pick) Database systems. This is why this component is known as a Virtual Database Definition object or VDD. Both MSD and VDD servers are available as an in-process dynamic link library.

MultiValue Server Definition Objects (MSD)

A MultiValue Server Definition (MSD) object is used to describe how to connect to a MultiValue (Pick) database source. It identifies the type of communication protocol to use when making a connection. This can be a serial connection or one of two types of network connections (TCP/IP or SPX/IPX). Once a type of communication is chosen, this object also defines the necessary parameters, settings, and scripting to connect to the MVSERVER account on the target computer system and startup the Vantage mvServer software. To help in defining these MSD objects, dbObjects also includes a utility program (VPMsdm20.exe). This program, using the MultiValue Server Definition object Server (VPMsd20.dll), can be used to create and maintain MSD objects that hold connection information about a given MultiValue (Pick) database system. These MSD objects support serialization for persistent storage to a disk file. They are stored with an .msd file extension. The utility program can be used to build new MSD objects and maintain existing MSD objects. When creating a new MSD object you can use a series of predefined template objects (.mst) as a basis for the new object. These template objects cover most of the types of MultiValue database systems you will encounter with definitions for each type of communication protocol. With the utility program you can even create and maintain your own template object for future use. The following figure is an image of the MSD maintenance utility program:

Some of the more important properties and methods of the MultiValue Server Definition objects include the following:

Generic properties and methods:

Property Description
Load (Method) Open a file that represents the persistent storage of a Database Server Definition (MSD) object.
Name Name of the MultiValue Server Definition (MSD) object. Used as a file name for saving the MSD as a persistent object.
Path Path where persistent version of MultiValue Server Definition (MSD) object was opened from, or is saved to.
Description Description of the MultiValue Server Definition (MSD) object.
CreationDate Return the date the MultiValue Server Definition (MSD) object was created.
IsTemplate Determines if MultiValue Server Definition object is a template object (MST).
ConnectionType The type of connection to use when accessing the source database system.
OpenScript Connection script to use when establishing a connection to the source database system.
CloseScript Connection script to use when closing a connection to a source database system.

Properties for Serial connections:

Property Description
ComPort Serial communication port setting to use when accessing the source database system.
BaudRate Serial connection baud rate setting to use when accessing the source database system.
DataBits Serial connection Data Bits setting to use when accessing the source database system. Can be seven or eight.
StopBits Serial connection Stop Bits setting to use when accessing the source database system. Can be one or two.
Parity Serial connection Parity setting to use when accessing the source database system. Can be None, Odd, Even, Mark, or Space.
FlowControl Serial connection Flow Control setting to use when accessing the source database system. Can be None, XonXoff, DTR, or RTS.

Properties for Network Connections:

Property Description
ServerName Network Server Name or IP address of the source database computer system.
ServerPort Server Port of the source database computer system.

Virtual Database Definition Objects (VDD)

The highest-level object supplied by the generic Database Definitions Server is the Virtual Database Definition object (VirtualDatabase). This object holds a collection of Table objects (Tables). Each Table object (Table) holds a collection of Field objects (Fields) and a collection of Index objects (Indexes).

The Virtual Database Definition object (VirtualDatabase) is the one object that a programmer directly creates in code. All other objects such as tables, fields, or indexes are created through methods of objects higher up within the hierarchy of objects. Below is a figure that shows the relationships between the different objects that comprise the Database Definition Server:


Click image to expand

Virtual Database Definition (VDD) objects are used to describe database sources, how to connect to a database source, and the application programming interfaces (APIs) and appropriate primary object layer to use when accessing these database sources. To help in database access management, dbObjects also includes a database definition or dictionary repository utility program (VPVddm20.exe). This program, using the Virtual Database Definitions Server (VPVdd20.dll), can be used to create and maintain VDD objects that hold metadata about database systems. These VDD objects support serialization for persistent storage to a disk file. They are stored with a .vdd file extension. The following figure is an image of the VDD maintenance utility program:


Click image to expand

The utility program can be used to maintain VDD objects that define connections to a given database, reads in existing database dictionaries or schema, automatically creates symbolic references for all tables and fields, and matches database definition fields with Data Definition object references (DDOs are part of the Power Strings product from VantagePoint Software). When working with SQL, symbolic names are used by the database operation objects of dbObjects, rather than real database source names, to facilitate dynamic runtime binding. A developer can create one or more synonym names for any symbolic table or field name, matching them with corresponding table and field names in other source databases. This is important if applications need to be portable or scaleable between different database sources.

As an example of symbolic naming, a field representing a customer’s phone number might be defined in a dBASE or FoxPro database as “CUST_PHONE”, at ordinal position 4 within a record, with a “Character” or string data type. In a Microsoft Access database, the same field might be defined as the “Customer Phone” field, at position 7, with a “Numeric Long Integer” data type. A common symbolic name of “CustPhone” could be created which references this field, in either source database, and would be used with the objects of dbObjects when programming a client application.

Virtual Database Definition (VDD) objects, as maintained by the Definition utility program (VPVddm20.exe), also stores the type of underlining database (i.e. Access, SQL Server, Oracle, MultiValue, etc.), the type of Application programming interface (API) along with the primary object layer used to operate against the database (i.e. DAO, ADO, or the Vantage mvServer protocol), and any connection parameters and location information for the database. Once define, these VDD objects are “attached” to database objects provided by the Database Operation Services DLL (VPDb20.dll) during runtime.

 


Back to Objects and Services Overview

For additional information or to order a copy of mvComponents Suite 2.0 and arrange for a consultant, please send an E-mail to:

info@vpsoft.com

For VAR requirements and pricing please send E-mail to:

support@vpsoft.com