A Relational Algebra for Complex Objects Based on Partial

0 downloads 0 Views 320KB Size Report
by using the operations of forming records (includ- .... called respectively Hoare, Smyth and Egli-Milner ..... use constructors such as record and variant (in this.
A Relational Algebra for Complex Objects Based on Partial Information Leonid Libkiny Department of Computer and Information Science University of Pennsylvania, Philadelphia, PA 19104, USA

Abstract

the data structure and, therefore, allows us to extend the main principles of relational databases to much more general constructions. Use of domain theory in the generalization of relational databases may also help to establish the connection between data models and types, i.e. to represent database objects (not necessarily relational databases) as typed objects in programming languages.

We study an approach to relational databases which treats relations not as subsets of a Cartesian product but as subsets of some domain { a partially ordered space of descriptions. This approach permits generalizations of relations that admit null values and variants. In previous work it was shown how to de ne the notion of a relation scheme in such a setting. Here we provide a characterization of a scheme that is more general, and show that operations analogous to projection, selection and join retain the desired properties. Schemes also allow us to develop dependency theory for such generalized relations. An extension of this model is described which admits a set constructor and is therefore useful for the study of higher-order relations and their generalizations.

There have been made a number of attempts to generalize relational databases giving up the rstnormal-form assumption, see [1, 4, 6, 9, 10, 13, 16, 17, 18, 20]. They can be divided into two categories. The rst one consists of models that do not contain sets. Usually it means that they admit null-values and/or record structures, the latter including also case, or discriminated union. In this case [5] provides us with the idea how to develop the relational theory. We will discuss in details the main de nition of scheme which was used to introduce projections. The de nition of scheme along with the idea to represent database objects as antichains in domains is the main tool to generalize relational databases that was used in [5]. But the de nition of scheme in that paper was chosen rather arbitrarily in order to make certain properties of the rst-normal-form relational databases generalize smoothly.

1 Introduction

It has recently been discovered [5] that a representation of the underlying principles of relational database theory can be found in the theory of domains which is the basis of the denotational semantics of programming languages. This representation does not take into account the details of Another de nition of scheme will be introduced  This paper was published in the Proceedings of the 3rd which seems to be more natural and then it will Symposium on Mathematical Fundamentals of Database be proved that the main results of [5] remain corand Knowledge Base Systems, Rostock, Germany, May rect if we substitute the de nition of scheme. We 1991, Springer Lecture Notes in Computer Science, 495 will also show that the de nition of [5] assumes (1991), 29-43. y Supported in part by NSF Grants IRI-86-10617 and that a database is like- rst-normal-form, that is, the domains in which the two de nitions coincide, CCR-90-57570 and ONR Grant NOOO14-88-K0634. 1

behave like domains of relations that do not admit be generalized as nite antichains in domains. For relation-valued attributes. such generalized relations a concept of scheme was introduced which allowed the development of some For the structures that do not contain sets we dependency theory (in fact, the analogy of funcwill discuss the concept of the complement of a tional dependency was introduced). A generalizascheme. This concept is necessary in order to tion of the join operation was also given. introduce multivalued dependencies. Multivalued dependencies having been introduced, we may try In this paper we rst examine the concept of to de ne join to generalize the result that estab- scheme and give a new de nition of scheme which lishes connection between joins and multivalued expresses the fact that projections of complete dedependencies [24, 16]. The concept of join for the scriptions onto a scheme are maximal among all domain model was introduced in [5] as a supre- possible projections. This de nition is more genmum in the Smyth powerdomain ordering [22]. eral than that of [5] and, although the two de We will show that in a certain type of domains nitions coincide if we speak of the domains of at multivalued dependencies are in one-to-one corre- records (that is, of usual relations), there are some spondence with the decompositions of relations. important cases when we need this new, more general de nition. Moreover, the new de nition satisThe model proposed in [5] does not admit con- es almost all properties that were proved in [5]. structions containing sets. However, they are nec- When the concept of scheme is de ned, we can essary in order to describe some models which introduce the operations of relational algebra for are being widely studied now, namely nested re- the generalized relations and prove some results lations [6, 13, 16, 17, 18, 20] and complex objects about these operations. Then we de ne comple[1, 13] which play an essential role in the theory of ments of schemes and use them to introduce mulobject-oriented databases [2]. By complex objects tivalued dependencies for our domain model. The we mean objects constructed from the basis ones approach of [5] did not provide tools to work with by using the operations of forming records (includ- complex objects or nested relations since they may ing discriminated union) and sets, i.e. record, vari- contain sets whose sizes are not bounded a priori. ant and set constructors. This concept will cover We will extend the ideas of [5] to handle such conall the structures that do not contain sets, and also structions. nested relations and complex objects as they were de ned in [1]. However, constructions containing The paper is organized in ve sections. The next sets can not be modeled by domains. In fact, we section contains necessary de nitions from domain can not guarantee directedness. In this paper we theory [8, 21] and shows how relational databases will introduce a new concept generalizing domains can be represented and generalized in domains. (i.e. locally behaving as domains) which allows us The third section deals with schemes in domains. to model complex objects. The schemes will be Two ways to introduce this concept will be disde ned recursively. cussed and the properties of schemes will be studied. In particular, we will characterize domains in When the concept of scheme is de ned, we can which the two de nitions coincide. Section 4 deals easily de ne projection onto this scheme and se- with structures that do not contain sets. We charlection. This is the crucial step in extending the acterize schemes in these structures and introduce ideas of relational algebra to generalized relations projection, selection and join. Having done this, and complex objects. we develop some dependency theory in section 5. Section 6 deals with the extension of our approach This paper can be viewed as an extension of to complex objects. We will generalize the concept ideas of [5], that is, as the further development of of domain in order to model these structures and domain-theoretic model of databases. The main then recursively de ned schemes. contribution of [5] is the idea that relations can 2

2 Powerdomain model of relational databases : Generalized relations

all elements of V are incomparable. The set of functions from L to V?, denoted by L ! V?, is ordered according to the above rule. For example, if d1 and d2 are as in the above example, L = fName; Dept; Oceg and V contains names of departments, people and numbers of oces, then d1 ; d2 2 L ! V? since d1 = fName ) ?; Dept ) 0CIS0; Oce ) 0 1760 g. Obviously d1  d2 .

In denotational semantics of programming languages expressions denote values, and the domains of values are partially ordered. A database is a collection of objects having descriptions and meanings. The meaning is the set of all possible objects described by a description. The meaning having been de ned as sets, we can order descriptions by saying that a description d1 is better than a description d2 if it describes less objects, i.e. if it is a more precise description.

