52. Cypress data model conceptsIn this section, we give an informal description of the Cypress data model. The evaluation andjustification of the model have been deferred to Section 5. A more formal description of the modelhas been deferred to a future paper (some axioms can be found in the appendix). 2.1 Data independenceWe deal here with the conceptual data model, the logical primitives for data access and data typedefinition. This should be carefully distinguished from the physical data model, the mechanisms weare given for actual storage and access of data. The physical model in the Cypress implementation correspondsto the Storage level. The physical data model is hidden as much as possible from the database client tofacilitate data independence, the guarantee that a user's program will continue to work (perhaps witha change in efficiency) even though the physical data representation is redesigned. For any particular database using the given conceptual and physical models, the actual specificationsof this database using the primitives the models provide are termed the conceptual data schema andphysical data schema. Note that a mapping must be provided between the conceptual and physicallevels, either automatically or with further instruction from the client; we will do some of both.The logical to physical mapping is intimately associated with the performance of the databasesystem as viewed by the user performing operations at the conceptual level. Performance isgenerally not a criteria for choosing between conceptual data models, unless there is no known wayto map the differing conceptual views into the same or equally efficient implementations.2.2 Basic primitivesThree basic primitives are defined in the model: an entity, datum, and relationship.An entity represents an abstract or concrete object in the world: a person, an organization, adocument, a product, an event. In programming languages and knowledge representation entitieshave variously been referred to as atoms, symbols, and nodes. A datum, unlike an entity, representsliteral information such as times, weights, part names, or phone numbers. Character strings andintegers are possible datum types.It is a policy decision whether something is represented as an entity or merely a datum: e.g., anemployee's spouse may be represented in a database system as a datum (the spouse's name), or thespouse may be an entity in itself. The database system provides a higher level of logical integritychecking for entities than for datum values, as we will see later: unique entity identifiers, checks on<\pTsqPpPNc-6KO4pEKrAopsp )?:=sp ='t>:pP8 sp,6"S4p2F6 sp0%#sp-s pK+b)t8%'@L% X "Yrp5s ps ppA<"); XE "pspSD Zdh . \>]DESIGN AND IMPLEMENTATION OF A RELATIONSHIP-ENTITY-DATUM DATA MODEL6entity types, and removal of dependent data upon entity deletion. We shall discuss theentity/datum choice further in Section 4.2.We will use the term value to refer to something that can be either a datum or an entity. In manyprogramming languages, there is no reason to distinguish entity values from datum values. Indeed,most of the Cypress operations deal with any kind of value, and some make it transparent to thecaller whether an entity or datum value is involved. The transparent case makes Relationaloperations possible in our model, as we will see in Section 2.5.A relationship is a tuple whose elements are [entity or datum] values. We refer to the elements(fields) of relationships by name instead of position. These names for positions are called attributes.Note that we have separated the representatives of unique objects (entities) from the representationof information about objects (relationships), unlike some object-oriented programming languagesand data models. Therefore an entity is not an "object" (or "record") in the programming languagesense, although entities are representatives of real-world objects. We discuss the advantages of theentity-relationship distinction along with other data model design issues in Section 5. We also define entity types, datum types, and relationship types. These are called domains,datatypes, and relations, respectively. We make use of these three types through one fundamentaltype constraint: every relationship in a relation has the same attributes, and the values associatedwith each attribute must be from a pre-specified domain or datatype. One might think of a relationas a "record type" in a programming language, although relations permit more powerful operationsthan record types.As an example, consider a member relation that specifies that a given person is a member of a givenorganization with a given job title, as in the following figure. The person and organization might beentities, while the title might be a string datum. We relax the fundamental type constraintsomewhat in allowing a lattice of types of domains: a particular value may then belong to the pre-specified domain or one of its sub-domains. For example, one could be a member of a University,a Company, or any other type of Organization one chooses to define. Other relations, e.g. an"offers-course" relation, might apply only to a University.<==BBpB-.C@CtlJeC)+zRD@:p Cǿ`3dDs?Cc`EufdDpC0tCCC6@C?9C|+5޽ yBDrCtlGbpEd\Dm"CPмa@B@CBÐueCClDhC,B"BP;>%}%~Dq#Cڂ%|-d CZBCW2D@D@CQ2@/ CEDrClC -RdC`CQ2+ACh"ClCCBCK27AD@D`-d CZ,B"3>BmCڂ%~@|CڂCڃCHB";>B] Cl@DbC -cCHBhpBClB CECClG,CZBPB%}CڂDq"CZ%~%|-cBBDD@D@C`0/BCCDrl -cw+ABD $DbCBCZ7ABDD@D`-c:,BmB%}%~Dq#Cڂ%|CHCH*B]BClBCCg ClG-co BBm CEDrClC CZB BB]CڂCڂCZ%~Cڃ-b,BBAD@D`C`A_BBACClDhC-RbBBB Cl@DbC CZ,BBB/D@D@-bBBpB%}CڂDq"CZ%~%|CH*BpBCh"ClCC,cCHCBBm3?CDrl BBB];@Cڂ%~@|CڂCڃ,c:,CZCW4AD@D`A_CQ3ACl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"+5j VspjnJj:X j?!j_jV$jzp9j\` p8pj+7jEjspC jdsp,sp d M >^< [w$x 77777777777777777x7777777777777777777777_x77777777777777777x77777777777777777rcr\W/[w9[Wx 77777777777777777x77777777777777777x777777777777777777777777 _%^/r^w6_7#####%[W'd2a 777777 d< tuCYPRESS DATA MODEL CONCEPTS9name] that may be used to uniquely identify an internal entity. The three are interchangeable,however, since they must always be in one-to-one correspondence. The reader may find it simple to think of entity-valued attributes of relationships as pointers to theentities, in fact bi-directional pointers, since the operations we provide allow access in eitherdirection. This is a useful analogy. However, there is no constraint that the model be implementedwith pointers, and the relationships of a relation could equally well be conceptualized as rows of atable whose columns are the attributes of the relation and whose entries for entity-valued attributesare the string names of the entities. For example, the author relationships in the previous figurecould also be displayed in the form:Author:PersonBookGeorgeBackgammon for BeginnersJohnBackgammon for BeginnersJohnAdvanced BackgammonTomAdvanced BackgammonThus our introduction of entities to the Relational model does not entail a different representationthan, say, a Network model might imply, but simply additional integrity checks on entity names andtypes, and new operations upon entities. This compatibility with the Relational data model isimportant, as it allows the application of the powerful Relational calculus or algebra as a querylanguage. We return to query languages in Section 2.5.Note that the only information about an entity associated directly with the entity is the name; thiscontrasts with most other data models. A person's age or spouse, for example, would berepresented in the Cypress data model via age or spouse relations. Thus the relationships in adatabase are the information-carrying elements: entities do not have attributes. However the modelprovide an abbreviation, properties, to access information such as age or spouse in a singleoperation. We will discuss properties later. In addition, the physical data modelling algorithms canstore these data directly with the person entity as a result of the relation key information (since aperson can have only one age, a field can be allocated for that field in the stored objectrepresenting a person.)2.4 Basic operationsThe data model provides the capability to define and examine the data schema, and performoperations on entities, relationships, and aggregates of entities and relationships. In this section wediscuss the basic operations on entities and relationships. In Section 2.5, we discuss the operations+\ptpXtptpt 8 M =[{CYPRESS DATA MODEL CONCEPTS112.5 Aggregate operationsThere are two kinds of operations upon domains and relations, the aggregate types in our model:the definition of domains and relations, and queries on domains and relations. We first discusstheir definitions.Schema definitionAs in other database models and a few programming languages, the Cypress model is self-representing: the data schema is stored and accessible as data. Thus application-independent toolscan be written without coded-in knowledge of the types of data and their relationships.Client-defined domains, relations, and attributes are represented by entities. These entities belong tospecial built-in domains, called the system domains:the Domain domain, with one element (entity) per domainthe Attribute domain, with one element per attributethe Relation domain, with one element per relationThere is also a predefined Datatype domain, with pre-defined elements StringType, BoolType, andIntType, called built-in types. An implementation may also allow client-defined datum types, but theimplementation described in Section 3 currently does not.There may be other system domains, depending upon the implementation of the Relationship-Entity-Datum model, for example to represent indices on relations. The Domain domain, Attributedomain, and all other domains are members of the Domain domain.Information about domains, relations, and attributes are represented by system relations in which thesystem entities participate. The pre-defined SubType relation is a binary relation between domainsand their subdomains. There are also predefined binary relations that map attributes to informationabout the attributes:aRelation: maps an attribute entity to its relation entity.aType: maps an attribute to its type entity (a domain or a built-in type)aUniqueness: maps an attribute entity to {TRUE, FALSE}, depending whether it is partof a key of its relation. We are assuming only one key per relation, here; our implementation relaxes thisassumption in the case of single-attribute keys. The following diagram graphically illustrates a segment of a data schema describing the memberrelation and several domains. The left side of the figure shows two subdomains of Organization,(Company and University), and the right shows the types and uniqueness properties of the memberrelation's attributes memberOf, memberIs, and memberAs.+YptpXtptpt;pQrNpBspK4,IEsBp<@M>gW;_"F9+%sp6#u p&3up0up- uvupu susp*up s ptD(9%p`#e%4!0?(Hs p .up "dup3{upEsu pE >t2 0tpXup3u  p?udpupus d >Z DESIGN AND IMPLEMENTATION OF A RELATIONSHIP-ENTITY-DATUM DATA MODEL12<==CClDhC,B$BP;>%}%~Dq#Cڂ%|CYiCZBCW2D@D@CQ2@/ CEDrClC CRYwC`CQ2+ACh"ClCCBCK27AD@D`CYiCZ,B$3>BmCڂ%~݀|CڂCڃCHB$;>B] Cl@DbC CYFCHBhpBClD CECClG,CZBPB%~CڂDq"CZ%~%|CYBBDD@D@C`@/BCCDrl CX+ABD "DbCBCZ7ABDD@D`CX,BmB%}%~Dq#Cڂ%|CHCH*B]BCl@CCg ClGCXhn BBm CEDrClC CZB BB]C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` vC\0CC`\+iCDq ` uh)]"ptF ptpt ptptpXtFptpjB3j?25j=L2*j;Qj8`5up" V2u&`/up V,u3j(sj% p u.p&j"Dj 'u p)jnJj: t.Aj^p u!p j)Kjj4u pu pj  + up j !upj |=jGu pj_jd up5F M >Q^< 2Q$x 77777777777777777x77777777777777777-cx77777777777777777x77777777777777777x77777777777777777x77777777777777777x77777777777777777x77777777777777777RWcW ####5Z ####DRX7 777=2b Ia773bw 7777+R_ 77777!bw 77?r\W 777772] 77,2X ####2Vw 77Z Z__+[=_W##########x77777777777777777rT #### 2\########FVatuCYPRESS DATA MODEL CONCEPTS13languages (and MultiRelationSubset implementations) could be built on top of the operations wehave defined thus far. For the purposes of this report, however, we will assume that our querylanguage is the Relational algebra (Codd[1970]), providing the join, projection, and selectionoperators on relations. We choose the relational algebra due to its wide acceptance in the literature,and now commercially. Our choice does not preclude an entity-centric query language in futurework, however. We and others have designed but have not implemented such languages. To demonstrate that the relational algebra can be used with our system, we will define a mappingof the relational operations onto the Cypress model. Some augmentation of the relational algebra isnecessary to include the operations our model provides upon domains. The important aspects ofthe mapping are:1.The Cypress relations exist in our relational mapping essentially unchanged, except thatsome type constraints exist on attribute values; these constraints simply appear asexceptional conditions when violated, they do not effect the form of the relationaloperations.2.For each domain in our schema, we define a unary relation in our mapping with the entityname as its only attribute. The sole purpose of the unary domain relations is to specify theexistence of entities in the domain. For example, a Person relation would contain onetuple per person entity in the database. The unary domain relations allow DomainSubsetto be performed in the relational algebra as a select operation on the domain.3.Entity-valued attributes of relations appear to have the name of the corresponding entitystored in them. There are no "atomic" entity values, so the ChangeName operation isexpensive in this model. All references to an entity in the database appear as the stringname of the entity, and the system generates an error if an entity-valued attribute isinitiaized to an entity which does not exist in the domain.Our representation of the data schema is as before: schema entities and relationships in the domaindomain, relation domain, attribute domain, subtype relation, and attribute relations.The join, project, and select operations in the relational algebra can now be performed byMultiRelationSubset, or by the appropriate calls to RelationSubset. Note that we must typicallydeclare new relations for the result and intermediate results of computing such queries. A selectoperation on a domain may be used to determine whether a particular entity exists, or to enumeratethe entities of a domain. A select operation on a relation may be used to find relationships thatreference a particular entity. Query operations on the schema can be used to determine whatrelations might reference an entity of a particular domain.The unary relations representing domains are used only to determine the existence of entities. An+\ptpXtptpt;pTup"RDPQ?sps psNp@'KIIT6E`CY AoD?:;_X9*S6S4 0@.V,}) up*H;u (p/sp$89sp"4u p (2I f;(<VUzWFupu p 5- b-5tB?;dT n \=] DESIGN AND IMPLEMENTATION OF A RELATIONSHIP-ENTITY-DATUM DATA MODEL14implementation could automatically create entities in these domains when an entity-valued attributeof a relationship is assigned a previously non-existent entity name. Note that domain relations mayin fact be ignored altogether by the user if this is done. Domain relations are purely an extension tothe Relational model. We chose not to automatically create entities in our mapping, as we wouldlose the logical integrity check the entities provide. 2.6 Convenience operationsSome more convenient specialized operations are built upon the basic operations described in theprevious two sections. They implement what we call properties and translucent attributes. Althoughtheoretically speaking these operations add no power to the model, they permit a significantlydifferent perspective on the data access and so should be thought of as part of the model.PropertiesProperties allow the client to treat entities as if they, like relationships, had "attributes." Theyprovide the convenience of treating attributes of relationships that reference an entity as if theywere attributes (or properties) of the entity itself. The property operations are: 1.GetPList[entity, attribute1, attribute2]: Attribute1 and attribute2 must be from the samerelation. Returns the values of attribute1 for all relationships in the relation that referencethe entity via attribute2. Attribute2 may be omitted, in which case it is assumed to be theonly other entity-valued attribute of the relation.2.GetP[entity, attribute1, attribute2]: this is identical to GetPList except exactly onerelationship must reference the entity via attribute2; otherwise an error is generated. GetPalways returns one value.3.SetPList[entity, attribute1, value list, attribute2]: Attribute1 and attribute2 must be fromthe same relation. Destroys any existing relationships whose attribute2 equals the entity,and creates new ones for each value in the list, with attribute1 equal to the value, andattribute2 equal to the entity. Attribute2 can be defaulted as in GetPList.4.SetP[entity, attribute1, value, attribute2]: this is identical to SetPList except it simplyadds a new relationship referencing the entity instead of destroying any existing ones(unless attribute1 is a key of its relation, in which case the existing one must be replaced).Thus the property operations allow information specified through relationships to be treated asproperties of the entity itself, in single operations. The property operations and the operationsdefined in earlier sections may be used interchangeably, as there is only one underlyingrepresentation of information: the relationships. As an example of the use of properties, consider)\ptF ptpt ptptpXtFptpjT;(jR7 sjPQ:p jNWjK6 jErjApOj?4s ps p j=LP j;Zj7uMtp`"uCClDhC,B"BP;>%}%~Dq#Cڂ%|-[)CZBCW2D@D@CQ2@/ CEDrClC -[7C`CQ2+ACh"ClCCBCK27AD@D`.[)CZ,B"3>BmCڂ%~@|CڂCڃCHB";>B] Cl@DbC .A[CHBhpBClB CECClG,CZBPB%}CڂDq"CZ%~%|.dZBBDD@D@C`0/BCCDrl .rZ+ABD $DbCBCZ7ABDD@D`.dZZ,BmB%}%~Dq#Cڂ%|CHCH*B]BClBCCg ClG.AZ(o BBm CEDrClC CZB BB]CڂCڂCZ%~Cڃ.Z,BBAD@D`C`A_BBACClDhC-YBBB Cl@DbC CZ,BBB/D@D@-ZBBpB%}CڂDq"CZ%~%|CH*BpBCh"ClCC-cZ(CHCBBm3?CDrl BBB];@Cڂ%~@|CڂCڃ-@ZZ,CZCW4AD@D`A_CQ3AClB CECClGB`D`D`@@D`@CCCD`C@A`C`BCQ4Cl@CCg ClG,BCK4/D@D@Ba4BCZBpB 3@CڃCڂCZ%~CڃBpB ;@ "DbCB#afCHCHCBBh3>CClDhC,B$BP;>%}%~Dq#Cڂ%|BUaCZBCW2D@D@CQ2@/ CEDrClC BaC`CQ2+ACh"ClCCBCK27AD@D`BaCZ,B$3>BmCڂ%~݀|CڂCڃCHB$;>B] Cl@DbC CafCHBhpBClD CECClG,CZBPB%~CڂDq"CZ%~%|C$a4BBDD@D@C`@/BCCDrl C2`+ABD "DbCBCZ7ABDD@D`C$`,BmB%}%~Dq#Cڂ%|CHCH*B]BCl@CCg ClGC`n BBm CEDrClC CZB BB]CڃCڂCZ%~CڃB`e,BBAD@D`C`A_BBACClDhCB`WBBB Cl@DbC CZ,BBB/D@D@BU`eBBpB%~CڂDq"CZ%~%|CH*BpBCh"ClC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$_WD@D`+]"ptpXtptpt;pUGA3>  u p8u;pupupu9ptp:5u4pu53 p/upupu*+p+upup ) upupu pup' upup%Rup;1!vupup,Bup upup up upupup gZM1ts p5' F9t\d) up% =^< rR$Dr` x 77777777777777777x77777777777777777.rX 7777777777####22`c02[\j51upup j2j.upupj,$Dj*Ispj&u&p%j$Vj"J$up(j Gj:sj2pKjup3j05jt&Bpj >rj 6p8s pj>%jejHjd- ( M?QOCYPRESS DATA MODEL CONCEPTS17Publication:PersonBookDateGeorgeBackgammon for Beginners1978JohnBackgammon for Beginners1978MaryHow to Play Chess1981MaryHow to Cheat at Chess1982This relation represents the fact that John and George wrote a book together entitled "Backgammonfor Beginners," published in 1978, and Mary wrote two books on the subject of chess, in 1981 and1982. Alternatively, we could encode the same information in two relations, an author relation and apublication-date relation:Author:PersonBookGeorgeBackgammon for BeginnersJohnBackgammon for BeginnersMaryHow to Play ChessMaryHow to Cheat at ChessPublication-date:BookDateBackgammon for Beginners1978How to Play Chess1981How to Cheat at Chess1982Although the second two relations may seem more verbose than the first one, they are actuallyrepresentationally better in some sense, because the publication dates of books are not representedredundantly. If one wants to change the publication date of "Backgrammon for Beginners" to 1979,for example, it need only be changed in one place in the publication-date relation but in two placesin the publication relation. If the date were changed in only one place in the publication relation,the database would become inconsistent. This kind of behavior is called an update anomaly. Thesecond two relations are said to be a normalized form (as it happens, third normal form) of the firstrelation, and thereby avoid this particular kind of update anomaly. A variety of successively stricter criteria for normalization have been developed and studied, basedon different kinds of real-world dependencies between attributes. Work on normalization willalmost certainly continue through the forseeable future.Relational normalization is not strictly part of the Cypress data model. However the model'soperations (and the tools we will develop in the implementation) encourage what we will callfunctionally irreducible form, in which relations are of the smallest order that is naturally meaningful.This form is in some sense the most fully normalized canonical form that could be defined. +\ptpXtptpt;p T-s QQpQQ%IQQ O%I M%I K[%I I&%IF<%C>"A%@? ;s 99qp99q 7< 5 2 0 ,s *8*pi*8* (Zi &&i #i JFaLK9,:spHzC)Tpr/5 >X 8pHJsp8d@4 ?Q]"6DESIGN AND IMPLEMENTATION OF A RELATIONSHIP-ENTITY-DATUM DATA MODEL18Functionally irreducible normal form cannot be defined simply syntactically, but rather requiresresort to the semantics of relations. Specifically, the presence or absence of a relationship in arelation represents the truth of some predicate on the state of the represented world (Kent [1979]).For example, a "member" relationship represents the fact that a particular person is a member of aparticular organization. (The absence of such a relationship may mean falsity of that predicate or lack of knowledge;we fortunately need not concern ourselves with this distinction here). A relation is in irreducible form if it is ofthe smallest order possible without introducing new artificial domain(s) not otherwise desired (allrelations can be reduced to binary by introducing artificial domains). Biller [1979] provides a moreprecise definition of irreducible form. We will allow a slight weakening of irreducible form,functionally irreducible form, which permits combining two or more irreducible relations only whentheir semantics are mutually dependent (and therefore all present or absent in our worldrepresentation). For example, a birthday relation between a person, month, day, and year can becombined instead of using three relations. Another example would be an address relation between aperson, street, city, and zip code. Combining an age and phone relation would not result infunctionally irreducible form, however, as their semantics are not mutually dependent. The functionally irreducible relations seen by the user are independent of the physical representationchosen by the system for efficiency, so we are concerned only with the logical data access. Note thatin addition to avoiding update anomalies, functionally irreducible form provides a one-to-onecorrespondence between the relationships in the database and the atomic facts they represent, acanonical form that is in some sense more natural than any other form. 2.8 SegmentsWe would like a mechanism to divide up large databases, to provide different perspectives or subsetsof the data to different users or application programs. In this section we discuss a mechanism toprovide this separation: segments. A segment is a set of entities and relationships that a databaseclient chooses to treat as one logical and physical part of a database.In introducing segments, we will slightly change the definition of an entity, previously defined to beuniquely determined by its domain and name. We will treat entities with the same name anddomain in different segments as different entities, although they may represent the same externalentity. The unique identifier of an internal entity is now the triple[segment, domain, name]. A consequence of this redefinition of entities is that relations and domains do not span segments,either. Application programs must maintain any desired correspondence between entities, domains,or relations with the same name in different segments. We will return to this later. In the nextsection, we will discuss a more powerful but more complex and expensive mechanism, augments, inwhich the database system itself maintains the correspondence.)[{ptF ptpt ptptpXtFptpjSWjQkDjO7sp5jMV jJtwt((jH.ps psp jFeHjD1JjAIj?Jj=Xj;_!sp'j9*3spj6.spspj4V:Fpj1Vj/aj-PR j+(7j(F2pj"r jp:*jTbj spCjGjpNjL jzEjFF` >p6pj 66,jNj7rp jSspjd=s M v?Q\>CYPRESS DATA MODEL CONCEPTS19We introduce three new operations to the data model in conjunction with segments:DeclareSegment[segment, file]: opens a segment with the given name, whose data isstored in the given file.GetSegments[] returns a list of all the segments which have been opened.SegmentOf[entity or relationship] returns the segment in which a given entity orrelationship exists. It may also be applied to relations or domains, since they are entities.With the addition of segments to the data model, we redefine the semantics of the basic accessoperations as follows:1.DeclareDomain and DeclareRelation take an additional argument, namely the segment inwhich the defined domain or relation will reside. The entity representing a domain orrelation now represents data in a particular segment.2.DeclareEntity and DeclareRelationship are unaffected: they implicitly refer to thesegment in which the respective domain or relation was defined. By associating a segment(and therefore a transaction and underlying file) with each relation or domain entityreturned to the database client, we conveniently obviate the need for additional argumentsto every invocation of the basic operations in the data model.3.DestroyEntity, DestroyRelationship, GetF, SetF, DomainOf, RelationOf, and Eq aresimilarly unaffected: they deal with entities and relationships in whatever segment they aredefined. Note that by our definition, entities in different segments are never Eq. Also notethat nothing in our definition makes a SetF across a segment boundary illegal (i.e.SetF[relationship, attribute, entity] where the relationship and entity are in differentsegments). Our current implementation requires that special procedures GetFR and SetFR be used onattributes that can cross segment boundaries, see Section 3.4.DomainSubset and RelationSubset are unchanged when applied to client-defined domainsor relations, i.e., they enumerate only in the segment in which the relation or domain wasdeclared. However an optional argument may be used when applied to one of the systemdomains or relations (e.g. the Domain domain), allowing enumeration over a specificsegment or all segments. RelationSubset's attribute-value-list arguments implictly indicate the appropriatesegment even for system relations, so a segment is not normally needed unless the entire relation isenumerated.Note that the data in a segment is stored in an underlying file physically independent from othersegments, perhaps on another machine. Introducing a file system into the conceptual data model+[5ptpXtptpt;pSZQO~up!MIInu p:Eu"p #C]T >M#u9 pup!wBC=up @u&p2 tAq<pu pu p5a?,@ J tT X p?"d_  >Q\ODESIGN AND IMPLEMENTATION OF A RELATIONSHIP-ENTITY-DATUM DATA MODEL20may seem like an odd transgression at this point. From a practical point of view, however, webelieve it better to view certain problems at the level of file systems. This point of view allowssegments to be used for the following purposes:1.Physical independence: Different database applications typically define their data inseparate segments. As a result one application can continue to operate although the datafor another has been logically or physically damaged. One application can entirely rebuildits database without affecting another, or an application can continue to operate in adegraded mode missing data in an unavailable segment.2.Logical independence: Different database applications may have information which pertainsto the same external entity, e.g. a person with a particular social security number. Whenone application performs a DestroyEntity operation, however, we would like the entity todisappear only from that application's point of view. Information maintained by otherapplications should remain unchanged. 3.Protection: Clients can trust the protection provided by a file system more easily than acomplex logical protection mechanism provided by the database system. An even higherassurance of protection can be achieved by physical isolation of the segment at a particularcomputer site. A more complex logical protection mechanism would be desirable for somepurposes, but was deemed beyond the scope of Cypress.4.Reliability: Because segment files are physically as well as logically separate, the probabilityof simultaneous physical failure is lower than for data in the same file. An even higherdegree of independence can be achieved using segments at different sites. Replication ofdata can be provided at the level of segments to provide recovery from failure. Ourimplementation's file systems do not do this, however.5.Performance: Data may be distributed to sites where they are most frequently used. Forexample, personal data may reside on a client's machine while publicly accessed data resideon a file server. If the file system provides replication, it can be used to improveperformance for commonly accessed data.Concurrency control may also be handled by the file system, although locks should be at agranularity finer than whole segments (e.g., file pages). As noted earlier, information about an external entity may be distributed over multiple segments.One or more database applications may cooperate in maintaining the illusion that entities, domains,and relations span segment boundaries. This illusion may be used in at least two ways:1.Private additions may be added to a public segment by adding entities or relationships in aprivate segment. The new relationships may reference entities in the public segment by)\ptF ptpt ptptpXtFptpjT7'jRcjPQ/Lu`sp@`JAF`H J`EI `C5?`sp"$`=L `;_s p`9*&0`6%.3`s p1`0F`.O `,} I`*H5&l`s p>`$8#7`"&3`8t`6p`s pH`/,`VE`!'jQj 9)j Nj!BjtW`*1`dF " M \?Q]3CYPRESS DATA MODEL CONCEPTS21creating representative entities with the same name in the private segment. An examplewould be personal phone numbers and addresses added to a public database of phonenumbers and addresses: an application program would make the two segments appear tothe user as one database.2.If two applications use separate segments A and B, they may safely reference each other'sdata yet remain physically independent. One of the applications may destroy andreconstruct its segment if it uses the same unique names for its entities. If both applicationshave relationships referencing an entity e, and application A does a DestroyEntity operationon e, the entity and relationships referencing it disappear from application A's point ofview, but application B's representative entity and relationships remain.2.9 AugmentsIn this section, we discuss a more elaborate mechanism for segmenting databases, with morepowerful properties. We call these augments, because they are "additive" segments as we will see.Entities, domains, and relations are defined independently of augments. An entity with the samename and domain appears as the same entity regardless of particular augments in which data arestored. However, the entity may or may not be defined in a particular augment. Also, relationshipscontinue to be associated with a particular segment.NOTE: The ideas in the remainder of Section 2 have not been implemented, they are included forfuture interest. These features are not discussed again in this report except for Section 5.10, incontrasting data models. Augments are intended for two main purposes:1.Additive databases: Information about an entity may be distributed among multipleaugments. The database system will make all the augment boundaries invisible, i.e. all thedata will appear as if it is one augment from the application program's point of view.2.Subtractive databases (versions): The relations in an augment encode some state of theworld the database represents. Updates, representing changes to that state, can be made byadding them in a separate augment. The database may then be viewed with and withoutthe changes (or a number of alternate changes) by adding and removing the augment(s) ontop.The operations on augments themselves appear very similar to those on segments. However, anordering on the open augment list is maintained by the database system. The DeclareAugment call+[ptpXtptpt;pSBQ6O~4MIIn*spsp'G9 PE@B)spsp@sp-sp >gsp28r 3apZ1-$sp&.@,C*d([4#spsB!wpsQCp,psp,=NVsps!p$ >E H WpYdsp@ /?Q\DESIGN AND IMPLEMENTATION OF A RELATIONSHIP-ENTITY-DATUM DATA MODEL22may specify where in the current list the new augment should be opened:DeclareAugment[augment, file, previous augment] opens an augment with the given name, whosedata is stored in the given file. It is defined to appear before the given previous augment in theordering, or at the end if none is given. GetAugments[] returns a list of all the augments whichhave been opened in order. AugmentOf[relationship] may be applied to a relationship todetermine in which augment it is stored.With the addition of augments to the data model, we redefine the semantics of the basic accessoperations as follows:1.DeclareRelation and DeclareDomain return a handle representing the relation or domainin all augments. The relation or domain is declared to exist in the augment passed as anargument; the declare procedure may be called additional times to define the same relationor domain to extend into other augments.2.DeclareEntity and DeclareRelationship create an entity or relationship, respectively, in thetop-most augment in the augment list in which the respective domain or relation is defined.3.GetF, DomainOf, RelationOf, and Eq are unchanged, defined in the obvious way. Anyentities returned by GetF, DomainOf, or RelationOf are of course augment-independent.Eq returns TRUE iff the two entities have the same name and their domains have the samename, regardless of whether the entities are in the same augment.4.SetF is defined as before, with two exceptions. Consider the callSetF[r, a, e]where r is a relationship in augment A, a is an attribute of RelationOf[r] with type T, and eis an entity value in domain D. This call will cause e to exist in A, if it does not already.D must already exist in A. Otherwise, the call fails and nothing is created in A. (The clientmay create D and retry the operation).5.DestroyEntity and DestroyRelationship destroy the given entity or relationship if there isno namesake of the domain or relation higher in the current augment list. Otherwise, theycreate an anti-entity or anti-relationship, respectively, in the top-most client-declarednamesake of the domain or relationship. The semantics of SetF is, in effect, that of aDestroyRelationship followed by a CreateRelationship with the attribute changed.6.DomainSubset searches its domain in all open augments, and has the property that anentity in an augment will not appear in the enumeration if an anti-entity with the samename exists in the entity's domain higher in the current augment list. DomainSubset never)\OptF ptpt ptptpXtFptpjTt< jR?u0p%jP cjM*u p(jKup jIm(jDpAjB>p`upu p4`u `p%spspu p sps`pspsp sp`spsp!sp `V sp{`u pup5`F;`  s psp.` $up`upup`u pD`N`d =u p  M ?Q]iICYPRESS DATA MODEL CONCEPTS23returns the same entity twice, even though it exists in more than one augment.7.RelationSubset similarly searches its relation in all open augments, and has the propertythat a relationship in an augment will not appear in the enumeration if an anti-relationshipwith the same attribute values exists in the relationship's relation higher in the currentaugment list.Augments act specially upon relations upon which keys have been defined: 1.If a CreateRelationship would create a relationship with the same key value as an existingrelationship in the relation in some open augment, then an anti-relationship is automaticallycreated for the existing relationship (in the same augment as the new relationship, the top-most one possible) before creating the new one.2.If an augment is opened containing relationships whose key values match existing ones inopen augments, then anti-relationships for the matching existing relationships areautomatically created in the newly opened augment at that time.The net effect of our definition of augments is that a user or program may make arbitrarymodifications to data in an underlying augment, in a fashion which appears exactly as if a singleaugment contains all the data. The underlying augment, however, is completely unchanged. Theunmodified data in the underlying augment may concurrently be examined by another user, orappear to be modified through another user's augment. Furthermore, the modifications made by thesame user over time are separated and can later be removed.Note that two augments can be merged in a straightforward way to produce an augment thatbehaves as the two in the same order in the same place in the current augment list. The augmentsare merged by combining the elements of the relations and domains in the two augments, discardingentities and anti-entities that match and relationships and anti-relationships that match.Augments are not related in definition or implementation to the atomic transactions that animplementation of the model also provides. However, the reader might find it informative to thinkof a transaction as an augment defined on top of the current data, which is automatically mergedwith the data when the transaction is committed. Transactions thus serve as "short-term" augments.The two mechanisms are useful for entirely different purposes in practice, however.+RptpXtptpt;pJNFu p#(DFBR@U ;H17up45>3`2*1,/-P"6+ENF(?$8 K"Cs pAZf,52;ONS D Z 5&5B-3"AdS V H?QSDESIGN AND IMPLEMENTATION OF A RELATIONSHIP-ENTITY-DATUM DATA MODEL242.10 ViewsA view is a relation whose relationships are not actually stored. Instead, the primitive retrieval andstorage operations on a view invoke procedures defined by a database client who defines the view.Arbitrary procedures may be defined, and views can therefore be used for a variety of purposes:1.Defining a pseudo-relation in terms of existing relations for convenience: e.g., a fatherview could be implemented in terms of parent and sex relations that are actually stored.2.Allowing changes to the logical representation of data (e.g., actually changing the databaseto store father and mother relations instead) without changing existing programs written interms of the older form.3.Implementing operations on entities in an object-based style by storing tuples in a view.E.g., a Send operation on a Message entity might be invoked by storing a tuple in a sendrelation with two attributes, the message and the recipient. Any result of such a sendoperation would be stored in the database (e.g. as a third attribute of the send relationshipreturned). Thus the view mechanism provides a basis for encoding of proceduralinformation in a database.Views are so-called because they provide a database client a different view of the database than whatwas originally stored. View definitions and implementations are stored in a database as any otherdata, being automatically retrieved when required by the database system.The implementor of a view must define the same operations as needed for any relation. Unlikeview mechanisms in some database systems, views may be defined directly in the underlyingprogramming language. In our case, this is Cedar, and the operations the implementation mustexport are defined as a Cedar interface exported by the view. The view can be dynamically loadedwhen required at run-time. The operations the view provides are:1.RelationSubset and CreateRelationship on the view2.DestroyRelationship, RelationOf, GetF and SetF on its relationshipsA view may also be defined at a higher level than the underlying programming language, in a querylanguage; this simplifies the definition of views as well as allowing some kinds of optimizations thatneed no longer treat a view as a "black box" implementation of an access definition.2.11 SummaryWe have introduced the three basic primitives of the Cypress data model: entity values, datumvalues, and relationships. The basic type checking provided by the model insures that the attributesof relationships are of the proper entity or datum types. Relationship types are called relations.)]"ptF ptpt ptptpXtFptpjUGr jR?psp;&jP JjM2-I`Su`Gp&upup$C`L`Aupup6 `?;`Y`9qupup1u`79% #<CV[d5 5>Q2 TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN  TIMESROMAN HELVETICA  HELVETICA  TIMESROMAN HELVETICA  o!&GNU\2Vfh e ; .=5;]X%39W-3M1 =)]K=(Z$"9 :  %A9a9`E<"$bX9ZbX~bbd3b%S9Pbdbobd~bbd?bpbbb{~babbbbbbi~dCd>z􌻊bbb~bºazN~d>bbj/qModelLevelDesign2.pressCattell17-May-83 17:33:53 PDT: