Constraint Maintenance Using Generated Methods in the P/FDM Object-Oriented Database


S.M. Embury, P.M.D. Gray and N. Bassiliades


Abstract: We discuss the use of code-generated methods in Prolog as a flexible and efficient way to implement complex semantic constraints in an OODB. We introduce a high-level constraint language CoLan, based on functions and sets and including range quantifiers, from which fragments of code are generated to check the constraints. These fragments are attached to slots in class descriptors, and are also inherited (constraints cannot be overridden). Thus many fragments can come from one constraint and one slot may have attached fragments from many constraints. Constraints can be selectively disabled or removed which causes inhibition or disabling of corresponding fragments. This overcomes many objections to implementing constraints through methods. We have prototyped it by using the metaclass facilities of ADAM to initiate code generation. We are now re-implementing it in P/FDM, using changes to metadata (P/FDM does not have full metaclasses). This will incorporate a transaction mechanism and also provide queries on constraints. This approach opens a number of interesting future directions.

Keywords: Semantic Integrity Constraints, Object-Oriented Databases, Functional Data Model, Constraint Compilation, Incremental Constraint Checking, Meta-Data

Appeared in: N.W. Paton and M.H. Williams (Eds.), Rules in Database Systems: Proceedings of the 1st International Workshop on Rules in Database Systems, Edinburgh, Scotland, 30 August- 1 September 1993, Workshops in Computing Series, Springer-Verlag, 1994, pp. 364-381

Available: Hardcopy on request from the authors. Click here to download the PostScript file (size 53KB).

Relevant Links: Home page of the CoLan system.




Department of Informatics Home Page

LPIS Group Home Page


For any comments regarding this page contact Nick Bassiliades.