Let D = L ! V?. Then the ordering of D satis es the following properties: 1) Every nonempty subset of D has a greatest lower bound; 2) Every directed subset of D has a least upper bound; elements of D forms Let [ d] stand for the meaning of d. Suppose that 3) The set K (D) of compact 1 d1 and d2 are the records in a relational database a countable basis of D. and A poset (partially ordered set) satisfying 1)-3) is 1 = fDept ) CIS Oce ) 176 g called a Scott-domain [8, 21]. We do not use any other kind of domain, and we will write simply 2 = fName ) Howard Dept ) CIS Oce ) domain instead of Scott-domain. 176 g Least upper and greatest lower bounds will be deAssume that there are no attributes except for noted by _ and ^ respectively. "x and #x are the name, department and oce. Then the meaning principal lter and ideal of x 2 D, i.e. the set of of d1 is the set of all possible records that refer to all elements of D which are greater (less) than x. CIS people in oce 176, in particular, d2 . There- Given a domain D, every element of D is bounded above by some element of Dmax , the set of maxifore, d2 is better than d1 because [ d2 ]  [ d1 ] . mal elements of D [8, 21]. Elements of Dmax are The above ordering corresponds to the usual one thought of as being complete descriptions. Therein the theory of databases with incomplete infor- fore [ d] = "d \ Dmax . mation, in fact, to the ordering of tuples of Codd tables [10]. This approach is based on the assump- A domain is called distributive i every #x is a distion that we do not distinguish two di erent occur- tributive lattice. We will call a domain qualitative rences of null values in contrast to the approach i every #x is a Boolean lattice2 . of [4]. The same idea of ordering was used for A number of ways have been described in [5] to complex objects in [1]. construct domains representing certain kinds of Suppose that the records in a relational database data structures. Consider the domain L ! V?. are described as functions from L to V? where Its elements are records whose attributes are eleL is a set of attributes (in the above example ments of L and values are taken from V?. It means L = fName; Dept; Oceg) and V? is a domain of values which is partially ordered. Then the 1 A subset of a poset is called directed if all its nite records are also partially ordered by d1  d2 i subsets have leastW upper bounds. An element is called if  implies  for some 2 for d1 (l)  d2 (l) for all l 2 L where d1 ; d2 : L ! V?. compact any directed . A subset  D is called a basis if every 0

d

d

0

0

0

0

0

;

0

;

0

0

0

;

;

:

a

a

X

X

a

x

x

X

K

element of D is a supremum of some elements from

[3].

Let V? = V [ f?g where ? corresponds to in- 2 It is not hard to show that this de nition is equivalent complete information and 8v 2 V : ?  v while to the usual de nition of a qualitative domain [7]. 3

K

ordered by v[ or v] are distributive lattices (however, they are not complete).

that there are a countable number of values and a special symbol ? corresponding to incomplete information. The ordering of V? is given by letting ? be less than any other value. The relations are nite sets of records, i.e. nite subsets of L ! V?. However, not every nite subset of L ! V? corresponds to a relation. If we have a subset containing both d1 and d2 from our example, d1 is less informative than d1 and should be removed. Less informative here means that d1  d2 . Therefore, relations correspond to nite subsets of domains that do not contain comparable elements, i.e. to antichains. This gives us the main idea of the generalization of relational databases proposed in [5]: Generalized relations are antichains in domains.

The ordering v[ was used in the theory of relations with incomplete information to construct so-called representation systems, see [10]. When applied to an element of domain and a relation, this ordering expresses the notion of \x-belong" used for representation relations with null values by extended relations, see [25]. It was also used to order complex objects in [1]. A downward closed subset of a domain D which is closed under existing joins is called a strong ideal4 . If I  D is a strong ideal, then pI de ned by

_

pI (x) = fy : y  x and y 2 Ig

Example 1 Let L and V be as in the above examples. Let d3

d4

is a projection, i.e. it satis es the following properties: for all x; y 2 D : pI (x)  x, pI (pI (x)) = pI (x) and x  y implies pI (x)  pI (y). Moreover, pI is the unique projection on D with image I .

= fName ) Katherine Dept ) SL Oce ) 628 g 0

0

0

0

0

;

0

;

;

= fName ) Katherine Dept ) SL Oce ) ?g Strong ideals can be equivalently described via 0

0

;

0

0

;

;

projections onto them or their sets of maximal elements. In the other words, there are one-toone correspondences between sets of strong ideals I  D, projections pI and antichains of maximal elements of I .

(d4 shows that the person has not been assigned an oce yet). Then fd2 ; d3 g is a generalized relation but both fd1 ; d2 g and fd3 ; d4 g are not since d1  d2 and d4  d3 . 2

We will call nite antichains in domains relations. Example 2 Let L, V and di 's be as in the above By relations without incomplete information we examples. Let mean nite antichains of maximal elements, i.e. I = ffName ) Dept ) ? Oce ) ?g j 2 V g 1 relations containing only complete descriptions. Then I1 is a strong ideal and for any We have shown so far how to order records of re= fName ) 1 Dept ) 2 Oce ) 3 g lations. The next problem is to order relations themselves, i.e. to order nite antichains of do- its projection onto I1 is mains. In domain theory three ways to do this 1 ( ) = fName ) 1 Dept ) ? Oce ) ?g have been proposed: The set of maximal elements of I1 is ffName ) A v[ B i 8a 2 A 9b 2 B : a  b v; Dept ) ?; Oce ) ?g j v 2 Vg. A v] B i 8b 2 B 9a 2 A : a  b Let I2 = #d where d 2 L ! V?. Then I2 is a \ [ ] strong ideal with unique maximal element d and A v B i A v B and A v B 0 0 0 2 called respectively Hoare, Smyth and Egli-Milner for any d 2 L ! V? : pI2 (d ) = d ^ d . orderings3. Sets of nite antichains of a domain 4 The term strong ideal was used in [5]. A more precise v;

d

pI

;

v ;

d

v ;

v

v ;

?

:

v

;

:

name would be downward closed subdomain, suggested by

3 The orderings v[ and v] are known from lattice the- Carl Gunter. However, we follow the terminology of [5]

here.

ory [3].

4

3 Schemes in domains

We need more for the analogy of projection in relational algebra than being a projection onto strong ideal. In fact, this ideal must satisfy some additional properties. In domain L ! V? schemes correspond to subsets of L, i.e. a projection onto scheme corresponding to S  L is given by pS (x) = x0 where x0 (l) = x(l) if l 2 S and x0 (l) = ? otherwise. These projections will be called canonical. It is a natural requirement for the de nition of scheme and projection in an arbitrary domain that the projections be canonical for domain L ! V?. One can easily see that for every x 2 L ! V? the ideal #x is strong while the projection p#x is not canonical.

