Hostname: page-component-78c5997874-dh8gc Total loading time: 0 Render date: 2024-11-10T15:24:25.816Z Has data issue: false hasContentIssue false

A Generalisation of Entity and Referential Integrityin Relational Databases

Published online by Cambridge University Press:  15 April 2002

Mark Levene
Affiliation:
Department of Computer Science, University College London, Gower Street, London WC1E 6BT, U.K.; (mlevene@cs.ucl.ac.uk)
George Loizou
Affiliation:
Department of Computer Science, Birkbeck College, Malet Street, London WC1E 7HX, U.K.; (george@dcs.bbk.ac.uk)
Get access

Abstract

Entity and referential integrity are the most fundamental constraints that any relational database should satisfy. We re-examine these fundamental constraints in the context of incomplete relations, which may have null values of the types "value exists but is unknown" and "value does not exist" . We argue that in practice the restrictions that these constraints impose on the occurrences of null values in relations are too strict. We justify a generalisation of the said constraints wherein we use key families, which are collections of attribute sets of a relation schema, rather than keys, and foreign key families which are collections of pairs of attribute sets of two relation schemas, rather than foreign keys. Intuitively, a key family is satisfied in an incomplete relation if each one of its tuples is uniquely identifiable on the union of the attribute sets of the key family, in all possible worlds of the incomplete relation, and, in addition, is distinguishable from all the other tuples in the incomplete relation by its nonnull values on some element in the key family. Our proposal can be viewed as an extension of Thalheim's key set, which only deals with null values of type "value exists but is unknown" . The intuition behind the satisfaction of a foreign key family in an incomplete database is that each pair $(F_i, K_i)$ of attribute sets in the foreign key family takes the foreign key attribute values over Fi of a tuple in one incomplete relation referencing the key attribute values over Ki of a tuple in another incomplete relation. Such referencing is defined only in the case when the foreign key attribute values do not have any null values of the type "value does not exist" ; we insist that the referencing be defined for at least one such pair. We also investigate some combinatorial properties of key families, and show that they are comparable to the standard combinatorial properties of keys.

Type
Research Article
Copyright
© EDP Sciences, 2001

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

S. Abiteboul, R. Hull and V. Vianu, Foundations of Databases. Addison-Wesley, Reading, MA (1995).
ANSI/X3/SPARC, Study group on database management systems, interim report. Bull. ACM SIGFIDET 7 (1975).
Codd, E.F., Extending the database relational model to capture more meaning. ACM Trans. Database Systems 4 (1979) 397-434. CrossRef
E.F. Codd, The Relational Model for Database Management: Version 2. Addison-Wesley, Reading, MA (1990).
C.J. Date, Referential integrity, in Relational Database: Selected Writings. Addison-Wesley, Reading, MA (1986) 41-63.
C.J. Date, Composite keys, in Relational Database Writings 1989-1991. Addison-Wesley, Reading, MA (1992) 467-474.
Demetrovics, J. and Thi, V.D., Relations and minimal keys. Acta Cybernet. 8 (1988) 279-285.
M.R. Garey and D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness. W.H. Freeman, New York (1979).
Härder, T. and Reinert, J., Access path support for referential integrity in SQL2. VLDB J. 5 (1996) 196-214.
Lerat, N. and Lipski Jr, W.., Nonapplicable nulls. Theoret. Comput. Sci. 46 (1986) 67-82. CrossRef
Levene, M. and Loizou, G., Null inclusion dependencies in relational databases. Inform. and Comput. 136 (1997) 67-108. CrossRef
M. Levene and G. Loizou, A Guided Tour of Relational Databases and Beyond. Springer-Verlag, London (1999).
Lucchesi, C.L. and Osborn, S.L., Candidate keys for relations. J. Comput. System Sci. 17 (1978) 270-279. CrossRef
D. Maier, The Theory of Relational Databases. Computer Science Press, Rockville, MD (1983).
Thalheim, B., On semantic issues connected with keys in relational databases permitting null values. J. Inform. Process. Cybernet. 25 (1989) 11-20.