I
J OACHIM B ISKUP
P RATUL D UBLISH
Objects in relational database schemes with functional, inclusion, and exclusion dependencies
Informatique théorique et applications, tome 27, no3 (1993), p. 183-219
<http://www.numdam.org/item?id=ITA_1993__27_3_183_0>
© AFCET, 1993, tous droits réservés.
L’accès aux archives de la revue « Informatique théorique et applications » im- plique l’accord avec les conditions générales d’utilisation (http://www.numdam.
org/conditions). Toute utilisation commerciale ou impression systématique est constitutive d’une infraction pénale. Toute copie ou impression de ce fichier doit contenir la présente mention de copyright.
Article numérisé dans le cadre du programme Numérisation de documents anciens mathématiques
Informatique théorique et Applications/Theoretical Informaties and Applications (vol. 27, n° 3, 1993, p. 183 à 219)
OBJECTS IN RELATIONAL DATABASE SCHEMES WITH FUNCTIONAL, INCLUSION,
AND EXCLUSION DEPENDENCIES (*) (x)
by Joachim BISKUP (2) and Pratul DUBLISH (2)
Communicated by C. CHOFFRUT
Abstract. - Objects are unique entiiies that are capable of independent existence. Objects are formally defined and characterized for relational database schemes with functional, inclusion, and exclusion dependencies. Object normal forms are developed and the décision problem for object normal forms is shown to be undecidable. The concept o f an object is generalized to that o f a high- order object for recognizing different views of the same set of real-world objects during the view- integration approach to database design, High-order objects are formally defined and characterized for database schemes withfunctional, inclusion, and exclusion dependencies. The récognition problem for high-order objects is also investigated.
Résumé. - Les objets sont des entités uniques qui sont capables d'existence indépendante. Les objets sont définis formellement et caractérisés pour les schémas de bases de données relationnelles avec des dépendances fonctionnelles, d'inclusion et d'exclusion. Les formes normales d'objets sont développées et le problème de la détermination des formes normales d'objets est prouvé indécidable.
Le concept d'objet est généralisé à des objets d'ordre supérieur ce qui permet de reconnaître différentes vues du même ensemble d'objets du monde réel pendant la phase d'intégration des vues dans la conception de la base de données. Les objets d'ordre supérieur sont définis formellement et caractérisés pour les schémas de bases de données relationnelles avec des dépendances fonctionnelles, d'inclusion et d'exclusion. Le problème de reconnaissance pour les objets d'ordre supérieur est aussi considéré.
1. INTRODUCTION
Database design theory aims at formally describing désirable properties of database schemes and at semi-formal methods to achieve such properties.
For relational database schemes Boyce-Codd normal form (BCNF) is such
(*) Received April 1991, accepted November 1992.
l1) Supported by Deutsche Forschungsgemeinschaft under grant Bi 311/1-2.
(2) Instituteur Informatik, Universitàt Rildesheinv Marienburger Platz 22, D-3200 Hildesh- eim, FRG.
email: [email protected].
Informatique théorique et Applications/Theoretical Informaties and Applications
a désirable property [15, 19]. Intuitively, BCNF expresses that all valid (non- trivial) functional dependencies are key dependencies. Although BCNF is a statement on the static structure of schemes, its motivation originates from avoiding so-called update anomalies. Several authors already studied how BCNF relates static structure and dynamic behaviour [3, 4, 12, 13, 14, 21].
In particular Biskup [4] argued that in the real world we ascribe two properties to an object:
— It is unique within the uni verse.
— It can émerge and exist independently of the current environment.
This notion of an object as being a unique entity, within a given universe, that is capable of independent existence was then formalized for a restricted class of schemes, namely relation schemes with functional dependencies.
Furthermore given a relation scheme (R, F ) , where R is a séquence of attributes and F is a set of functional dependencies on R, the problem of characterizing exactly when is X, X a subsequence of R, an object was studied.
For this purpose the notions of weak and strong independent existence were introduced and used to characterize weak and strong objects in terms of F.
Finally weak and strong object normal forms were defined and it was shown that there was a strong connection between these normal forms and the well- known Boyce-Codd normal form.
However, inter-relational semantic constraints were not considered in [4].
Inclusion dependencies [7, 18] and exclusion dependencies [8] represent two important types of inter-relational semantic constraints. Inclusion dependenc- ies can be used to capture the constraint that one set is a subset of another and exclusion dependencies can be used to capture disjointness of two sets. We use inclusion and exclusion dependencies to model inter-relational semantic constraints and formalize the notions of strong and weak objects for relational database schemes with functional, inclusion, and exclusion dependencies. We show that the définitions of objects given in [4] remain valid in the présence of inclusion and exclusion dependencies and characterize weak and strong objects in terms of the given functional, inclusion, and exclusion dependencies.
We use these characterizations to develop weak and strong object normal forms for database schemes. We show that, in gênerai, it is undecidable to test whether a given database scheme is in weak (resp. strong) object normal form. However, we give polynomial-time heuristics for these problems and also present a polynomial-time algorithm for checking whether a given data- base scheme with functional and inclusion dependencies is in weak (resp.
strong) object normal form.
OBJECTS IN RELATIONAL DATABASE SCHEMES 185
Given a relation scheme ( R1, F\ ), let XI be a subsequence of R1. It is possible that, when viewed in isolation, XI may not qualify as an object.
However, there may be another relation scheme <JR2, F2} sueh that {X\, X2}, where X2 is a subsequence of R2, can be treated as an object.
Intuitively, this happens when the existence of XI and X2 objects is depen- dent on each other but {XI, X2) is capable of independent existence. Such a scenario may occur during the view-integration approach to database design [2, 5, 8, 11] where R1 and R2 may represent two different views of the same set of real-world objects. During view-integration, it is désirable that different views of the same set of real-world objects be identified and replaced by a single global view. Thus, it is of interest to study and characterize such objects. We generalize the notion of an object to that of a high-order object and characterize exactly when is {XI, . . ., Xk), where Xi is a subsequence of Ri, l^z^/r, a high-order object. In particular, we defme the notions of weak, partially-strong and strong independent existence and use them to characterize corresponding high-order objects in terms of the specifïed func- tional, inclusion, and exclusion dependencies. We do not attempt to defïne normal forms for high-order objects since we feel that their présence is undesirable in a well-designed database scheme. We study the récognition problem for high-order objects and show that, in gênerai, this problem is undecidable. However, we present a polynomial-time heuristic for recognizing strong high-order objects and use it to dérive a polynomial-time algorithm for recognizing strong high-order objects in database schemes with functional and inclusion dependencies.
2. SOME DEFINITIONS
We give a brief set of définitions assuming some familiarity with relational database theory [15, 18, 19]. Let U be a finite set of attributes. If X and Y are séquences of attributes, we use X C\ Y to indicate the subsequence of X formed by removing those attributes that do not occur in 7, X=> Yto indicate that F is a permutation of a subsequence of X and X~~ Y to indicate the subsequence of X formed by removing all attributes that occur in Y, A relation scheme <( JR, F ) is composed of a séquence R of attributes from U such that no attribute repeats in R and a set F of functional dependencies (FDs) X^Y where R^X and R^Y. A relation r on R is a finite set of R- tuples, Le., tuples that are defined exactly for the attributes in R. The values of tuples are éléments of a countably infinité set of constants. For an R- tuple t, t[X] dénotes the subtuple of t defined on X only where XaR. A
relation r on R is an instance of < JR, F} if ail FDs of i7 are valid in r, f.e., for each FDX-+Y in F and for any two tuples t\ and tl in r, H [X] = ? 2 [X] => fl [ 7] = 12 [ Y].
Let RS = ((RUF1}9 . . ., (Rn, Fn}), where Ri = Rj^i=j, be a set of relation schemes. We do not assume any implicit inter-relational constraints through names of attributes. Hence, without loss of generality (wig) we assume that for each ueU there is atmost one /, l^if^n, such that R^u.
An inclusion dependency (ID) [7, 10, 18] on RS is a constraint of the form Rt[X]=>Rj[Y] and an exclusion dependency (ED) [8] on RS is a constraint of the form Rt[X] D Rj[Y] = 0 where | Z | = | r | , R^X and R^Y. Let rt(rj) be an instance of (Rt, Ft) ((RpFj)). Then the ID Rt[X]^Rj[Y]
(resp. ED Rt[X] D Rj[Y] = 0) is said to be valid if ^(r^ny^j) (resp.
^ ( r j Pl^y(^) = 0 ) ' A database scheme is given by D = (RS, I, E) where RS is a set of relation schemes, / is a set IDs on RS and £ is a set of EDs on i^S. A database d=(ru . . ., rn), where rf is an instance of (Ri9 Ft}, is an instance of D if each ID in / and each ED in £ is valid in d. We dénote the class of all instances of D by Inst(i)).
We feel that IDs and EDs should primarily be used to express inter- relational constraints, e.g., IDs can be used to express foreign keys and ISA hiérarchies, and EDs together with IDs can be used to express partitioning.
A simple example taken from the field of médical information Systems demonstrates how to express foreign keys and an ISA hierarchy with parti- tioning. This example, sometimes suitably extended or modifïed, will be considered throughout the paper. We fîrst express the application by an entity-relationship diagram:
identifving name j i Sex person
OBJECTS IN RELATIONAL DATABASE SCHEMES 187
foreign keys
Then we defme appropriate séquences of attributes in order to relationally represent the occuring entities and relationships:
PHYS = (IdPhys, DaPhys) PAT = (IdPat, DaPat) PERS = (ld, Sex) PAR = (Child, Parent) TREAT = (Pat, Phys, Type)
Finally we déclare the pertinent constraints:
- Functional dependencies:
IdPhys -> DaPhys IdPat -> DaPat ld -> Sex
Pat, Phys -> Type - Inclusion dependencies:
PAT [IdPat] 3 TREAT [Pat] 1 PHYS [IdPhys] ^ TREAT [Phys] ƒ PERS[Id]^PAR[Child] 1 PERS [ld] â PAR [Parent] J PERS [ld] 2 PHYS [IdPhys]
PERS [ld] 2 PAT [IdPat]
- Exclusion dependencies:
PHYS [IdPhys] O PAT [IdPat] - 0
Now the resulting database scheme (without the ED) can be graphically represented as foliows:
person entities
PAR
PERS foreign keys
ISA hierarchy with
parti tioning
PAT PHYS
TREAT
FDs, IDs, and EDs can interact among themselves and give rise to new dependencies [7, 8, 16]. This interaction may result in intra-relational IDs or EDs, Le., dependencies of the type R[X]^R[T\ or R[X]nR[Y] = 0- Sometimes, such interaction may result in EDs of the form R[X]nR[X]=^0 [%]. Such EDs are called vacuous and their effect is to ensure that the only possible instance of R is the empty relation. Note that if Rt is involved in a vacuous ED then any ED of the form Rj [Xj\ D Rt [J5fJ = 0, 1^1 = 1^1, is always valid. Such EDs are called trivial. An ID is said to be trivial if it is of the form R[X]^R[X], A trivial dependency whether it is an ID or an ED has not to be explicitly checked in verifying that a database is an instance. In the following we assume that / contains only non-trivial inter- relational dependencies and E contains only non-vacuous inter-relational dependencies.
Let F=FX[JF2. . ,{JFn then (F{JIUE) + dénotes the set of all FDs, IDs, and EDs implied by F{JIUE and (F\JIUE)f dénotes the set of all FDs, IDs, and EDs over Rt implied by F\JI\JE. Given a relation scheme (Rt, F(}, Ff is the set of all FDs over Rt that are implied by Ft. An attribute séquence Xt is said to be a key of Rt wrt D if the FDXi-^ RiSiFKJ I\J E)?. Similarly, Xt is said to be a key of (Ri9 Ft) if the FDXt -> RteFf. A key Xt is said to be minimal if no proper subsequence of Xt is a key.
3. OBJECTS
DÉFINITION (objects) [4]: An attribute séquence X is a strong object wrt D = {{ Ru Fx > , . . . , < ÜBS FH >, /, E) if there exists an i with i ? ^ Z such that the following properties hold:
O 1. (uniqueness) X is a key of Rt wrt D.
O 2. {strong independent existence)
For any instance d=(rx, . . ., rh . . ., r„)eInst(Z>) and for any .R.-tuple t, where t [X] $ nx (rt), t can be inserted into rt such that the resulting database X is said to be a weak object wrt D if O 1 and the following property hold:
O 2*. (weak independent existence)
For any instance d~{ru . . ., rt, . . ., rJelnst(Z)) and for any Z-tuple
$nx(ri) there exists an appropriate 7?rtuple t, such that t[X] = x, which can
OBJECTS IN RELATIONAL DATABASE SCHEMES 1 8 9
be inserted into rt to produce
d+=(ru . , . , r , U {'}».-•, r„)eInst(Z>).
In our médical example obviously the attribute séquence consisting of the single attribute ld is a strong object: ld is a key of PERS, and whenever an identification i has not been used before, i.e. z£7ild(PERS), then either sex s can be chosen to successfully insert the new tuple (i, s) into the PERS relation.
However if we modify the relation scheme PERS by replacing attribute ld by attributes PeNo, Name, Birth (for person number, (full) name, birthdate and birthplace, respectively) then we could consider both PeNo and the séquence Name, Birth as keys. In that case, assuming that the other schemes and dependencies are also modified accordingly, the attribute séquences PeNo and Name, Birth respectively are only weak objects. For instance if we want to insert a new pair of values (n, b) for attributes Name and Birth then we must appropriately chose a person number that has not been used before.
Now it is clear that the above définitions capture the uniqueness property of an object. Then scheme Rt serves as some kind of surrogate relation, the values of which may be referenced in other relations that typically express relationships with other objects or properties of spécifie subsets of objects (as described by an ISA hierarchy).
However, independent existence of an object has two facets: independent insertion and independent survival. Independent insertion —as directly expres- sed in O 2 — requires that any new X- value t [X], in terpre ted as a surrogate for a real world entity, can be inserted into the surrogate relation Rt where we can freely choose values for the additional attributes Rt~X, usually interpreted as some properties of the real world entity. In the weak version O2*, however, only the existence of appropriate values is guaranteed.
Independent survival —not explicitly mentioned in O 2 — means that an object tuple should not get deleted due to the deletion of any other tuple.
Formally, given d={rly . . ., rt, . . ., rrt) e Inst (D) and tert then the deletion of t from rt should result in an instance dt = (r[i . . . ., r\, . . ., rfn)elnst(D) such that the following conditions hold:
(i) tfrl.
(ii) r^r'p l < ^ n .
(iii) If some Xp Rj^Xj and l^j^i^n, is an object (strong/weak) then rj—r'j. I f s o m e Xh Rt^Xi3 i s a n o b j e c t t h e n r'i = ri— { t ) .
(iv) d' is maximal wrt the conditions (i)-(iii).
We claim that our définitions also capture the independent survival property. To see this, let rf=(r1? . . . , r£, . . . , rn)eIn$t(D) and let d~ = (rl3 . . ., r- — { t}, . . ., rn) where le r(. Note that the deletion of t cannot lead to the violation of any FD or ED in {F\JI\JE) + . However, if Rt[X]^Rj[Y] is a non-trivial ID in (F{JI\JE) + then this ID may not hold in d~. To ensure that this ID holds, we may have to recursively delete some tuple (s) from rj (namely if now t [X] is no longer an element of KX (r£) then we have to delete all t' e r-3 such that t [X] = t'[Y]) and this may in turn trigger off additional deletions. However, note that deletions are only required for those relations that occur on the right-hand side of some non-trivial ID in ( F U / U £ ) + . In what follows, we show that if X, R^X, satisfies O 1 and O 2 (resp. O2*) then R cannot occur on the right-hand side of any non- trivial ID in (F\J ƒ U E)*. Thus, our définitions also capture the independent survival property of an object.
We now attempt to characterize objects in terms of the dependencies specified for D. Let's first consider the effects of IDs and EDs on the defintion of an object. Let X be a subsequence of Rt such that Rt appears on the right- hand side (RHS) of a non-trivial ID Rj[Z\^Ri[7] in (F{J ƒ U E) +. Consider a database instance in which all relations are empty. Clearly, this instance is in Inst(Z)). Given this instance, the ID Rj f Z] => Rt [ Y] pre vents us from insert- ing any tuple in rt. Hence X is not an object wrt D since the properties O 2 and O2* are violated. Now consider the case when ( F U ^ U E )+ contains a vacuous EDRi[X]DRi[X] = 0. This ED ensures that rt must always be empty. Thus, no subsequence of R{ can be an object. It follows from the above discussion that an object Zmust satisfy the following properties:
A l . RtJ Ri^X, does not occur on the RHS of any non-trivial ID in A2. (F[J I[J E)+ contains no vacuous EDs involving Rt.
In our médical example property A1 states that only subsequences of scheme PERS can act as objects because all other schemes occur on the RHS of non-trivial IDs.
We now consider the problem of deciding if these conditions hold. Since the inference problem for FDs and IDs is known to be undecidable [9, 16], it appears that there is no algorithm for testing these conditions. In what follows, we show that this is not the case. Note that if Rt does not occur on the RHS of any non-trivial ID in (F\JI{JE)+ then Rt does not occur on the RHS of any ID in / (recall that / does not contain any trivial ID). Using this we show that in A 1 we can replace (FU I{J E)+ by / and that A2 is redundant.
OBJECTS IN RELATIONAL DATABASE SCHEMES 191
LEMMA 3 . 1 : Let D be a database scheme and let (Ri9 Ft} be a relation scheme in D such that Rt does not occur on the RHS of any ID in L Then Rt
does not occur on the RHS of any non-trivial ID in (F\J I{J E) +.
Proof: The proof is by contradiction. Let id be a non-trivial ID in (F\JI\JE)+ which has Ri on its RHS. Let d=(ru . . ., rh . . ., r„)eInst(Z>).
Let t be an R--tuple constructed by using distinct constants that do not occur in d. Since no tuple in rt matches with / on any attribute of Rt, ri \J {t} is an instance of < Ri9 Ft >. Let d+ = (ru . . ., rt U { t } , . . . , r„). It follows from the construction of / that each ED in E is valid in d +. Similarly, each ID in ƒ is valid in d+ since Rt does not occur on the RHS of any ID in L However, the ID id is not valid in d+ because the constants occuring in / do not occur in any tuple in d. Thus, id is not in (F{J I{J E)+ which is a contradiction. • CoROLLARY 3 . 1 : Let D be a database scheme and let < Rt, F£ ) be a relation scheme in D such that Rt does not occur on the RHS of any ID in L Then Rt does not occur in any vacuous ED in (F\J ƒ U E) +.
Proof: The proof of Lemma 3.1 shows that it is always possible to produce a valid instance by inserting a tuple in rt. Hence Rt cannot occur in any vacuous ED in (F\JI\J E) +. •
It turns out that if Rt does not occur on the RHS of any ID in I then the dependencies in I and E do not induce any additional FDs on Rt, z. e., each FD in (F\JI{J E)* is also in F*. This property in very useful since F* is computable whereas (F{JI{JE)* is not [9, 16]. In particular, it makes the problem of testing for property O 1 algorithmically tractable.
LEMMA 3.2: Given a database scheme D, let (Rh Ft} be a relation scheme such that Rt does not appear on the RHS of any ID in I. Then F* is the same as the set of FDs in
Proof; It sufiïces to show that each FDX^ Y which is not in F* is also not in (F{JI{JE) + . Let RHS(JQ= { Z : Z is a single attribute and X-> Ze Ff }. Let X+ be a séquence formed by using each member of RHS (X) exactly once. It follows from the proof of Lemma 3.1 and Corollary 3.1 that the instance d in which ^ = { ( 1 1 . . . ! ) } and all other relations are empty is in Inst(D). Let t be an jRrtuple such that t[X+]=\l. . .1 and t[Rt-X+]^Ö0. . .0. Consider the relation rt{J {t}. Since X^>Y$Ff9 Y is not a subsequence of X+. Thus X-> Y is not valid in rt[j{t}. It can be shown that each FD in Ft is valid in rt U {t} (see the proof of Theorem 7.1 in [19], p. 219-220). Since R( does not occur on the RHS of any ID in 7, all IDs in I are valid in d +. Since rt\J {t} is the only non-empty relation in d +
and E only contains non-vacuous inter-reiational dependencies if follows that each ED in E is valid in d+. Hence d+ elnst(Z)) but the FDX^ Y is not valid in rt. Thus, X-> Y is not in ( F 1 J / U £) +. •
With this background, we are ready to characterize weak and strong objects in terms of the dependency structure of D. We consider six conditions for X,
Ri^X:
C 1. (not referencing)
Ri does not occur on the RHS of any ID in /.
C 2. (not directly affected by partitioning)
If Ri[Z] occurs in a non-trivial ED in (F{JI{JE)+ then Z is not a subsequence of X.
C3. (minimal key)
X is a minimal key of <i^, F£>» z.e., Jïf-> RteF^ and Y-^R^F? for all C4. (Boyce-Codd normal form)
<i?i5 ^ > is in Boyce-Codd normal formai (BCNF), Le., ifZ^AsF^ and A is not a subsequence of Z then Z -> RteF* for all Z e ^ and ^4 c i?..
C5. (unique minimal key)
X is the unique minimal key of ( Rt, Ft >.
C 6. (not affected by partitioning)
Rt does not occur in any non-trivial ED in (F{J I{J E) +.
Conditions C3, C45 C5 deal with functional dependencies where C5 strengthens C3. Condition C l deals with inclusion dependencies. And conditions C 2 and C 6 deal with exclusion dependencies where C 6 strengthens C2.
Note that in gênerai we would have to provide a more complicated définition of BCNF in terms of FDs in ( ^ U / U ^ ) i+ rather than F+ only.
Since, however, we will consider BCNF only for schemes { i?i5 Ft ) such that Rt does not appear on the RHS of any ID in I Lemma 3.2 allows to use the presented version.
We first show that the conditions C1-C3 are basic in the sense that for each kind of object they necessarily hokL
LEMMA 3.3: If X, Rt^X, is a weak object then C 1, C2 and C3 hold.
Proof: The discussion preceding the postulation of A 1 and A 2 shows that if X is a weak object then C 1 must hold. We now use contradiction to prove that C2 also holds. Let X^Z and let Ri[Z\C\Rj[W] = 0 be a non-trivial
OBJECTS IN RELATIONAL DATABASE SCHEMES 1 9 3
ED in (F\JI\JE) + . Since this ED is non-trivial, (F{JIUE)+ contains no vacuous ED involving Rj and thus we may flnd an instance with non empty ry Arguing along the lines of the proof of Lemma 3.1 there actually exists d—(r1,...7 r(-, . . . , rp..., r„)eInst(D) such that r,. is not empty. Let wenw(r) and let x be an X-tuple such that x{Z\~w. If xenx(r^) then we dérive the necessary contradiction since the EDRi[Z]ORj[W] = 0 is not valid in d. If x^nx(r^ then it follows from O 2* that there exists an
*rtuple t> t [X\= x> s u c n t h a t d+ = 01> • • • > ri U { * }> • • • > O e I n s t O0)- Since i^[Z] ni^[flH = 0 is not valid in d+ we dérive the contradiction that this ED is not in (F{JI{JE) + . Finally we show that C3 also holds. Since we have proved that C1 holds, there is an instance d={ru . . ., ru . . ., rn)eInst(D) such that rt={u} and all the other relations are empty. Let YczX. We choose a suitable Jïrtuple / such that w[r] = ^[r]
but u[X~-Y]^t[X-Y]. Since t[X]$nx(rù, it follows from O2* that d+ = (ru . . ., r{ U { t},..., O G Inst (D). However, the FD Y-> Rt is not valid in (i+ and thus Y^Rt$F+. •
The basic conditions C 1 (not referencing), C 2 (not directly affected by partitioning), and C3 (minimal key) are not sufficient for being an object.
We get a sufficient condition for a weak object, however, if we add condition C4 (Boyce-Codd normal form). But an example in [4] demonstrates that condition C4 in turn is not necessary.
LEMMA 3 . 4 : If conditions C 1-C4 hold then X is a weak object.
Proof: Let d=(r1,..., ri9..., rn) e Inst (D) where r( is n o n - e m p t y
(Corollary 3.1). Let x^nx(rt) be an Z-tuple. We construct an 7^-tuple / such that /[X] = JC and the remaining attributes of t contain distinct constants that do not occur in d. Let d+ =(rl s . . . , rt U {t}, . . ., rn). We show that d+ e Inst (D) and hence X is a weak object. Note that each ID in (F\J I\J E) +
is valid in d+ since C l holds. We claim that each ED in (F{J/UE)+ is also valid in d+. To see this, assume that d+ violâtes some ED ed in (F\J I{J E)+. Since deinst (D) and d+ is obtained from d by only inserting t into ri9 it follows that jR; must occur in ed. Let ed bc R{[Y\ f^ R}[W] = 0.
Since de Inst (D) and t[Ri — X\ contains values that do not occur in d, it follows that X^ Y. But this is not possible since C2 is assumed to hold.
Finally we show that no FDs are violated in d*. Due to Lemma 3.2, it suffices to only consider the FDs in F*. Consider Z->AeF*, A is not a subsequence of Z, and assume that t and some tuple uert violate this FD.
Then u[Z]^t[Z] and, it follows from the construction of f, X^Z. Since
x{r^ Z c Z . It now follows from condition C3 that Z-^R^F^.
However, the BCNF-condition C4 implies that Z^> RteF*. Thus we dérive a contradiction. •
For strong objects the situation is less complicated. For we can give a set of necessary and suffîcient conditions for X to be a strong object. This set comprises the basic condition C1 (not referencing) dealing with inclusion dependencies, the strengthened condition C 5 (unique minimal key) and condi- tion C4 (Boyce-Codd normal form) dealing with functional dependencies, and the strengthened condition C 6 (not affected by partitioning) dealing with exclusion dependencies.
LEMMA 3.5: X is a strong object iffCl, C4, C 5 and C6 hold.
Proof: If: Let d={ru . . ., ri9 . . ., rn)eInst(D). Let t be any 7?rtuple such that t [X] $ nx (r£). We claim that d+ = (rl9 . . ., rt U { t } , . . . , rn) e Inst (D). C 1 and the fact that deinst (D) ensure that each ID in (F\JI\JE) + is valid in d+, Since (F{J I{J E)+ contains no vacuous ED involving Rt (Corollary 3.1) and C6 holds, it follows that each ED in (F U I U ^ )+ is valid in d + . We now show that C4 and C5 ensure that each FD in Ff is valid in rt U {t}.
To see this, let Z -> A e F* be violated by rt U { t}. Then there exists a tuple uert such that u and / violate this FD. It follows that t[Z] = u[Z\. The BCNF assumption C4 implies that Z-> ReF*. Now the unique minimal key assumption C5 implies that Z=>X. Thus t [X] = u [X] e nx (rt) which is a con- tradiction.
Only If: Since a strong object is also a weak object, the fact that C 1 holds follows from Lemma 3.3. To see that C6 also holds, consider the case when Ri[Y]r\Rj[W] = 0 is a non-trivial ED in (F\JI\JE) + . In this case, (F\JI\J E)+ contain no vacuous ED on Rr Thus there exists d=(ru . . ., rh . . ., r,-, . . ., rn)eInst(Z>) such that r; is non-empty. Due to Ri[Y] H ^•[W/] = 0 , it is not possible to insert any tuple t in rt such that / [7] e 7% (r,-). This violâtes property O 2 and hence we dérive the contradiction that X is not a strong object.
To verify C4, the BCNF condition, it suffices to consider the FDs in F*
because of the simplified définition of BCNF. Let Z -> A e F* where A is not a subsequence of Z. If Z^X then Z-> RisF* since X is a key of (Rt, F{).
We now show that the other case when X—Z^0 is impossible. Consider d=(rx, . . ., ri? . . ., rJelnst(D) where r; =={«}. Let v be an X-tuple where u[XDZ] = v[Xr)Z] but W [ £ ] # Î J [ £ ] for ail attributes B in Z - Z . Then v $ nx (rt). Select an i^-tuple w such that w [X] = v [X] and w [Z- X] = u [Z-X]
but w(B)^u(B) for ail attributes B in R^-XZ. It follows from O2 that
OBJECTS IN RELATIONAL DATABASE SCHEMES 195
d+ = (ru . . ., rt U { w } , . . . , r„) e Inst (Z>). Since ^4 is not a subsequence of Z, the tuples w and w violate the FDZ^> A which is a contradiction.
Finally we verify C5. Assume to the contrary that there exists another minimal key Z, Z^X. Then Z^> RteF*. Since X and Z are minimal keys, X-Z^0 and Z - A V 0 . Consider rf=(rl5 . . ., ri9 . . ., r„)eInst(D) where r£ = {u}. Let v be an /îrtuple such that u[X-Z}=£v[X~Z\ and
M[ i n Z ] = ï ) [ i n 4 Clearly v[X]inx(r£). Further, let v[Ri-X] = u[Ri-X\.
It follows from O 2 that d+=(ru . . ., r£U {f}, • • .9r„)eInst(D). However, since u[Z] = v[Z] the tuples u and t; violate the FD Z-+ Rt which is a contradiction. •
Now we can also formally verify that in our médical example the attribute sequende ld in scheme PERS is a strong object. Firstly we observe that the declared dependencies imply the following further non-trivial dependencies:
Child -> Sex Parent -> Sex
IdPhys -> Sex Phys -> Sex IdPat -> Sex Pat -> Sex TREAT [Pat] O TREAT [Phys] = 0
Secondly we check the conditions: PERS does not occur on the RHS of any declared ID (condition Cl), <PERS, I d ^ S e x ) is in BCNF (condition C4) with unique minimal key ld (condition C5), and PERS does not occur in any implied non-trivial ED (condition C6).
In the modified example the structure of implied functional dependencies is slightly more complex since PeNo and Name, Birth are both minimal keys and thus condition C 5 does not hold for PeNo and Name, Birth, respectively.
However we can easily confirm that both subsequences are weak objects:
condition C1 holds as before; PERS does not occur in any implied non- trivial ED and thus condition C2 trivially holds; both subsequences are minimal keys (condition C3) in PERS which is in BCNF (condition C4).
4. OBJECT NORMAL FORMS
Let D = « Ru Fx > , . . . , < Rn, Fn >, /, E) be a database scheme. We assume wig that each Ft only contains FDs of the form L -> R where R is a single attribute, R does not occur in L and L is minimal. Let X-» Y be an FD in Ft. It has been argued in [4] that by specifying this FD a designer intends to say that X must be an object wrt D, i.e., X-values should be unique and
should serve as surrogates for real-world objects. Note that if some Ft does not contain any FDs then R. itself can be regarded as an object.
We argue that by specifying an ID i^[X]=>i^[Z], i^j, the designer intends to say that no subsequence of Rj can be an object since in any instance the existence of tuples in rj dépends on the existence of tuples in r£. Note that this argument is valid, only for the case where a set of real-world objects is assigned to a single relation scheme. To see this, note that the inverse ID Rj [Z] ü RL [X] may also be specified and Rt and R. may represent two different views of the same object. In the next section, we shall develop the notion of high-order objects to handle such cases.
Now we consider both functional and inclusion dependencies and thus the argument of [4] has to be refmed as foliows. Specifying an FDX^> Y a designer intends to say that Zmust be an object provided Xis not a subsequ- ence of a scheme Rj that appears on the RHS of an inclusion dependency.
We now define
RHS(T)={Ri:Ri occurs on the RHS of some ID in 1}
and
IMS(F)={(X, f): If Ft is not empty then R^X, i ^ R H S ( Z ) and for some AeRt-Xwe have X-*AeFt. Otherwise X=Rt and Rt $ RHS (/) }.
D is said to be in strong (resp. weak) object normal farm (ONF) iff for each (X, i) e LHS (F), X is a strong (resp. weak) object wrt D, i. e., X satisfies O 1 and O 2 (resp. O 2*).
In our médical example the spécification of the functional dependencies makes the subsequences ld, IdPhys, IdPat, (Pat, Phys) and the scheme (Child, Parent) candidates of being an object. The spécification of the inclusion dependencies, however, says that only ld must be an object.
More formally:
RHS(/)-{TREAT, PAR, PHYS, PAT}.
The following set describes those (X, i) such that X is a candidate to be an object in Rt (where we identify i and Rt):
{(ld, PERS), (IdPat, PAT),
OBJECTS IN RELATIONAL DATABASE SCHEMES 197
(IdPhys, PHYS), ((Pat, Phys), TREAT), ((Child, Parent), PAR)}
Finally we have
LHS(F) = {(Id, PERS)}.
As we have seen above ld is an object indeed and hence the database scheme is in object normal form.
We now show that there is a strong connection between ONF and BCNF.
THEOREM 4.1: D is in weak ONF ifffor each (X, i) e IMS (F), (Rh jr.y is in BCNF and if Rt[Z] occurs in a non-trivial ED in (F^JIKJE)* then Z is not a subsequence of X.
Proof: If: Since < Ri9 Ft > is in BCNF and according to the presuppositions of this section, it follows that if (X, i) e IMS (F) then X is a minimal key of (Rt, Fty. Now, since the conditions C1-C4 are satisfied, the proof follows from Lemma 3.4.
Only If: Since X is a weak object, it follows from Lemma 3.3 that Ri satisfies C l and C2. Let Z-+A be a non-trivial FD in F*. It follows from the inference axioms for FDs [15, 19] that there exists an FD Y-± B in Ft
such that Z^Y. Thus (7, i)eLHS(F) since C l holds. Since D is in weak ONF, Y is a weak object. It now follows from Lemma 3.3 that Y -> Rt e Ft. Since Z ^ 7, Z -> Ri s F?. Hence, it follows that < Rh Ft > is also in BCNF. •
THEOREM 4.2: D is in strong ONF ifffor each (X, i) e IMS (F), (Rt, Ft) is in BCNF, X is the unique minimal' key of { Ru Ft ) and Rt does not occur in any non-trivial ED in (F \J I \J E) +.
Proof: The proof follows immediately from Lemma 3.5. •
We can easily verify that the database scheme for our médical example satisfies the stated conditions indeed. For we have seen above that (ld, PERS) is the single element of LHS (F), < PERS, ld -> Sex > is in BCNF with unique key ld, and PERS does not occur in any implied non-trivial ED.
We now consider the computational complexity of testing if a given data- base scheme is in weak (resp. strong) ONF. It turns out that these problems are undecidable in gênerai. We prove this assertion in two stages. We first
show that the following problem is undecidable:
THE VACUOUS-ED PROBLEM. — Given a database scheme D = ((RU F,),.. ., (Rn, Fn), 7, E), verify whether (F^JI{JE)+ contains a vacuous ED on some Rt, 1 ^ i^n. •
Next, we complete the proof by reducing the vacuous-£Z> problem to the problem of testing whether a given database scheme is in weak (resp. strong) ONF. We use the following restricted version of the implication problem for FDs and IDs to show that the v&cuous-ED problem is undecidable.
THE RESTRICTED IMPLICATION PROBLEM. — Given a database scheme 7) = « Ru Fr ), . . ., < JR„, Fn >, 7), such that Rn does not occur on the left-hand side (LHS) of any ID in 7, verify whether (F{JI)+ contains the
The following lemma shows that the restricted implication problem is undecidable.
LEMMA 4 . 1 : The restricted implication problem is undecidable.
Proof: We reduce the implication problem for FDs and IDs, which is known to be undecidable [9, 16], to the restricted implication problem. Let construct a new database scheme D = « Rl9 7^), . . ., < Rn> Fn >, < R, 0 >, 7 » where R is a new relation scheme and 1=1' U {Rn[Xn]=>R[Yl]}. Note that, by construction, R does not occur on the LHS of any ID in 7. We now show that (F\jry contains tó iff (F{JI)+ contains the
If: Suppose that (F\JIf)+ does not contain id. Then there exists a rf' = (r1, . . ., rJelnst(T)') such that nxl (fx)^^Xn(rn) d °e s n o t hold. Let r be a relation on R such that nY1 (r) = nXn(rn). Clearly, d~ (rl5 . . ., rm r) GInst (D).
Since d violâtes the IDRX [XI]^R[71], if follows that (F{JI)+ does not contain Rx [XI]^R[FI].
Only If: Since FKJI^FXJI', it follows that (F{JI)+ also contains id. It now follows from the transitivity axiom for IDs that (F[JI)+ also contains
Using the above lemma, we show
LEMMA 4.2: The vacuous-ED problem is undecidable.
Proof: We reduce the restricted implication probîem for FDs and IDs to the vacuous-£7) problem. Let D = « Rl9 Fx >, . . ., < Rn, Fn >, 7) such that Rn does not occur on the LHS of any ID in 7. Let id be the IDRX [X]^Rn[Y].
OBJECTS IN RELATIONAL DATABASE SCHEMES 199
We construct a new database scheme D' = « S, 0 >, < Ru Fx >, . . ., < Rn, Fn >, /', E') where S is a new relation scheme, F = I\j{S[W]siRn[Y\} and
^' = {7?1[JT|n^[^1 = 0 } . We now show that (F{JI)+ contains id iff contains a vacuous ££> on Rn.
If: Suppose that (F{JÏ)+ does not contain id. Since D has no ££>£, there exists d=(ru . . ., r„)eInst(Z>) in which rn is not empty and there exists a yeKy(rn) such that ƒ ^ ^ ( ^ î ) - We delete all tuples ? from rn such that *[y]^j>
to obtain r'n. Next, we construct an S-tuple s such that s[W] = y and claim that d' = ({s}, rl9 . . ., r^)eInst(£>')• To see this, note that S[W]^Rn[Y] and R1 [X] C\ S[W] = 0 are both valid in d'. Further, the deletion of tuples from rn does not lead to the violation of any ID in I' since Rn does not occur on the LHS of any ID in ƒ'. Since deinst(D), it now follows that d'e Inst (£>').
However, d' violâtes each vacuous ED on Rn and thus (F{JI'{JE')+ does not contain a vacuous ED on i^n.
If: Since (f1 U /' U E') ^ (i7 U /), it follows that if ( F l J / ) + contains zrf then (F U / ' U E*)+ also contains id. Since / ' also contains S[W]^Rn[Y], it follows that each d' = (s, rx, . . ., r j e l n s t (D') satisfies
nx (ri) H nw (s) => KY (rn). However, it follows from the £Z) in E' that
7ïx(ri) H ^jr(^) = 0 - Thus it follows that (F\J I' [J Ef)+ contains a vacuous ED on Rn since rn is always empty. •
We now reduce the vacuous-ED problem to the problem of testing whether a given database scheme is in strong (resp. weak) ONF. We first give the réduction to the strong ONF problem. Consider the following instance of the vacuous-£D problem. Given D = ((RU Fx > , . . . , (Rn, Fn), I, E), we wish to know whether (F{JIUE)+ contains a vacuous ED on Rx. Note that if R1 does not occur on the RHS of any ID in / then it follows from Corollary 3.1 that ( F U / U ^ )+ does not contain any vacuous ED on Rx. So we only need to consider the case when Rx occurs on the RHS of some ID in I To solve this problem, we construct a new relation scheme (Rn+1, Fn+1} such that Rn + 1 has the same number of attributes as Ru
( Rn+15 Fn+1 ) is in BCNF and it has a unique minimal key. We also construct relation schemes (Rn + h Fn + i}, 2^i^n, where each ( i ? „+ i, f „+ i) is a copy of (R^Fi}, i.e., it is obtained from (Ri7 Ft} by assigning new names to the attributes of R(. Consider D' = « i ï1, ^ >s . . ., <^«> ^.>>
<** + i, Fn+1 >, . . ., (R2n, F2n\ F, E') where
and
The following lemma shows that D' is in strong ONF iff (F{JIUF) + contains a vacuous ED o n ^ .
LEMMA 4.3: D' is in strong ONF iff (F{J I\J E) + contains a vacuous ED on Rx.
Proof: Recall that Rt occurs on the RHS of some ID in /. It now follows from the construction that each Rt and Rn + ii l^i^n, occurs on the RHS of some ID in ƒ'. Let F' = F U Fn +,. . . U F2n. Thus LHS(F') = {(Xn+l9 n+\):Xn + 1 is the unique minimal key of Rn+1}.
If: Since (F' U V U £")S(^U / U E), it follows that ( F U / ' U ^ )+ also contains a vacuous £Z) on i?^ Thus, Rn + 1 C\ R\ — 0 is a trivial £ZX It now follows from Theorem 4.2 that £>' is in strong ONF.
• Since D' is in strong ONF, it follows from Theorem 4.2 that i ? „Hn i ? i = 0 is a trivial £Z>. Hence (F1 {JI'\J Ef)+ contains a vacuous ED on Rn + 1 or a vacuous ED on i^. The former case is impossible by Corollary 3.1 since Rn+i does not appear in any ID of D\ and thus the latter case holds. We now claim that (F{J I{J E)+ also contains this vacuous ED. To see this, note that given any d=(ru . . ., rn) e Inst (D) we can construct d' = (ru . . ., rn, rB+l9 . . ., r2n) such that r1frVB + 1 = 0 and r£ = rB + i, l^i^n.
It is obvious that rf'e Inst (/)') and hence rx = 0 . Therefore, {F\JI\JE) + also contains a vacuous £Z) o n ^ . •
The following modification of the above réduction works for the weak ONF problem. Choose Rn+1 = XW and Fn+1^{X^W} where the number of attributes in X is the same as that in Rv Further, set E = E\j{Rn+1[X]f\R1 = 0}. The construction of Rn+h 2^i^n9 and I' remains unchanged. Then LHS (Ff) becomes {(X, n +1)}. Now, using Theorem 4.1 instead of Theorem 4.2, it is easy to see that D' is in weak ONF iff (F\J I\J E)+ contains a vacuous ED on Rx. Thus, we have shown
THEOREM 4 . 3 : Given a database scheme D = ((RX, Fx > , . . . , (Rn, Fn), ƒ, £ ) , it is undecidable to test whether D is in weak (resp. strong) O N F . •
In view of Theorem 4.3, it is of interest to develop heuristics for testing whether a database scheme is in weak or strong ONF. We now show that there exists a sound, but incomplete, procedure to test whether
OBJECTS IN RELATIONAL DATABASE SCHEMES 2 0 1
D = ((R1, F1 > , . . . , (Rn,Fn), I,E) is in weak (resp. strong) ONF. For weak ONF, this procedure can be obtained by modifying the statement of Theorem 4.1 as follows:
THEOREM 4.4 (Modification of Theorem 4.1): D is in weak ONF if for each (X, i) e LHS (F), < Rh Ft > is in BCNF and if Rt [Z] occurs in an ED in E then Z is not a subsequence of X.
Proof: It suffices to show that X is a weak object wrt D. Let d—(ru . . ., rh . . ., rn)eInst(/)) and let x$nx(ri). Let / be an 7?rtuple such that t[X]^x and t contains distinct constants, that do not occur in d, in the remaining attributes. Note that the insertion of t into rt does not violate any EDs in E since if Rt [Z] occurs in an ED in E then Z is not a subsequence of X. Now the arguments used in the proof of Lemma 3.4 can be applied to show that X is a weak object wrt D. •
Finally, a sound, but incomplete, procedure to test whether D = ((RU F1 ), . . ., (Rn, Fn}, I, E) is in strong ONF can be obtained by modifying the statement of Theorem 4,2 as follows:
THEOREM 4.5 (Modification of Theorem 4.2): D is in strong ONF if for each {X, i)eLHS(F), (Rt, Ft} is in BCNF, X is the unique minimal key of Rt and Rt does not occur in any ED in E.
Proof: Let d=(rli . . ., ru . . ., r„)6lnst(D). Since Rt does not occur in any ED in E, insertion of an arbitrary tuple in r- will not violate any EDs in E. Now the arguments used in the "If ' part of the proof of Lemma 3 . 5 can be applied to show that Xis a strong object wrtD. •
We now show that the conditions specified in Theorems 4.4 and 4.5 can be checked in polynomial time. It has been shown by Biskup et al. [6]
that given a relation scheme ( Rt, Fi > and Rt => X, it is possible to test in polynomial time whether X is the unique minimal key of (Rh Fty. It is also possible to check in polynomial time whether a relation scheme
< Ri9 Ft > is in BCNF (see Lemma 6.1 in [17] or Theorem 13.7 in [20]). Thus, we obtain
THEOREM 4.6: There exists a sound, but incomplète, polynomial-time proce- dure to test whether D^=((Rl7 F1), . . ., < Rn, Fn), ƒ, E) is in weak {resp.
strong) ONF. •
However, if we restrict ourselves to database schemes of the form D^(RS, /), Le.9 with no exclusion dependencies, then both these problems are decidable in polynomial time. To see this, note that to check if D is in
strong ONF it suffices to check that for each (X9 i)eLH$(F), (Ri9 F() is in BCNF and X is the unique minimal key of (Rh Ft}. Similarly, to check if D is in weak ONF it suffices to verify that < Ri9 Ft > is in BCNF for each (X, z)eLHS(F). Since we have already shown that these conditions can be checked in polynomial time, we obtain:
THEOREM 4 . 7 : Given a database scheme D — « Rl 9 Fx), . . ., < Rn, Fn>, / ) , it is possible to check in polynomial time whether D is in weak {resp. strong) ONF. M
5. fflGH-ORDER OBJECTS
In our study of objects, we only considered the case where a set of real- world objects is assigned to a single relation scheme. This assumption makes sense when the database scheme has been designed using a global point of view. However, in the view-integration approach to database design [2, 5, 8, 11], a designer starts with several user-views and attempts to integrate them into a single global view. During the intégration process, it is of interest to know whether a set of relation schemes actually represent different views of the same set of real-world objects. For example, consider a database scheme
/> = « * ! , in>, (R2,F2), {Rl[Xl]^R2[X2l R2[X2]^Rl[Xl]}) where XI (resp. X2) is a minimal key of R\ (resp. R2) wrt D and R 1 (resp. R2) is in BCNF. The two IDs ensure that nxl(rl) = nx2(r2) where (rl, r2)eInst(D), i.e., the surrogate values in r\ and r2 are always same.
Note that the insertion (resp. deletion) of an Xl-object must be accompanied by the insertion (resp. deletion) of the corresponding X2-object. Thus, we may regard {XI, X2 } as a high-order object. Hence, during the view intégra- tion process, we can replace D by D' = « R1 U R 2 - X2, F1 U FT » where FT is obtained from F2 by appropriately replacing the attributes of X2 by those oïX\.
Coming back to our médical example our database scheme could be the result of integrating a fïrst view dealing with treatments and a second view
OBJECTS IN RELATIONAL DATABASE SCHEMES 203 considering parenthoods.
trcatmentview: parenthood view:
AdentitVing namej
child parent
PERS = (ld, Sex) ld -> Sex CIT = (IdCit, SexCit) IdCit -> SexCit PAT = (IdPat, DaPat) IdPat^DaPat PAR = (Child, Parent)
PHYS - (IdPhys, DaPhys) IdPhys -+ DaPhys TREAT = (Pat, Phys, Type) Pat, Phys^Type
CIT [IdCit] ^ PAR [Child]
CIT [IdCit] 2 PAR [Parent]
PAT [IdPat] 2 TREAT [Pat]
PHYS [IdPhys] 2 TREAT [Phys]
PERS[Id]^PHYS [IdPhys]
PERS [ld] 2 PAT [IdPat]
PHYS [IdPhys] O PAT [IdPat] = 0
intégration constraints: PERS [ld, Sex] 2 CIT [IdCit, SexCit]
CIT[IdCit, SexCit] 2 PERS[Id, Sex]
In what follows, we formalize the notion of a high-order object. Let D = ((R\9,Fiy, . . ., (Rn, Fn}, I, E) be a database scheme. As usual, we assume that / only contains non-trivial inter-relational dependencies and that E only contains non-vacuous inter-relational dependencies. Let Ri^Xi, l^iSk, and \Xi\ = \Xj\9 l ^ i , j^k. We define {XI, . . ., Xk} to be a strong high-order object if {X1, . . ., Xk} is a maximal set with the following properties:
O 1. (uniqueness).
Xi is a key of Ri wrt D, l^i^k.
O 2. (equality).
Given any d—(ru . . ., rks . . ., r„)eInst(D) then
^ i ( > - i ) = ^ 2 < > 2 ) = • • • =nXk(rk).
O 3. (strong independent existence).
Given any d=(ru . . ., rfc, . . ., rn)elnst(D) and any Rj-twple tj such that tj[Xj]$nXj(rj) then for a// IW-tuples ti9 l^i^j^k, such that ti[Xi] = tj[Xj]
the instance
O4. (unit deletion).
Given any d=(r1, . . . , rk, . . ., r„) e Inst (D), consider any relation r,-, l ^ i j and let ^ e r j . Let f; = fj "{(,-}• Then there exists a member of Inst (D) in which r) occurs and each such member is of the form d~ = (r1-{t1}9 . . ., rj-{tj}9 . ..,rk-{tk},r'k+u .. ., ^) e Inst (D) where tieri and tt(Xi] = tj[Xj]9 1 gÏ^^fc, and rp ^ r'p, k+\Spûn.
{XI, . . ., Xk} is said to be a partially-strong high-order object wrt D if it is a maximal set for which O 1, O 2, O 4 and the following hold:
O3*. (partially-strong independent existence).
Given any d=(ru . . ., rk, . . ., rn)eIn$t(D) and any i?j-tuple tj such that tj[Xj]$nXj(rj), ISj^K then there exist appropriate i^'-tuples tb l^i^jSK where t-[Xi] = tj[Xj] such that
Obviously {ld, IdCit} is a partially-strong high-order object:
0 1 . ld -> Sex and IdCit -+ SexCit imply that ld is key of PERS and that IdCit is key of CIT.
0 2 . The intégration constraints ensure that ^id(pers) = 7rIdCU(cit) for any instance d=(per, cit, pat, phys, treat, par).
O3*. Let database <i=(per, cit, pat, phys, treat, par) be an instance and assume that for tuple t1 = (Id:ii Sex:.?), tx [Id] = z£rcId(pers). Defming t2 appropriately, namely by t2 = (IdCit:/, SexCit:s) we have fiPd] = /2Pd] and d+ = (pers U {tx}, cit U {t2 }, pat, phys, treat, par) is an instance. The anal- ogous observation holds if we start with t2.
O4. Using the same notations as above we now assume pepers. If we delete t1 from pers, t2 from cit, and every tuple in the other relations containing the key value i then we get the required instance d~. The analogous observation holds if we start with t2.
OBJECTS IN RELATIONAL DATABASE SCHEMES 2 0 5
{ld, IdCit} is not, however, a strong high-order object. For in inserting the tuple t1 into the relation pers we are not free to choose the SexCit component of t2 arbitrarily, on the contrary the key dependencies ld -> Sex and IdCit -» SexCit together with the intégration constraints require that the Sex and SexCit values associated with the key value i are identical.
Only if we dropped the attributes Sex and SexCit then {ld, IdCit} would be even a strong high-order object because then the above mentioned problem would disappear. This problem cannot be avoided, however, by considering {(ld, Sex), (IdCit, SexCit)} because in Section 3 we have already learnt that objects must be minimal keys.
{XI, . . ., Xk} is said to be a weak high-order object wrt D if it is a maximal set for which O 1, O 2, O 4 and the following hold:
O 3**. (weak independent existence).
Given any d=(rx, . . ., rk, . . ., r„)eInst(Z>), let x$nxl(r^), l^jz^fc. Then there exist appropriate i?z-tuples t{, X^i^k, satisfying ^[Xz] = x such that
d+-{rx U{tx}9 . . ., rk\j{tk}> rk+u . . ., rn)eIn$t(D).
If we modify the relation schemes PERS and CIT by replacing attribute ld by attributes PeNo, Name, Birth and attribute IdCit by PeNoCit, NameCit, BirthCit (as already discussed in Section 2) and if we further assume that all schemes and dependencies are also modified accordingly and if we then use
PERS [Name, Birth] ^ CIT [NameCit, BirthCit]
CIT [NameCit, BirthCit] 2 PERS [Name, Birth]
as intégration constraints, then {(Name, Birth), (NameCit, BirthCit)} would be a weak high-order object.
We now argue that the above définitions also capture the independent survival property, Le., if {XI, . . ., Xk} is a high-order object then given any d=(ru . . ., rk, rk + 1, . . ., rn)eInst(D)9 the deletion of any tuple from some rt, k+l^i^n, should not cause the deletion of any tuple from rp
1 tïjt^k. The argument is essentially the same as that for objects (Section 3).
We shall show [see condition C 1 (a) below] that if {XI, . . ., Xk} is a high- order object then (F{JIUE) + , where F=Fl U - • . \JFn, contains no IDs of the form R[Y] 2 Rj[YJ\ where R${Rl, . . ., Rk}. Thus the deletion of a tuple from some rh k+ 1 ^ z ^ n , will never result in the deletion of a tuple from any rp 1 Sj^k.
In the future, we use the term high-order object as a generic term to dénote a strong, partially-strong or weak high-order object. We now attempt to