GOCDB/PROM

From EGIWiki
< GOCDB
Revision as of 11:42, 17 November 2010 by Aesch (talk | contribs)
Jump to: navigation, search

This page is part of the GOCDB4 Architecture Documentation

PROM (Pseudo-Relational Object Model)

The PROM is a database model implemented on top of a standard database. PROM's main goal is to facilitate schema changes, without affecting existing software that uses the database or the existing stored data.

This is achieved by storing the relations in a set of database tables and enforcing these relations through an external API rather than querying the database directly.

Objects: Groups of Data

PROM group data together in objects, rather than in tables. Each object is of a specific type and each object from this type is stored in a specified database table. There is no limit to the number of different object types that can be stored in a single table provided that the objects contain identically formatted fields. A complete list of all the objects stored in the database can be found in a table named #TOBJECTS. Each object type is associated with a unique type number. A list of object types, descriptions of the type and associated type numbers can be found in the table #TOBJECT_TYPES.

Each object is assigned a global ID in the local database known as an object ID. This ID is stored alongside the individual data for each object in the associated data table.

An example from the GOCDB4 schema is as follows:

Example

TOBJECTS Table

This table stores a complete list of all the objects in the system by their unique object ID. It also contains a database ID to identify the object as belonging to this particular local database (allowing for distributed databases, more on that later), as well as an object type number. This table also stores the database ID that the type belongs to as well as date on and date off fields (more on these later too).

The following record refers to data about a particular user. This example will show how to find the type of an object and the associated data stored for this particular object.

COBJECTID CGRIDID CTYPEID CTYPEGRID CDATEON CDATEOFF
270 0 105  0 17-APR-09 09.31.16.000000 AM -


TOBJECTS_TYPES Table