Browse Prior Art Database

Enforcement of object model subsetting rules through the use of triggers, referential integrity constraints, and additional columns within a relational database schema.

IP.com Disclosure Number: IPCOM000019360D
Original Publication Date: 2003-Sep-12
Included in the Prior Art Database: 2003-Sep-12
Document File: 11 page(s) / 69K

Publishing Venue

IBM

Abstract

Disclosed is a system for designing relational databases such that the subsetting rules of an application's object model can be enforced by the db2 database engine without the need for an application to execute rules checking routines. Avoidance of rules checking by the application saves the overhead related to the issuance of multiple SQL statements by the application.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 13% of the total text.

Page 1 of 11

  Enforcement of object model subsetting rules through the use of triggers, referential integrity constraints, and additional columns within a relational database schema.

   This invention solves the problem of having to enforce object model subsetting rules from within an application written against a db2 database. This invention proposes a solution that avoids rules checking code at the application level, and instead provides a way to allow the database engine to enforce object model rules related to subsetting.

The implementation of an object store by a relational database application involves the storage of object properties and data within a relational database. The relational database schema that is used to implement an application's object model typically reflects through its structure (i.e., table definitions, constraints, etc.) the rules governing the relationships between objects defined by the application's object model. It is with regards to the relational structures that can be used to implement and enforce the rules of an application's object model that this invention is proposing improvements from the obvious implementations.

A simple implementation of an object model within a relational database involves the definition of a table for every distinct type of object within the object model. The relationships between distinct types of objects are defined using referential integrity constraints (i.e., primary key - foreign key relationships) and relationship tables, depending on the cardinality of the relationships between object types.

An object model will sometimes involve subsetting rules similar to the following:

A type X object can reference a type Z object.

A type Y object can only reference a type Z object, if that type Z object is already

referenced by a particular type X object.

When object rules of the kind described above exist within an object model, the following approach is an obvious one to take:

Define a table, XX, to store the properties for objects of type X.

Define a table, YY, to store the properties for objects of type Y.

Define a table, ZZ, to store the properties for objects of type Z.

Define a table, XZ, to capture the references of type Z objects from type X objects.

Define a table, YZ, to capture the references of type Z objects from type Y objects.

Define a referential integrity constraint between table XX and table XZ.

Define a referential integrity constraint between table XZ and table ZZ.

Define a referential integrity constraint between table YY and table XX.

Define a referential integrity constraint between table YY and table YZ.

Define a referential integrity constraint between table YZ and table ZZ.


1.


2.


1.


2.


3.


4.


5.


6.


7.


8.


9.


10.

A visual representation of the above schema is as follows:

Page 2 of 11

XX

XZ

ZZ

YY

YZ

Figure 1: Obvious approach to object model rendering within a relational schema

The major problem with the above approach to defining a relational schema for the purposes o...