The main aim of this section is to discuss the de nition of scheme in domains. The relations having been interpreted as antichains in Scott-domains, the concept of scheme is necessary in order to introduce an operation analogous to projection in the relational algebra. In the domain L ! V? schemes correspond to the subsets of L and projections to the canonical projections. It is natural to de ne the concept of scheme such that, being applied to L ! V?, it will give rise exactly to canonical projections. Also, schemes should be signi cant parts of a domain which re ect the structure of the whole domain. It means that if the elements of a domain are treated as database objects (for example, records of relations) then projection into an ideal generated by a scheme should correspond to loosing some piece of information and the same pieces of information are lost for all the elements of the domain. This means that projections generated by schemes are in a way homogeneous.

The slide condition was introduced in [5] in order to give a de nition of scheme. A strong ideal I is said to satisfy the slide condition if for any x 2 D and y 2 I , pI (x)  y implies that x_y exists. This property obviously holds for canonical projections in L ! V?. An antichain S  D was called a scheme in [5] S if #S = x2S #x is a strong ideal satisfying the slide condition. It can be easily concluded from the results of [5] that all schemes of L ! V? are determined by canonical projections. In [5] the main properties of schemes were studied and the schemes were used to develop some dependency theory.

If we have two maximal elements of a domain (complete descriptions) and they are projected into a scheme (i.e. the same pieces of information are ignored) then the projections can not be This observation leads us to the folIn the next sections we discuss in detail the con- comparable. cept of scheme and introduce an alternative def- lowing de nition. inition which will allow us to prove most of the De nition Let D be a domain and S an antichain results from [5] and further develop the ideas of in D such that #S is a strong ideal. Then S is that paper. This will allow us to introduce the called a scheme in D if projection p#S (x) of any main operations of the relational algebra for gen- element of x 2 Dmax is a maximal element in #S . eralized relations, the latter being generalizations of relations admitting null values, records and dis- It is not hard to see that it is enough to require criminated unions. Then we show how to gener- that projection of two maximal elements of D be alize our main concepts for structures containing incomparable instead of requiring that they be sets, i.e. complex objects. maximal in the corresponding ideal. We need some more concepts.

De nition Let S  D be a scheme. Then #S is called a scheme-ideal and p#S is called a schemeprojection. We will write pS instead of p#S . In the reasonings that led us to the above de ni5

tion we took into account only how we loose infor4 = fName ) ? Dept ) ? Oce ) 628 g mation projecting into a scheme. In [5] another Let D = fd ; d ; r ; r ; r ; r ; ?g where ? is the 3 1 2 3 4 aspect of the problem was considered : what can tuple with all2 null values. The diagram of D is be said about the lost information? Can we con- shown below: sider it independently and \add" to another object (element of domain)? r

;

d2

The idea of [5] was that, given a scheme, there is its complement (as there is a complement L ? S for every S  L for the domain L ! V?), and projecting into scheme S is simply loosing information corresponding to the complement of S 5 . Assuming that the pieces of information contained in projections into the scheme and its complement are independent, we can combine them. To be more precise, if we have an object and its projection into a scheme is less than an element of this scheme, we can add lost information to the latter element. This is the idea of P.Buneman's de nition of scheme. Since we have already used the word \scheme", we will use term semi-factor proposed in [12].

0

;

0

:

d3

L D  L D D  L L D  L D  L D  L r4 D r2 r1 r3  ? @ L ? @ L ? @ L ? @ L ? @ L ? @ L ? @ @L ?

?

This domain has no semi-factors but f?g and Dmax while it has eight proper schemes: fr1; r3 g, fr2 ; r3g, fr1 ; r4 g, fr2 ; r4 g, fd2 ; r3 g, fd2 ; r4 g, fd3 ; r1 g, fd3 ; r2 g. 2

De nition [5, 12] Let D be a domain and S an antichain such that #S is a strong ideal. Then S is called a semi-factor if #S satis es the slide condition, that is, given x 2 D and y 2 #S such that pS (x)  y, then x _ y exists. #S is called

In order to justify both de nitions we must prove a semi-factor ideal, and pS is called a semi-factor that they describe exactly canonical projections projection. when applied to the domain L ! V?. Every semi-factor is a scheme; the converse is not true in general. If it were true, it would mean Proposition 1 S is a scheme (or a semi-factor) (informally) that for all the schemes their comple- of L ! V? i pS is a canonical projection. 2 ments exist, because we could consider the paragraph before the de nition of semi-factor as an informal proof. In a certain class of domains this If L is nite, L ! V? is isomorphic to V?n , where can be formally proved, and we will nish this sec- n = jLj. Therefore, in direct products of at domains all schemes are semi-factors. Theorem 3 tion with such a result. below will generalize this fact. Example 3 Let d2; d3 be as in the examples 1 and 2. Let We shall mostly use schemes rather than semifactors because the de nition of schemes is more 1 = fName ) Howard Dept ) ? Oce ) ?g general and does not make use of any additional assumptions, and, as we are going to show, 2 = fName ) ? Dept ) CIS Oce ) 176 g schemes satisfy almost all properties that were 3 = fName ) Katherine Dept ) SL Oce ) ?g proved in order to justify the de nition of semi5 In fact, it was not stated in [5] explicitly, but it seems factor in [5]. In the rest of the section we establish to be the most natural interpretation of the slide condition. some necessary properties of schemes and state a 0

r

r

r

0

;

0

;

0

;

0

;

0

;

0

;

0

0

;

0

;

;

6

result characterizing qualitative domains in which S = S1 + S2 ) for some schemes S1 and S2 in D1 the concepts of scheme and semi-factor coincide. and D2 , respectively. 2 Let A; B  D be two sets. We de ne A _ B as In another paper I shall go further into mathepointwise supremum, i.e. A _ B = fa _ b : a 2 matics of schemes; for our current purposes we do A; b 2 B g. not need any more. We nish this section by the result describing qualitative domains in which the Proposition 2 Let D be a distributive domain. concepts of scheme and semi-factor coincide. Then 1) If A; B are scheme-ideals, then so is A _ B ; Theorem 3 (see also [12]). Let D be a qualitative 2) The set of scheme-ideals over D is a complete domain. Every scheme of D is a semi-factor i lattice. 2 Y

D'

i2I

Di

The same results have been proved for semi-factors where each Di has no proper scheme; the schemes in [5]. Notice that scheme-ideals may not be closed of D are in 1-1 correspondence with subsets of I . under intersection in contrast to the case of semi- 2 factor ideals. Proposition 2(2) says that schemes ordered by v[ form a lattice if D is distributive. A question arises : what can be said about other powerdomain orderings v] and v\ ? The follow- 4 Relational algebra for generalized relations ing result shows that these orderings coincide for schemes in any domain. The same result for semifactors was proved in [5]. In this section we nd the analogies of the main operations of relational algebra for generalized relations. Schemes introduced in the previous secTheorem 1 Let D be an arbitrary domain and [ ] A; B two schemes. Then A v B i A v B i tion will be used to de ne projections. The projecA v\ B . 2 tions having been de ned, we can introduce selection. The join operation will be borrowed from [5]. Direct product () and separated sum (+) are two important operations over domains. Direct product is de ned as usual. Given two domains D1 and D2 , D = D1 + D2 is de ned as follows : the set of its element is (D1  f1g) [ (D2  f2g) [ f?g, the ordering is inherited from the orderings of D1 and D2 and ? is the new bottom element. For example, a subdomain fd2 ; d3 ; r2 ; r3 ; ?g of the domain in example 3 (see the picture above) is isomorphic to D1 + D2 where D1 = fd2 ; r2 g and D2 = fd3 ; r3 g. This construction corresponds to case, or discriminated union, while direct product corresponds to forming records. It is, therefore, important to describe schemes in products and sums.

In order to construct generalized relations we can use the idea of [1]: starting with basic objects we use constructors such as record and variant (in this section we do not use set). Basic objects are elements of given domains, i.e. domains corresponding to basic types such as integers, characters etc. Generalized records are elements of domains obtained from the basic ones by using operation  for record constructor and + for variant constructor. Generalized relations are nite sets of generalized records. Let B be a set of domains. We now can recursively de ne domains of generalized records (equivalently, their types).

Theorem 2 Let D = D D (or D = D + D ). De nition (Database Domains) Then S is a scheme in D i S = S  S (or 1) Any D 2 B is a database domain; 1

2

1

1

2

2

7

2) (record constructor) If D1 ; : : : ; Dn are database domains, then D1  : : : Dn is a database domain; 3) (variant constructor) If D1 ; : : : ; Dn are database domains, the D1 + : : : + Dn is a database domain.

done in [14, 15]. Suppose we have basic types i0 whose domains of values Di0 are exactly domains from B. Let L be a set of labels. Denote the domain of values of type  by [  ] . Then if 1 ; : : : ; n are types, then so are fl1 ) 1 ; : : : ; ln ) ng and hl1 ) 1; : : : ; ln ) ni, where l1 ; : : : ; ln 2 L, and

Example 4 Let B contain three domains: D, whose elements are people's names, N? = f?; n1 ; n2; :::g representing natural numbers, and Bool = f?; 0; 1g representing booleans (in the above domains ?  ni for all i and ?  0; 1). Suppose a database contains records with variants that have name and age elds for each person. If a person is a faculty member, the record contains his/her salary, and if he/she is a a student, it contains a subrecord indicating whether a student is supported and the amount of support. Below are the examples of such records: r1

[ fl1 ) 1 ; : : : ; ln ) n g] = [ 1 ]  : : :  [ n ] ; [ hl1 ) 1 ; : : : ln ) ni] = [ 1 ] + : : : + [ n] : Since domains are closed under direct product and separated sum, all database domains are domains. Therefore, we can speak of schemes in the database domains. There exists another way to de ne schemes using our recursive de nition of database domains. Schemes in domains from B are just schemes as they were de ned in the previous section; schemes in D1  : : : Dn are S1  : : : Sn and schemes in D1 + : : : + Dn are S1 + : : : + Sn where Si is a scheme in Di . According to theorem 2 these two de nitions are equivalent.

= fName ) John Age ) 35 Status ) hFaculty ) fSalary ) 40 000 gig 0

0

0

;

0

0

;

0

;

;

= fName ) Mary Age ) 22 Status ) hStudent ) fSupported ) 0 Amount ) 0 gig r2

0

0

0

;

0

0

0

;

0

;

0

Now we can de ne the operations of relational algebra for generalized relations. We will need one more de nition: by minX and maxX we will mean the sets of minimal and maximal elements of an ordered set X , respectively.

;

= fName ) Peter Age ) 24 Status ) hStudent ) fSupported ) 1 Amount ) 12 000 gig

r3

0

0

0

;

0

0

;

0

0

0

;

;

:

These records are elements of a database domain 1. Union. Let D be a domain and R1 ; R2 two D  N?  (N? + (Bool  N?)). 2 relations. Then their union R1 [~ R2 is max(R1 [ R2 ). De nition A generalized record is an element of a database domain. A generalized relation is a nite We need the max operation because R1 [ R2 may antichain in a database domain6. As we stated fail to be an antichain, but R1 [~ R2 always is. before, we will often omit the word \generalized". R1 [~ R2 can be interpreted as the set of the most informative elements from R1 and R2 . For example, r1 ; r2 ; r3 de ned above are generalized records and R = fr1 ; r2 ; r3 g is a (generalized) 2. Di erence. Let D be a domain and R1 ; R2 two relations. Then R1 ? R2 is the usual set di erence. relation. Since R1 ? R2  R1 , it is a relation. It is not hard to describe a type system using the given de nition of database domains as it was Intersection can be expressed as R1 \ R2 = R1 ? (R1 ? R2 ). 6

Therefore a generalized relation consists of objects of the same type as it is in the case of relational databases if a database is just a relation. It is not, however, a restriction for if we have objects of di erent types we can always use either variant or record constructor and consider these objects as having the same type.

3. Cartesian (direct) product. Let D1 ; D2 be two domains and R1 ; R2 relations in D1 ; D2 respectively. Then R1  R2 is a relation in D1  D2 de ned as fhr1 ; r2 i j r1 2 R1 ; r2 2 R2 g.

8

4. Projection. Given a (database) domain D, we the ordering of N? is given by letting ? be less de ne projection as projection into a scheme-ideal than all ni 's: #S in D. If D is L ! V?, then projections thus de ned coincide with projections in relational aln0 n1 n2 n3 : : : gebra.  @ A @A  @A

If R  D is a relation and S is a scheme, pS (R) may fail to be an antichain. Therefore, we need two operations of projection:

?

max pmin S (R) = min pS (R); pS (R) = max pS (R):

N?

We can not conclude that 1 < 2 from this information, therefore, we need a binary relation P on If R is a one-element relation, these two projec- N? describing the ordering of natural numbers. tions coincide and we will write simply pS (R). The above de ned operations also coincide for relations To de ne such powerful selection we rst need the without incomplete information, i.e. subsets of de nition of similar schemes and a 1-1 correspondence between their scheme-ideals. In the above Dmax . example of DDD schemes Df?gf?g and 5. Selection. We can also de ne selection using f?g  f?g  D should be similar and 1-1 correthe concept of scheme. First we have to de ne spondence between their scheme-ideals associates conditions. As usually, if c1 , c2 are conditions, the rst and the third projections of any record. then so are c1 _ c2 ; c1 &c2 and :c1 . Schemes are This gives us possibility to compare projections on necessary to de ne conditions we start with. Let di erent schemes. As it was said earlier, we may S; S 0  D be schemes, a 2 #S , x 2 D. Then the want, for example, to select records with coincidelementary conditions are pS (x)a, pS (x)pS 0 (x), ing rst and third projections. where  2 fg. Given a database domain D, it can be represented Let R  D be a relation. i.e. an antichain in D. If as t(D1 ; : : : ; Dn ) where t is a term of signature c : D ! fT; Fg is a condition, then the selection h; +i and D1 ; : : : ; Dn 2 B (e.g. the database is de ned as c (R) = fx 2 R : c(x) = Tg. domain in example 4 is D  N?  (N? + (Bool  N?))). We now de ne similarity of two schemes If we do not know what the basic domains from S; S 0 and mapping 'S !S 0 : #S ! #S 0 . B are and how D was constructed from them, the above de ned selection is all we can get. However, If S is a scheme in D 2 B, then S is similar to if we know a concrete procedure of construction of itself and 'S !S is the identical mapping on #S . D (i.e. a term in signature h; +i with variables from B) then we can de ne more complex con- Let D = t(D1 ; : : : ; Dn0), where Di 2 B, i = ditions. For example, if the database domain is 1; : : : ; n. Suppose S; S are two schemes in D. D  D  D we may want to select those element Let the last operation of t be , i.e. t(; : : : ; ) = t1(; : : : ; )  : : :  tk (; : : : ; ) and the last operawhose rst and third projections coincide. tion of each ti is not . Then S = S1  : : :  Sk We can give the selection more power if we in- and S 0 = S10  : : :  Sk0 where Si ; Si0 are schemes troduce binary relations on domains from B. For in ti (D1 ; : : : ; Dn ), see theorem 2. S is similar to example, if P is a binary relation on D1 2 B and S 0 i there are such i and j that ti = tj , Si is #S = D1 , then we can introduce conditions like similar to Sj0 in ti(D1 ; : : : ; Dn ) = tj (D1 ; : : : ; Dn ) (pS (x); a) 2 P . This is necessary because, for ex- and Sl = f?tl (D1 ;:::;Dn ) g, Sp0 = f?tp (D1 ;:::;Dn ) g, ample, domain of natural numbers is represented l 6= i; p 6= j . 'S !S 0 maps a record x 2 #S with in domain theory as N? = f?; n0 ; n1 ; n2 ; : : :g only nonbottom ith component xi 2 #Si to the where ni corresponds to the natural number i, and record whose only nonbottom j th component is 9

'Si !Sj0 (xi ).

r2

= fName ) Y Status ) hPro t ) fRevenue ) 2 000 000 Costs ) 1 000 000 gig 0

0

If the last operation of the term is +, then S = S1 + ::: + Sk and S 0 = S10 + ::: + Sk0 where Si ; Si0 are schemes in ti (D1 ; : : : ; Dn ). Then S is similar to S 0 i each Si is similar to Si0 in ti (D1 ; : : : ; Dn ), and for any x 2 #S : 'S !S 0 (x) = 'Si !Si0 (x) if x 2 Si .

;

;

0

;

0

;

0

;

;

0

:

Let D be a domain of names. Then the above records are elements of a database domain D  (N? + (N?  N?)). Consider the following schemes: Example 5 Let S = f?g  f?g  D and S 0 = S1 = f?D g  (N? + (f?N g  f?N g)); ? ? D  f?g  f?g be two schemes in D  D  D. Then S and S 0 are similar and 'S !S 0 (f?; ?; xg) = S2 = f?D g  (f?N? g + (N?  f?N? g)); fx; ?; ?g. S3 = f?D g  (f?N? g + (f?N? g  N?)): Schemes D + (f?g  D) and D + (D  f?g) are Then S1 ; S2 ; S3 are also schemes in N? and S2 is similar in D + (D  D). 2 similar to S3 . Let P be a binary relation on N? such that (ni ; nj ) 2 P i i  j , (?; x) 2 P for all x 2 N?. Consider the following conditions: c1  (pS1 (x) 6= ?N? ) 7, c2  ((pS3 (x); pS2 (x)) 2 P ). Let R be a relation in the above database domain. Then As we said before, one may also want to de- c1 (R) selects non-pro t companies from R while ne some binary relations on basic domains. Let c2 (R) selects companies working well, that is, Pik ; k 2 Ii be a family of binary relations on whose gross revenue exceeds costs. 2 Di 2 B, where Ii is (possibly empty) set of indices. We say that a scheme S of a database do- 6. Join. Join was introduced in [5] as the supremain D = t(D1 ; : : : ; Dn ) is also a scheme in a basic mum in Smyth powerdomain ordering, i.e., given domain Di if S = t(f?g; : : : ; Si ; : : : ; f?g) where two relations (antichains) R1 ; R2  D, their join is Si  Di is a scheme. In this case we can identify R1 t] R2 . It was proved that for domain L ! V? elements of #S and #Si. the above de ned operation coincides with the usual join in relational algebra, see [5]. We will The third type of elementary conditions in- write more convenient and customary symbol 1 cludes the conditions (pS (x); a) 2 Pik and instead of t] . (pS (x); pS 0 (x)) 2 Pik where S; S 0 are schemes in Di identi ed with Si, a 2 Si and k 2 Ii . There is another way to think of the join operation. Given two generalized relations R1 ; R2  D, With such extensions being added, selection cov- their join R1 1 R2 is the set of minimal (in D) ers usual selection in relational algebra. elements which are greater than some element of some element of R2 : R1 1 R2 = minfx 2 Example 6. Consider a relation with variants RD1j 9and r 2 R1 ; r2 2 R2 : r1  x; r2  xg. 1 describing companies. Each record contain the following information: name, total donations for Several conditions were given in [23] that the analnon-pro t companies, gross revenue and costs for ogy of the natural join in object-oriented model pro t companies. Below are the examples of should satisfy. Informally, they are: 1) if there records: are no common attributes of two relations, the result of join is isomorphic to their direct (Cartesian) product; 2) if two relations are de ned over 1 = fName ) X Status ) hNon ? pro t ) 7 To be more precise, we should compare S ( ) with an fDonations ) 1 000 000 gig 1

Now we can extend the list of possible elementary conditions by adding the conditions of form 'S!S 0 (pS (x))pS 0 (x) where S; S 0 are two similar schemes in a database domain D.

r

0

0

;

0

;

;

0

;

p

element of # 1 , that is, with f?D ?N?  f1gg. S

10

;

x

the same sets of attributes, the result of join is their intersection; 3) the join of two relations can be obtained as the union of pairwise joins of its elements(where these exist). Join is also known to be associative in relational algebra, see [24]. Let us formalize the above properties.

ri 6= ?Di g. Let Si = f?g  : : :  Dk(i)  : : :  f?g where k(i) = i if i  n and n ? i otherwise and Dk(i) is the ith factor among 2n factors. Then Si is a scheme in DD. Let S be the direct product of such Si s that i 2 I (R1 ) for i  n and i ? n 62 I (R1 ) for i > n. Let c be the conjunction of conditions pSi (x) = pSn+i (x) for all i 2 I (R1 ) \ I (R2 ). Then

Let R1  D1 ; R2  D2 be two relations, and R1 1 R2 = pmin S (c (R1  R2 )): 0 0 D1 \ D2 = ;. Let R1 = R1  f?2 g and R2 = R2  f?1 g be two relations in D1  D2. Then We nish this section by showing that the above R10 1 R20 = R1  R2 . de ned operations form an algebra, that is, gen~ , dif2) Let R1 ; R2  D max be two relations. Then R1 1 eralized relations are closed under union [ ference, Cartesian product, projections, selection R2 = R1 \ R2 . and join. Formalizing property 3) we must keep in mind that the union of pairwise joins may contain comparable elements while relations are antichains. Theorem 4 Generalized relations are closed un2 Therefore, after nding union of joins we have to der the operations [~ ; ?; ; pmin ; pmax ; ; 1. eliminate some elements in order to obtain an antichain. According to [10], there is no \semantically correct" way to do it. Since joining relations 5 Dependency theory for generwith null values may often yield counter-intuitive alized relations results (cf. [10, 14]) we think that formalizing the third property we have to eliminate nonminimal elements, i.e. to leave the least informative ele- Having introduced the notion of scheme, we can ments among pairwise joins. de ne functional dependencies. If S1 ; S2 are schemes in a domain D, then a functional depen3) Let R; R0  D be two relations, and R = is an expression of the form S1 ! S2 . Usufr1 ; : S : : ; rng; R0 = fr10 ; : : : ; rm0 g. Then R 1 R0 = dency ally in the theory of databases with incomplete min( (fri g 1 frj0 g : i = 1; :::; n; j = 1; :::; m)). information dependencies are de ned only on the schemes projections on which do not contain tu4) If R1 ; R2 ; R3  D are three relations, then R1 1 ples with null values. This condition can be equiv(R2 1 R3 ) = (R1 1 R2 ) 1 R3 . alently expressed as: for any record in a relation there is a record in a scheme which is less inforProposition 3 The above de ned join operation mative than the relation record. In other words, t] satis es 1) - 4). 2 if R is a relation and S is a scheme, then S v] R.

1)

It is known that in relational algebra join can be expressed via projection, selection and Cartesian product. This is not true for generalized relations. However, if the underlying domain is the direct product of domains then such a representation for join exists. Let D = D1  : : :  Dn and R1 ; R2 be two relations in D. For any x 2 D by xi we mean its ith component, i.e. projection to Di . Let R  D be a relation, and I (R) = fi j 9r 2 R :

Now we can de ne satis ability for functional dependencies. Let R  D be a relation. We say that R satis es functional dependency S1 ! S2 if S1 ; S2 v] R and pS2 (x) = pS2 (y) whenever pS1 (x) = pS1 (y) for every x; y 2 R. Functional dependencies in distributive domains have been investigated in [5] for the particular case of semi-factors, and the following analogies of the Armstrong axioms are due to [5], where F is a set

11

of functional dependencies, Schemes(D) the com- about information contained in p(x). The fact plete lattice of schemes over distributive domain that p is the complement of p means that all inforD (cf. proposition 2). mation contained in x can be reconstructed from p(x) and p(x), i.e. x = p(x) _ p(x). That means in order to introduce complements, we have (a) If S1 ; S2 2 Schemes(D) and S1  S2 then that to require that all principal ideals #x in D be S2 ! S1 2 F ; complemented lattices. Moreover, they must be (b) If for any i 2 I : S ! WSi 2 F where S; Si 2 uniquely complemented since we want to speak about the complement. The next result easily folSchemes(D) then S ! i2I Si 2 F ; lows from [19]. (c) If S1 ! S2 2 F and S2 ! S3 2 F , where S1; S2 ; S3 2 Schemes(D) then S1 ! S3 2 F . Proposition 5 Any principal ideal of a domain D is a uniquely complemented lattice i D is a The result of [5] proved for semi-factors is also true qualitative domain. 2 for schemes:

Proposition 4 The Armstrong Axioms (a){(c) Let D be a qualitative domain and S  D be are consistent and complete for relations in dis- a scheme. Consider the set I S = fpS (x) : x 2 tributive domains. 2 Dmax g, where pS (x) is the complement of pS (x) in #x. We would like I S to be the complement of S . However, it can be easily shown that I may Now our purpose is to introduce multivalued de- fail to be a scheme although #I S is always a Sstrong pendencies for generalized relations. A multival- ideal. ued dependency X !! Y , where X; Y are sets, appeals to projection onto the set X [ Y . While There is another elegant way to de ne complement [ corresponds to _ for domain model, there is no proposed by A. Jung [11]. Let S  D be a scheme analogy for complement. More precisely, the poset in any domain D . We de ne I as the set of of schemes is a lattice if the domain is distributive, maximal elements of fx 2 D : pS (xS) = ?g. It also but schemes may fail to have complements in con- can be shown that I is not generally a scheme. trast to the case of L ! V?. Thus, two problems In order to be able toS operate with complements, will be discussed in the rest of this section. The we have to make two observations. rst one is how we can de ne complements. The complements having been de ned, we introduce multivalued dependencies and prove a decomposi- Proposition 6 Let D be a qualitative domain tion theorem. and S any scheme. Then #I S = #IS , i.e. IS 2 Consider the domain L ! V?. Its schemes cor- is the set of maximal elements of I S . respond to subsets of L, with scheme-projections being canonical projections. The complement of a scheme corresponds to projecting onto the com- Given a scheme S in a qualitative domain, we can correctly de ne its complement as IS . As we menplementary subset of L. tioned above, the complement of a scheme may Suppose that we have de ned the concept of com- not be a scheme. However, complements of semiplement, p is a scheme-projection and p the pro- factors are schemes, as the following result shows. jection corrsponding to the scheme's complement. What should the properties of p be? First, if we have any element x 2 D, then p(x) ^ p(x) = ?. Proposition 7 The complement of a semi-factor Suppose that x 2 Dmax . Then p(x) \forgets" is a scheme in any qualitative domain. 2 12

If IS is a scheme, we say that S has a complement and S a semi-factor of D. Then R satis es multivalued dependency S 0 !! S i R = [pS 0 _pS (R)] 1 (which is IS ) and denote it by S . 2 [pS 0 _ pS (R)], where join 1 is t] . De nition Let D be a qualitative domain and S a scheme having the complement S . Let S 0 be We did not indicate which operation of projection a scheme. We say that a relation R  D satis es { pmin or pmax { was used because they coincide multivalued dependency S 0 !! S if for every x; y 2 for generalized relations without incomplete inforR with pS 0 (x) = pS0 (y) there exists z 2 R such mation. that pS 0 (z ) _ pS (z ) = pS 0 (x) _ pS (x) and pS 0 (z ) _ pS (z) = pS0 (y) _ pS (y).

If D is L ! V?, we obtain the usual de nition of multivalued dependency in a relational database. Notice that, like functional dependencies, multivalued dependencies should be considered only on schemes the projections into which do not contain null values. As it was shown above, it means that a scheme is less than a relation in Smyth powerdomain ordering v] . Therefore in the above definition the following should hold: S 0 _ S v] R and S 0 _ S v] R. It can be easily concluded from the above inclusions that R  Dmax . Therefore we will consider only relations without incomplete information when speaking of multivalued dependencies.

6 Extending relational algebra to complex objects

The standard approach to constructing complex objects is to apply record, variant and set constructors to basic types. The crucial point is that we admit set constructor, i.e. given any type  , there is a type ff gg whose instances are nite sets of objects of type  . Thus, we can not use domains anymore, because we may have an increasing in nite chain of nite sets, which itself is not directed. In order to develop a \domain-like" theory for complex objects, we need to generalize the concept of domain. This new concept should be The above introduced functional and multivalued more general than that of domain. Moreover, the dependencies satisfy two well-known properties: new objects we are going to de ne must be closed with respect to application of record, variant and set constructors. Proposition 8 Let D be a qualitative domain, and S a scheme having complement S . Let S 0 be Due to the limitations set up for the papers in a scheme, and R a relation without incomplete in- this volume we are unable to present all details of the extension of the algebra from section 4 to conformation, i.e. a nite subset of Dmax . Then 0 0 1) If R satis es S ! S then R satis es S !! S ; structions containing sets. Instead, we will give 2) If R satis es S 0 !! S , then R satis es S 0 !! here the analogies of the main de nitions which S. 2 were in the focus of the rst three sections, that is, the de nitions of local domains, which are the generalization of domains that we are going to use, We have de ned so far multivalued dependencies database domains, schemes and projections. Noand the join operation. We also have shown that tice that the crucial steps in the de ning algebra the complement of a semi-factor in a qualitative for generalized relations were to de ne generalized domain is a scheme. Now we are ready to formu- relations as nite antichains in domains, schemes late a decomposition theorem. and projections. In this section these main steps will be gone through in the case of complex objects. Theorem 5 Let D be a qualitative domain, and R a relation without incomplete information (that If we allow a type ff gg, then we allow an is, a nite subset of Dmax ). Let S 0 be a scheme in nite sequence of sets fx1 g v[ fx1 ; x2 g v[ 13

fx ; x ; x g v[ : : :, where all xi 2 [  ] . This se- A complex object (to be more precise, generalized 1

2

3

quence is a directed set but it does not have the least upper bound among instances of type ff gg. For example,  may be a record type and the instances of ff gg are relations, i.e. nite sets of records. If ff gg is used as a constructor for another record type, that is, if we deal with nested relations, then we may have in nite increasing sequence of higher-order records. However, if we are given any higher-order relation, i.e. a nite set of higher-order records, and a directed set below this relation, then this directed set has the least upper bound. Therefore, the higher-order records range over the poset which locally behaves as a domain. The following de nition captures this property.

De nition A poset D is called a local domain if it satis es the following properties: 1) D does not have in nite decreasing chains; 2) The set K (D) of compact elements of D forms a countable basis of D; 3) For any nite antichain A  D, #A is a domain.

We changed the requirement that D be directed in the de nition of domain to the requirement that D be locally directed, i.e. every nite antichain should generate a domain. We also require that D be a poset without in nite decreasing chains. This condition guarantees that D is a complete semilattice, that is, every nonempty subset of D has the greatest lower bound. This condition is not a severe limitation since usually domains of basic types satisfy it and, as we are going to show in this section, it is preserved when record, variant and set constructors are applied (see theorem 6 below).

complex object) is de ned as a nite antichain in a local domain.

This de nition is more general than that used in [17, 18] where algebra, calculus and null values for nested relations were discussed. The rst generalization is that we start with arbitrary local domains or domains. The variant constructor is also allowed, and each attribute can be relation-valued, that is, each domain used for forming records can be obtained as P (D) for some D, while in [17, 18] it is assumed that the nested relations must be in partitioned normal form8 . We need the following result about local domains.

Theorem 6 Any domain without in nite decreasing chains is a local domain. If D1 ; D2 are local domains, then so are D1  D2 , D1 + D2 and P (D1 ). 2 Corollary 1 Any database domain is a local do-

2

main.

We are ready to de ne scheme-ideals and schemeprojections if B consists only of domains (which are local domains). This is a natural assumption, because elements of B are domains we start with, i.e. domains of basic types like integers, characters etc.

De nition (Projections and Ideals in Database Domains)

and scheme-projections in eleDe nition (Database Domain) Let B be a set 1) Scheme-ideals ments of B are just those in domains D 2 B. of basic local domains. The database domains are de ned as follows: 2) If I  D and I  D are scheme1) Any local domain from B is a database domain; ideals in local domains D and D and p ; p 2) If D ; : : : ; Dn are database domains, then so is are corresponding scheme-projections, then D  : : :  Dn ; I  I is a scheme-ideal in D  D , with 3) If D ; : : : ; Dn are database domains, then so is p(hx ; x i) = hp (x ); p (x )i being the correD + : : : + Dn ; sponding scheme-projection. 4) If D is a database domain, then so is P (D) 8 It means that zero order attributes form a key, and each which is the set of nite subset of D ordered by nested subrelation of a less order must also be in partitioned normal form. In our model it can be the case that there v[ , i.e. hPf (D); v[ i. 1

1

2

2

1

2

1

1

1

1

1

2

1

2

1

1

1

1

are no zero order attributes.

14

2

2

2

2

3) If I1  D1 and I2  D2 are two scheme-ideals with the corresponding scheme-projections p1 and p2 , then I1 + I2 is a scheme-ideal in D1 + D2 , and for the corresponding schemeprojection p we have: p(x) = pi (xi ) if x 2 Ii, i = 1; 2. 4) Scheme-projections in P (D) are given by projections P (fx1 ; : : : ; xn g) = fp(x1 ); : : : ; p(xn )g where p is a scheme-projection in D. The corresponding scheme-ideal is fP (X ) j X 2 Pf (D)g.

and projections associated with the schemes. Join was de ned as the supremum in a powerdomain ordering and it was shown to satisfy the analogies of the properties of natural join in relational algebra. Functional and multivalued dependencies have been introduced and decomposition theorem establishing the relationship between join and multivalued dependencies has been proved for the generalized relations. In the case of complex objects it has been argued that domains can not serve as the basis of the model, and local domains have been de ned to replace domains in the model and to make it possible to work with set constructor for complex objects. Recursive de nitions of schemeideals and projections have been given.

Notice that we have not de ned the schemes since a scheme-ideal in P (D) may not have the set of maximal elements. However, it was the concept of projection onto a scheme and not the one of scheme which was crucial for de ning the operaSome of the open problems to which we would like tions of projection and selection in algebra. to dedicate the further research are: constructIf elements of a database domains are records of a ing calculus associated with introduced algebra for nested relations, then the above de ned scheme- generalized relations and complex objects; ndprojections are projections in the recursive algebra ing analogies of the basic concepts of relational for nested relations of [6]. database theory (for example, such as normalization) in our domain model; investigation of the The de nition of scheme-projections and ideals di erent ways of treatment of null values from the does take into account the way the database do- domain theory point of view; extending the basic main has been constructed, i.e. a term in sig- model in order to be able to operate with sets. nature h; +; Pi over variables from B. Notice that the grammar-based approach to de ning such Acknowledgements This work was inspired by terms and instances of the domains they corre- the idea of Peter Buneman to attract domain thespond to was studied in [9]. ory to generalize relational databases. I am very grateful to Peter Buneman and Achim Jung for very helpful discussions and suggestions. I also would like to thank Carl Gunter, Anthony Kosky 7 Conclusion and Val Tannen for their comments on this paper. In this paper we have been studying the new approach to generalization of relational datamodel References that treats relations as subsets of domains, which are partially ordered sets of descriptions [5]. This [1] F. Bancilhon, S. Khosha n. A calculus for comapproach allows us, for example, to model di erplex objects. In PODS 1986. ent ways of working with null values and records [2] C. Beeri. Formal models for object oriented with variants. In the paper we have described relational algebra operations for such generalized relations and outlined the ways of their extending to complex objects. We did it by de ning schemes in domains 15

databases. In : Proc. of Int. Conf. on Deductive and Object-Oriented Databases, Kyoto, December 1989. [3] G. Birkho . Lattice Theory. 3rd ed., AMS, Providence, RI, 1967.

[4] J. Biskup. A formal approach to null values in database relations. In : Advances in Database Theory (H. Gallaire, J. Minker, J.M.. Nicolas, Eds.), Plenum Press, New York, 1981, pp.299{ 341. [5] P. Buneman, A. Jung, A. Ohori. Using powerdomains to generalize relational databases. Theoretical Computer Science, 1991, to appear. [6] L.S. Colby. A recursive algebra and query optimization for nested relations. In SIGMOD 89. [7] J.-Y. Girard. The system of variable types : fteen years later. Theoretical Computer Science 45:159{192, 1986. [8] C. Gunter, D. Scott. Semantic domains. In \Handbook on Theoretical Computer Science", J. van Leeuwen, ed., North Holland, 1990, pp. 633{ 674. [9] M. Gyssens, J. Paredaens, D. Van Gucht. A grammar-based approach towards unifying hierarchical databases. In SIGMOD 89. [10] T. Imielinski, W. Lipski. Incomplete information in relational databases. J. of ACM 31(4):761{791, 1984. [11] A. Jung. Personal communication. June 1990. [12] A. Jung, L. Libkin, H. Puhlmann. Decomposition of domains. In Proc. of the Conf. on Math. Foundations of Programming Semantics - 91, to appear. Available as Technical Report MS-CIS90-84, University of Pennsylvania, 1990. [13] Nested relations and Complex Objects in Databases (S.Abiteboul, P.Fischer and H.-J.Schek eds.) Springer LNCS, Vol. 361, 1989. [14] A. Ohori. A study on semantics, types and languages for databases and object-oriented programming. PhD Thesis, University of Pennsylvania, 1989. [15] A. Ohori. Semantics of types for database objects. 2nd International Conference on Database Theory, 1988. [16] J. Paredaens, P. De Bra, M. Gyssens, D. Van Gucht. The Structure of the Relational Datamodel. Springer-Verlag, Berlin, 1989. [17] M.A. Roth, H.F. Korth, A. Silberschatz. Extended algebra and calculus for nested relational databases. ACM TODS, 13(4):389{417, 1988. [18] M.A. Roth, H.F. Korth, A. Silberschatz. Null values in nested relational databases. Acta Informatica, 26(7):615{642, 1989. F

[19] V.N. Salii. Lattices with Unique Complements. AMS, Providence, RI, 1988. [20] H.-J. Schek, M. Scholl. The relational model with relation-valued attributes. Inform. Systems, 11(2):137{147, 1986. [21] D.S. Scott. Domains for denotational semantics. In ICALP, July 1982. [22] M.B. Smyth. Power domains. Journal of Computer and System Sciences 16(1):23{36, 1978. [23] K. Tanaka, T.-S. Chang. On natural join in object-oriented databases. In : Proc. of Int. Conf. on Deductive and Object-Oriented Databases, Kyoto, December 1989. [24] J.D. Ullman. Principles of Database Systems. Pittman, 2nd ed., 1982. [25] C. Zaniolo. Database relations with null values. Journal of Computer and System Sciences 28(1):142{166, 1984.

16