Towards a Formal Approach for Object Database Design

P. Poncelet M. Teisseire R. Cicchetti L. Lakhal University of Nice-Sophia Digital Equipment IUT Aix-en-Provence ESSTIN Antipolis Ferney Voltaire University of Aix-Marseille II University of Nancy I 13s - CNRS - URA 1376- 250 avenueA. EinsteinSophia Antipolis - 06560 Valbonne- FRANCE E-mail: [email protected] Tel: (33) 92 94 26 22 - Fax: (33) 92 94 28 98

Abstract 1 Introduction

This paper focuseson a formal approach* for advanced Modeling needs for new applications and flaws in the databasemodeling and design. It is based on the IF02 relational model have led to the definition of more model,an extensionof the semanticmodel IF0 definedby powerful mod& which are extended relational [I] or S. Abiteboul and R. Hull. It preserves the acquired object-oriented [5], [6] and [15]. The generic term for strengthsof the semanticapproaches, whilst integrating associated systems, of which certain prototypes are concepts of the object paradigm. To model an IF02 described in [26], is Advanced DatabaseManagement schema,the structuralpart of the modelincluding concepts Systems.As a consequence,current research work is such as alternative, composition, grouping for building focusing on the definition of new modcling and design complex objects and semantic constraints is formally approachesable to satisfythe needsof both traditionaland specified.Furthermore, the definitions of updatefacilities advancedapplications [7], [l l] and 1131.The prcscntcd necessary to modify and perfect IF02 schemas are researchwork fits into this context:a new approachwhose specifiedthrough changerules. Finally, in order to design threemain aspects are the following ones.Firstly, a formal a databaseschema, an IF02 schemais translated,in an object model IF02 1281is defined for advanceddatabase automaticalway, into an existing target (implementable) modeling as an extension of the semantic model IF0 model.As an illustration,we presenta translationfrom the proposedby S. Abiteboul and R. Hull [2]. Its objective is IF02 model into the CQone. The result is a new coherent actually to reconcileapparently opposed ideas: an optimal and formal approachwhich is useful in overcomingsome data representationand a completereal world modcling. of the difficulties in the specificationand designof object- IF02 attempts to preserve the acquired strengths of orientedapplications. semanticapproaches. whilst integrating conceptsof the object paradigm [4]. Secondly, structural update primitivesarc formally proposedthrough change functions to offer an incrementalspecification of IF02 schcmas. They are crucial for they assistthe designer to take into account real world evolutions or to rectify a part of his schemawithout redefining the whole. They also play a * Thix wok. xuppod by the PRC-BD3 and WI Extawl Euntpean Rorslmh part in the merging of existing sub-schcmasand so they hjxol in coR&0doo with Digital Bquipnau, amnoawilbin Ih uq4 of a larger may be seen as one important element in a vicw- pmjsct whas aim is to realize m aided system for l dvumcd rppliutioo modeling integration process. Finally, in order to design object and dcsip. databaseschema, a of transformationrules translates Permission to copy without fee all or part of this material is an IF02 schemainto an implementableone granted provided that the copies are not made or distributed far direct commercial advantage.the VLDB copyright notice and fhe The aim of this paper is to describe our approach in title of the publication and its date appear, and notice is given conuastwith the relatedworks and particularyto present: that copying is by permission of the Very Large Data Base 1. The structuralpart of the IF@ model. Endowment.‘To copy otherwise, or to republish, requires a fee 2. The associatedstructural update facilities through an&or special permissionfrom the Endowment. changerules. Proceedings of the 19th VLDB Conference, 3. The formalization of the translation rules from an Dublin, Ireland, 1993. IF02 schema to an 02 one (according to the

278 cstablishcd02 model [ 161)to justify (and illustrate) modelobjective is to integratethe object paradigmwhilst our approach. retaining IF0 modeling strengths. It boosts modeling Finally, we briefly give some aspects of the abilities and appears more suitable for advanced implementationof the system. applicationdesign than object models. To modify and perfect an IF02 schema,formal structural updatefacilities are offered. Thesechanges are formally takeninto considerationthrough update functions [23]. 2 Related Works and Proposal Whenthe schemaseems to be completefor the designer,it would be carried out, automatically,into a target model, Before presentingour approachand in order to highlight by usinga transformationfunction. its contributions,it would be interestingto providea brief surveyof modelingand designapproaches. Among them, We assert that it is essential to have a really rigorous therearc two main trends. approach as IF02 The object paradigm allows and The fit group involvessemantic currents. They are based encouragesa modular modeling of the real world. So, on conceptual(or semantic)mod& for real representation. object modeling can sometimeslook “anarchistic” and Their principle is to offer the users concepts powerful thereforedifficult to handle 1311.In order to avoid such enoughto achieve,from the real world, the mostcomplete problems,a formal approachleads to a schemawhich is specification possible. The resulting schema is then non-ambiguous,without omissions,modifiable and easily translatedinto a logical or implementableone. We may reusable.Moreover, it has the advantageof faciliting not quote [Ill, [17], 1271and [301. However, the classical only the comparison of different designs but also the models in this group generally suffer from the lack of verification of updateson specificationswithout further concepls (object-identity, reusability,...) which are validations. efficient for advancedapplication modeling. Furthermore, in this trend, structuralupdating capacities are not always First of all, we presentthe IFO;! model. Update facilities proposed,and when they exist, they are describedin an are thenexplained and definedthrough change rules. intuitive way. The secondclass encompassesobject-oriented currents. Their major goal is to capture the dynamic aspectsof applications[21] and [25]. In contrastwith the fit class, 3 The IF02 Model &se approachesdo not offer enoughstructural concepts (often limited to those of implementableobject mod&) IF02 adopts the philosophy of the semanticmodel IFO. for a completereal world modeling.Generally, additional Two main extensionsare realized. Firstly, an explicite methods are used to express semantic structural definition of the object identifier which is object constraints,These trends do not respectthe indcpendcnce independent, is integrated. To achieve this, all betweenthe sourceand target models.Furthermore, they manipulatedelements of IF0 are re-defined to consider involve an optimized representationof data, i.e. type- the object paradigm. Secondly, to fully meet our oriented,when an attribute-orientedmodeling is advisable “conceptual”objectives, the modelingpower of IF0 must for the conceptual level [13]. The implication for the be enhanced. Then, the concepts of alternative, database designer is the necessity of specifying composition and grouping for building complex objects preliminary representation choices. These choices have been intcgratcd. The connectivity and existency sometimescut off partsof the real world being modelled. constraintsare explicilly specified. The object models provide database evolution In the next sections, we propose a part of formal mechanisms(three trends have been defined in [3]) but definitions of the IF02 model. Instance and attached they do not deal with conceptual schemas,and their objectconcepts are not presented,the interestedreader can objectivesdiffer from ours. However,they are interesting rcfcr to [28]. Firstly, the object and type conceptsare for they pinpoint two levelsto be takeninto consideration: dcscribcd as well as the different constructors. The the IS-A hierarchy and the composition hierarchy. For fragmentnotion and IF02 schemaare thendetailled. instance, we may quote: the Mosaic0 system where algorithms are defined for type insertions into a lattice [ 191;the Esseproject where algorithmsensure consistent 3.1 Object and Type updatesof an 02 databaseschema 191 [32]; the Gemstone In the IFOZ,model, an objecthas a uniqueidentifier which [22] and Orion [ 141systems, the Sherpa[201, Farandole2 is indcpcndantof its value.Furthermore, the domain of a [3] and Cocoon [29] projects:where rules for the schema type describes the possible values for its objects. The evolutionare stated. figure I showsthe componentsof the type ‘Name’. We would suggestan approachbased on the formal model IF02 which is both type and attribute oriented.The IFO;!

279 Object Type Type Domain 3.1.2 Complex Types The IF02 model takesinto accountfive type constructors \ \ String [20] and makesa distinction betweenan exclusiveand a non- Name exclusivebuilding. Theseconstructors may be recursively 0~7 (id N1. ‘JOCELYN’)~=(tdN2,‘HUGO’) ’ applied according to specified rules for building more complextypes. For example(see the figure 3). ‘Address’is built up from Objects of Type ‘Street’, ‘Number’ and ‘Zipcode’ types and ‘Wheels’ is Figure 1 - Object Type Example composedwith the ‘Wheel’type obtained from ‘Axle’ and Tyre’ tyt?es. Defidlion 1: 70 is an infinite set of object types such that: V 1 E TO, Dom (r) is an infinite set of symbols, including the empty set, called the value domain of 7, Did (7) is an infinite set of symbols called the identifier domain of ‘5.Objects of type ‘care defined by a pair (id, value)such that: V o, o’ of type r, 3 (id, id) E Did(Q2, 3 (value, Notation: value’) E Dom (I)~ such that: if o=(id, value), o’=(id’, value’)and id # id’ theno f 0’. The infinite set of objectsof type o is called Obj (‘5). AggregationComposition Collection Grouping Union type 3.1.1 Printable and Abstract Types Figure 3 - Type constructors Thereare threebasic types (shown in the figure 2): 1. A printable type (TOP), used for I/O application Aggregation and Composition Types (Input/Output are therefore environment-dependent: Aggregation and composition representthe aggregation String, Integer, Picture, Sound, . ..). which are abstraction of semantic models 1121 defined by the comparableto attributetype of the Entity/Relationship Cartesianproduct. It is a composition,if and only if, each model [27]; objectof an aggregatedtype occursonly once in an object 2. An abstract type (TOA) which would be perceived constructionof aggregationtype. as entity in the Entity/Relationshipmodel; 3. A represented type (TOR), defined in the section Definition 3: Let ‘JO7& be an infinite set of 3.1.3, which handles another type through the IS-A specialization link. This concept is particularly aggregation types, let 70% be an infinite set of interesting when considering modularity and composition types, two disjoint subsetsof 70, suchthat: reusability goals. The designer may defer a type V~sEOTAu7OX, 3 q,9 ,..., f,~TO,n>l, descriptionor entrust it to somebodyelse, while using suchthat this type for modelinga part of the applicationschema. Dom (r) L; Obj (rl) x Obj (r2) x . .. x Obj ($), r is structurallydclined as: V o E Obj (r), 3 01 E Obj (71).o2 E Obj (r2), TOP ~powerl TOA @ TOR @ .. . . on E Obj (r,) suchthat: o = (id, lol,o2, .. . . on]); Figure 2 -Basic Type Examples if r E ‘JO’J’Cthen V o’ E Obj(r) with o f o 3 0'1 E Obj(rl), 0’2 E Obj(r2). .. . . O’n E Definitfon 2: Let TOP be an infinite set of printable Obj(rn) suchthat o’ = (id, 10’1.0’2,. . . . o’,]) rypes,let 7OA be an inftnite set of abstract types, two with V i E [ l..nl, Oi 6 (0'1,0'2, ,.., Oln). disjoint subsetsof 70, suchthat: 1. V ‘FE TOP, dom (z) is an Smite set of symbols: Collection and Grouping Types 2.VTE 7OA,dom(r)= (0). They representthe set-of constructorof object modelswith an exclusivityconstraint for the grouping. An abstract type actually representsan entity without internal structurebut neverthelessidentifmble and having properties,hence its valuedomain is empty. Definillon 4: Let 70SC be an infinite set of collecrion 1. The set of verticesST is the disjoint union of eight lypes,let 7OSci lx im infinite set of groupink, types, two sets 7OP, 70A, 7032,707A. 707c. 7osc. disjoint subsc~s of 70. suchthat: 7osc& 7ou7. Vre 7OSCu7OSa,3!r’~ 70suchthat: 2.1fT~ 70athcnTisrootoftype. Dom (z) s P(Obj (r) where P(Obj (7’)) is the 3. The leavesof the are printable or represcntcd powersetof Obj (r), QQCS. r is structurallydefined as: V o E Obj (r), 3 01.02, .. .. On E Obj (r’) suchthat: An abstracttype cannot be used in a built type since its role is to describea real world entity which is not defined 0 = (id, (01.02, .. . . On)) by its internal structurebut through its specifiedfragment ifre 70SathenVo’E Obj(r)witho#o properties. 3 0’1.0’2, ...( o’, E Obj (2’) suchthat: 0’ = (id’, (0’1.0’2. ...) oln)) with V i E [l..n], 3.2 IF02 Fragment Oi E (0’190’2, ..e, O’n). The typescould be linked by functions (simple,complex (i.e. multi-valued), partial (O:N link) or total (1:N link)) throughthe fragment concept.The aim of the fragmentis Alternative Types (Union Types) to describe properties (attributes) of the principal type Stucturally different types can bc handled in a uniforme called heart.The figure 4 describesthe fragmentof heart way throughthe alternativetype concept.This constructor ‘Person’ having ‘Name’, ‘Address’ and ‘Vehicle’ as reprcscntsthe IS-A generalizationlink enhancedwith a propcrtics.For eachvehicle associated to a person,them is disjunctionconstraint between the gcnemlizcdtypes. a contract insurance number, this is called a nested fragment.First Namesare not alwaysknown for a person. Definition 5: Let 7OU7 be an infinite set of union type types,a subsetof 70, suchthat: V r E 7OU7, 3 rl, r2, .. . . rn E 70, n > 0 suchthak Dom (r) s Dom (rl) u Dom (r2) u .. . u Dam (Q), r is structurallydefined as: Vi,jE [l..n] if i+j then Obj (Ti) n Obj (rj) = 0, Obj (r) = Obj (q) u Obj (ri> u .. . u Obj (‘In), with V o E Obj (r), 3 ! k E [l..n] suchthat: 0 = ok, ok E Obj (rk). 3.1.3 Represented Types The definition of representedtypes takesinto accountthe multiple inheritance since a representedtype may have 1Insurance] sevwaIsourcea. Notation: b ...... (,* Deflnilion 6: Let 7OR be an infinite set of represented Total function Partial function Complexfunction types,a subsetof 70, suchthat: Figure 4 - The Fragment ‘Person’ V r E 70% 3 rl, ‘52, ,.., r, E 70, n > 0 called source(s)of r suchthat , Obj (r) s Obj (‘rl) u Obj Conventions: we call Dartial a function in which some (r2) u .. . u Obj (rn) with V o E Obj (r), 3 oi E elementsof the domainhave no associatedelements in the Obj (ri) suchthat o = Oi. codomain. Otherwise, it is called &tt& The of handledgraph is: G = (X, U) wherethe set of verticesX is 3.1.4 Types the set of types T of 70 and the set of edges U is From basictypes and constructors,it is possibleto dctine a composedwith: simple em (simple functions) and type4as a tree, in a generalway. wmolex ew (functions applied on a 7OSC, called complex functions: an image of an object is a set). The Deft&&m 7: A typeT E 70 is a directedtree T = (ST, edge is called either partial or total if the associated ET), whereET is a set of type edges.T is suchthat: functionis eitherpartial or total.

281 Defmition 8: An IF02fragment is a graph F = (VF, LF), 3.2. Two directed paths of IS-A links sharing with VF the set of types T E ‘JO and LF the set of the same origin have to be cxtcndcd to a common vertex. fragment links, defined such that: 1. There is a direct tree H = (VF, A) such that: The structural part of the IF02 model having now been 1.I. The root of H is called heart of fragment. formalized, we examine the supplied update facilities. 1.2. The source of an edge is either the heart root or the root of a target type of a complex edge whose source is the heart root. 2. For each edge linking the heart to a represented 4 Updates on IF02 Schema type, there is a reciprocal total edge. The IF02 fragment is called by its heart. Due to space limitation, we just prcscnt updates on IF02 schemain an informal way. The intercstcd rcadcr may find 3.3 IF02 Schema more details in [23] whcrc a functional approach is dclincd to formally ensure the structural consistency of IF02 An IF02 schema is composed of n IF02 fragments: FI, updates. F2, .. . . F,, n > 0, related by IS-A links according to two rules. The figure 11 illustrates one IF02 schemamade up 4.1 Motivation with five fragments ‘Person’, ‘Employee’, ‘Vehicle’, ‘Car’ The problem with schemaupdates can be summarizd by: and ‘Engine’. They are linked with IS-A links through the how to modify a given schema whilst preserving a represented types (‘VehicleYUsed’, ‘Employee’, ‘V-Car’, cohcrcnt reprcscntation? In other terms, our aim is to Truck-Engine’ and ‘Car-Engme’). ensure that updates retain the schema consistency. In object model, consistency can bc classified in structural 3.3.1 Specialization Link consistency which rcfcrs to the static part of the database The IS-A link in the IFO;! model is the specializnion link and in behavioral consistency relating with the dynamic of the semantic models [12]. It represents either the part [32]. In this paper, we only deal with the structural (inheritance) if the target is a fragment heart or case. the client/supplier concept [IS]. An IF02 schema is a couple (Ss. Ls) where Ls is Definition 9: Let ‘5’be a type of ‘TOR and let T be a composedby both fragment and IS-A links but not cvcry type of TO, such that it is the (or one) source of ‘5’and a arbitrary couple (Ss, Ls) is a correct schema. Thus, WC heart of a fragment, the link of head T and queue z’ is have to make sure that the result of modifications is an called an H-A link. T is called the source of the IS-A updatedschema which verifies the IF02 schemadefinition link and ‘I’ the target. (correctness). Therefore, WC give a set of schema invarianls which arc conditions to be satisfied by any valid The figure 5 illustrates the specialization link between schema.A similar approach is adopted by models such as ‘Vehicle’ and ‘Vehicle-Used’. Orion, 02, Gemstone,Cocoon and Shcrpa. Some schema changes are quite simple whereas others Target need a complcle reorganization of the database The latter Vehicle can often be decomposed into a sequcncc of more elementary changes. The following taxonomy, figure 6, Queue prescnls the schema update primitives in IFO2, which is Figure 5 - Notation for Specialization Link minimal and complete in the sen.scthat all possible schema transformation can be built up by a combination of these 3.3.2 IF02 schema elementary operations (completeness). Such a taxonomy Defmirion IO: An IF02 schemais defined as a graph CS can be found in models like Orion, Shcrpa and Cocoon. The two former give three catcgorics of operations: = (Ss, Ls) with Ss the set of types T E ‘JO of the graph changing class definitions, i.. instance variable or such thar methods, modifying the class lattice by changing the 1. Ls is the disjoint union of two sets Ls-A rcladonships bclwccn classes and adding or dclcting (fragment links) and Ls,IS-A (IS-A links). classes in the lattice. As the latter is based on type. 2. (Ss, L& is a forest of IF02 fragments, called function and classes, schema changes are rcspectivcly: the IF@ fragments for GS. type updates,function updatesand class updates. 3. (Ss, Ls IS A) follows thesetwo schemarules: All schemastructure changes. as for instance a fragment 3.1. There is no IS-A cycle in the graph. insertion into the dircctcd acyclic graph, may bc cxprcsscd by a sequcnccof basic updates.For exam@. the fragmcnl insertion may be done by: ~(1.1) a type insertion, (3.1) zero or more IS-A link insertionand finally, (3.2) zero or more IS-A link d&don (in the cast of a node ins&on into the direct acyclic graph)>. The primitive (1.4) is necessaryto preservethe schemain a valid state for it is not equivalent to the sequencesc(1.2) (l.l)> or ~(1.1) Initial Schema (1.2)~ when the type has to be rclatcd to other ones.The consequenceof applying such sequencesmay occur in a temporary invalid state: as instance, if we want to substitutea grouping componentusing <( 1.2) (1 .l)> or c(l.1) (1.2)>, the application of (1.2) (respectively(1.1)) carries out the schemain a forbidden state: a grouping without component (respectively a grouping with two components). $1)Types updates (l.l)Addancwtypc “y Doors (1.2)Delete atype (1.3)Change II type (1.3.1)its name (1.3.2)its domainfor printabletype only J1.4)Subslitutc a type Final Schema Figure 7 -An IF02 fragment creation example

~1 Invariants: 1.1:a type T hasto follow the definitions 1 to 7 of an IFO;! type* 1.2: in the graph: Figure 6 - Taxonomy of possible updatesin IF02 1. Thereis no IS-A cycle. 2. Two directedpaths of IS-A links sharingthe same Intuitively, in IFO2, a schema update is either a type origin haveto be extendedto a commonvertex. insertionor a type modification in a fragment.The former 1.3: the sourceof an IS-A link must be a fragmentheart caseis definedas a type insertionwhich mustbe relatedto and the targeta representedtype. the schema.WC can create a fragment, add a type to a 1.4: the sourceof an edge is either the heart root or the fragmentor relate a type to others.The latter is described root of a target type of a complex edge whose with one or more operationson the concernedfragments sourceis the heart root and for each edge linking which are themselvesmodifications on types.Operations the heart to a representedtype, there is a reciprocal like insertionof a sub-typeinto an existingone, deletion of total fragmentedge. 1.5: a fragment cannot be isolated (except if it is the a type and substitution of one type by another are thus unique one), i.e. it has to be related to other ones possible. throughIS-A links. 4.2 Presentation For example,the typ insertionof a Wheel’sbrother could WCpresent the schemainvariants that the transformation not be possiblebecause the invariantI.1 is not satisfied(a processmust maintain,and the necessaryrules to provide groupinghas only one component). a guidelinesfor supportingschema modifications. As we havejust discussed,two rule categorieshave to be taken 4.2.2 Insertion Rules into consideration:insertion and modification. A type insertioninto a schemais either a fragmentcreation In this section,we illustrate the introducedconcepts using or a property insertion into an existing fragment. The the following schemawhich is a subpart of the figure 11. insertion rules have LOrespect the schemainvariants and therefore,some insertions are forbidden.For instance,the 4.2.1 Evolution Schema Invariants addition of the type ‘Car’ without adding the IS-A link The following schemainvariants ensurethat the change from ‘Engine’to ‘Car-Engine’violates the invariantsI.3 and doesnot leavethe updatedschema in an inconsistentstate. 1.5.The fragmentproperties may often be modified,so the If the changewould violate the invariants,it is rejected. following rules providea guidelinefor supportingchanges into the fragment.

283 R4.2: if the father is a grouping or a collection then Rule 1: Addition of a type into a fragment deletion of the father vertex (rule 4) cise if the R1.l: addition of the type (primitive 1.1). father is an aggregation, a type union or a R1.2: addition of the fragmentlink relating the fragment composition & there is a unique brother then heart to the type (primitive 2.1). substitution of the father type by the brother one (primitive 1.4) elsedeletion of the type whoseroot Rule 2: Addition of a represented type or a type built is the VCIWX(primitive 1.2). up with represented types R2.1: addition of the type into the appropriatefragment Consider the deletion of the type Tyrc’. As ‘Wheel’ is a (rule 1). composition of two elements, the dclction of ‘Wheel’ R2.2: if the type is a representedone, addition of tbe would provide an inconsistenttype (a composition of a reciprocaltotal fragmentlink (primitive 2.1). unique clement violates the invariant 1.1). The updates R2.3: addition of the IS-A link(s) whose reprcsentcd have thus to be send back in the ‘Wheel’ father lcvcl type(s) is&e) target(s) (primitive 3.1). substitutingthe father type by the Tyrc’s brother (R.4.2). R2.4: if the type is a representedone and a fragmenthwn, The schemavertex set is thus dccreascdwith (Wheel, additionof the IS-A link(s) which it is the sourceof Tyrc). The following figure showsthe updatedtype: (primitive 3.1). R2.5: if the type is a representedone and a fragmenthcan, deletionof the IS-A link(s) relatingthe R2.3 source vertices to the R2.4 targetvertices (primitive 3.2). Wheel For example,the type insertionof ‘Car’ has to connectthe type ‘Car-Engine’ to ‘Engine’. As ‘Car’ is a leaf of the rs , there are no representedtypes whosesource is ‘Car’ (rule 2). The schemacomponents arc thus obtained as follows. The original set of schema vertices (Engine, Power, Reg-Number) is increasedwith the ‘Car’ vertices(Car, Car-Engine,Wheels, Wheel, Axle, I Door Tyre, Body, Chassis,Doors, Door) applying the R.l.l Figure 8 - The mulling type u&r type deletion statement.The fragment link set is not modified because the insertedtype is a fragment heart. The application of Rule 5: Deletion of a type into a fragment R2.3 provides the IS-A link set composedby the link R5.1: dclction of its rclatcd types which arc not fragment relating ‘Car-Engine’to ‘Engine’. heart(rule 4). Now, the addition of ‘Car-regist’ as a ‘Car’ fragment R5.2: dclction of the fragment links relating it to the property,following the rule 1, updatesschema components previoustypes R5.1 (primitive 2.2). such as: the type ‘Car-regist’increases the set of schema R5.3: dclction of the fragment link relating the fragment verticesaccording to the R1.2 statement;the fragmentlink heartto the type (primitive 2.2). set is updated for ‘Car-regist’ is related to ‘Car’ and the R5.4: d&lion of the type (primitive 1.2). IS-A link set is not modified becausethe insertedtype is not a representedone. A type dciction provides necessaryoperations dclcting fragmentlinks rclatcdto and rclatcd from the type (rule 5). 4.2.3 Modification Rules For instance.the ‘Car-regist’dclction needsto dclctc the Schema invariant constraints can be violated by fragment link from ‘Car’ to ‘Car-rcgist’ (R5.3) of the modifications.It is thus necessaryto definerules to obtain schcmnfragment link set. a valid updatedschema. The following rule is usedto preventthat the invariantI.5 Rule 6: Deletion of a represented type or a type built is controlled. up with represented types into a fragment R6.1: deletion of the IS-A link(s) whose rcprescntcd Rule 3: IS-A link deletion condition type(s)is/are target(s) (primitive 3.2). R3.1: an IS-A link can be deletedif and only it dots not R6.2: if the type is a rcprcscntedone and a fragmentheart, carry out one isolatedpart in the resultingschema. dclction of the IS-A link(s) which it is the sourceof (primitive 3.2) and (rule3). Rule 4: Deletion of a type vertex R6.3: if the type is a representedone and a fragmentheart, R4.1: if the vertex is a representedtype, deletion of IS-A additionof the IS-A link(s) relatingthe R6.1 source link(s) which it is the target of (primitive 3.2) and vcrticcsto the R6.2 targetvertices (primitive 3.1). (rule 3).

284 R6.4: if the type is a representedone, deletion of the fragment links relating it to the fragment heart (primitive 2.2). R6.5: deletion of the type in the appropriate fragment (rule 5). When a type is a representedone or is built up with representedones, its deletion changesthe schemaIS-A links. This is done through the rule 6. For example,the deletion of the type ‘Car’ has to delete the IS-A link between‘Car-Engine and ‘Engine’(R.6.1). class C-Vehicle public type tuple ( As the IF02 model and its update capacities are now Vehicle : tuple ( defined,we will examinethe IF@ translationinto the @ is-Truck : boolean. Truck : C-Truck, model[16]. is-V-Car : boolean. V-Car : C-Car). Capacity : integer) end, class C-Truck 5 Mapping an IF02 Schemato an 02 public type tuple ( Schema Truck : tuple ( Cab : C-Cab. Trailor : C-Trailor, Truck-Engine : C-Engine)) method Check-Compo-Truck : boolean This mapping follows the sameprinciple as the rcalizcd end; transformationfrom MORSE to 02 [7]. As this application class C-Trailor of a principle frame is on the “whole-object” from the public type tuplc (Trailor : string) end; “source”model level, the ways of translationare different class C-Cab Therefore, we define checking methods and associated public type tuplc (Cab : string) end; classesfor composition,grouping and union type. We also considermultiple inheritancegenerically. Figure 9 - The fragment “Vehicle” and the associated 02 The formalization of the mapping will be given after Classes havingintroduced it throughan example. The “Engine” fragment is translatedinto a classwith two attributes: 5.1 Illustration A An IF02 schemais translatedinto an 02 schema.Each fragmentgenerates at leastone @ class(more if they are composition,grouping or alternativetypes). WCtranslate a part of the IF@ schemadescribed in figure 11 into an 02 schema.Therefore, we work successivelyon class C-Engine the two fragments“Vehicle” and “Engine”. public type (Power : string, The “Vehicle” fragmentis mappedinto a particular class. Reg-Number : integer); It representseither a “Truck” elementor a “Car” element. Figure 10 - The fragment “Engine” and he associated 02 To do this, adopting a similar principle as in [8], we use Class two boolean attributes “is-Truck” and “is-Car” which indicatethe object type. We alsoneed to dctine the classes “C~Truck”. “C-Cab” and “C-Trailor” so that each object 5.2 Transformation Functions of these types has an identifier. Furthermore,a method We suggestto define the transformationfunction which checks the exclusive composition constraint in the class carriesout an 02 schemafrom an IF@ schema. “C-Truck”. As the representedtypes are not fragment heart, they are translated using the 02 composition. 5.2.1 Transformation Function Otherwise,the associatedclass has to inherit the generic Definition 11: Let ‘S be lhe lransformation function class: for instance,the class employee inherits the class from the IF02 modelto the @ one: Person. 7: IFO2+ 02 m 7 (IF@ schema) = u 7 (Fragment+ j=l wherem is the fragmentnumber of the IF@ schema.

285 This transformation uses a f function (with three parameters:the function source type, the function target 5.2.2 Types and Edges Transformation and the kind of function (simple (partial or total) or Definifim 13: The Ffunction translatesfragment types complex(partial or total)*) which translateseach fragment either in @ type or in 02 class.It is dcfincd as: edgeinto the 02 model.We adopt the following notation: for each t type of 70, C-t is a class name and t is an 0 ift o7W: attributename in the 02 model.

Defurition 12: Let n be the edgenumber whose source is 0 ift E 70R it hasonlyonesource: the fragmentheart, 7 is definedas: f( I, 0,O) = C-t’ /*t’tthc-ofIheIS~Alink*/ 7 (Fragment)= ht hasmsounxs: 1. ifheartt 7OAu7Ok f(t. O,O)=C t *tbacrmmaoomd of IS-A links l / class C-heart A class C-t inherit C tl, .. . . C-t, public type tuple ( heart: f(heart, 0, 0) /* in CISC of name conllic~. 4 is rblc m rdvc it hy adding l pr&r m tbc Cllss name *I 2. ifhCVtE 70A: class C-heart public type tuple ( 0 ift E7OA k 3. ifhearto 7031: f( I, 0, 0 ) = tuple ( ti: f(ti, 0, 0 )) P I is tbc nombor of 1.9-A links */ i=l class C-heart inherit C-t], ..,C-ts public type tuple ( 0 ift E707A 0 k-n f( 1, 0, 0 ) = tuple (ti: C-ti , y;(tf, 0, 0 )) tUrg& F(heart, targeti, simplekomplex)) i=l J’I i=I P k is Be nomhor of lw811d lyp~l and n lbe number of TOOR 1~ l / 0 if heartE 707C: A k methodpublic Check-Compo-heart : boolean class C-ti public ly/E tuple ( ti: P(ti, 0, 0 ) i=l 0 if heartE 7076: if ti E 707C: methodpublic Check-Set-heart : boolean method public Check -Cotttpo-ti: boolean if ti E 707(;5: 0 if targetiE 7OR A (targeti,heart, simple) methodpublic Check-Set-ti: boolean methodpublic Check-Simple-targeti,( end; F(t(targeti,0. o ) ): boolean 0 ift E707C: A (tatgeti,heart, complex): f( I, 0, Cl ) = set (P(t’, 0, 0 )) Pt’i~Ihecoilecmd~ype*/ methodpublic Check-Complex-targeti ( F(twgeti, 0, q ), integer): boolean 0 ift E707f% ff 1, 0,o ) = /* I’ istbc collcucd Iypc *I if targetiE 70713 ift’o 7OR set ( Fft’, 0, 0 )) methodpublic Check-Compo-targeti: boolean if t’ tz 70& set ( C-l’) if targeti15 707tZ: class C-t’ public type tuple ( t’: Pft’, 0, 0 )I methodpublic Check-Set-targeti : boolean if t’ E 70% methodpublic Check-Compo-t’:boolean end; if t’ E 707tZ: methodpublic Check-Set-t’: boolean end;

286 if (!(self -Test-compok(self Xcompok) return false; if 1 E TOUT return true:}; k k F( I , q I, CI ) = tuple (is-ti: boolean, ti: C-tt ) The method verifying that one element belongs to an i=I i=l objectof classC-Ckzss is *: k method body Test-compoj (object: C-compoj): A ClUSS C-ti Pkisthcnumherofmocirtedtypa*/ i=l boolean in class C Classe {02 C-Classe obz ~nnnqi~r~en~ot~~t*/ public tyt~ tuple ( tt: F(tie q I,o )) 02 boolean result= true; if ti E TOTE for (obj in C-Classe-s where obj->C-Classe.compoj methodpublic Check-Compo-ti: boolean == object) {result=false;}; return result:}: iftie Wm: In the same way, the following method verifies the methodpublic Check-Set-ti: boolean groupingof a type t whosecollected type is t’: end; method body Check-Set t : boolean in class C-t F( heart, target, simple) = F( target, q , q ) {02 C-t obj, C-t’ obj-?; *rtir~&r~fti~t *I 02 boolean result=true: For a complex edge,the targetcan be the sourceof p for (obj in C t s) other edges (nestedfragment) with target2i+ heartV i ifor (obj-trTn obj->t where obj-t’ in self->t ) E [ 1. . ..p] (edgeswhose target is the heart,have already {result =false;) ; been translated): return result;);

F( heart, target, complex) = The other checkingmethods are definedin the sameway. set ( tuple( target: F( target, 0, 0 ), 6 Implementation target2: F(target. target2i, simple1complex))) i=l In this section, we briefly indicate some aspectsof the implementationof the IFO;! system. if F( heart, target, simple totallcomplex total) A first versionof the IF02 editor is currently developped then aad an existence testfor attribute target value in under Unix/XWindow (XllR5). with the help of the the Init heart method. Aids/Masai (Release 1S) programming environment, dcveloppedin object-orientedLe-Lisp (Release15.24). F( target, target2, simple) = F( target2, 0, 0) This editor, as illustred in figure 11, is made up of three F( target, target2, complex) = tools: 1. A graphical view consisting of an editing panel, a set( F( target2, 0, 0 )) tool paneland a workspace; 2. A selectionpanel of object types and existing link if F( target, target2, simple totallcomplex total) types; then aad an existence testfor attribute target2 value in 3. An object editor enabling the textual representation the lnit heart method. of textualobject as well as informationwhich doesnot appearon the schema. 5.2.3 Structures of GeneratedMethods This part describes the structure of some generated methods. These methods are added into classes as semanticsconstraint checkers. Generally, the method checking the exclusiveconstraint for compositionof a type t E 7071: is: method body Check-Compo-t boolean in class C-t { ~kbthonumbcmfcompauntt~*/ l For I C-Clurc class. the C:Clrsrc-s value i Ihc insunces set of Ihc if (!(se@Test-compol(self> t.compol))) C-Clruc chr. For each new instance of C-Clane, it is nccasuy to modify return fdse; . . . the rc( which ia defii as: Name C-Claste~s: ut(C-Claue).

287 Figure I I - The IF02 editor

The type definitions achieved with the editor are converted The second strength of the model is the integration of by a translator into 02 descriptions. The descriptions may constructors which are indispensable to the development thus be used in the 02 system. For instance, the methods of advanced applications, such as composition and described in the previous section have been implemented grouping. The latter enables the constituant sets to be in the 02 Database Management System (Release 3.3). “physically” taken into account. The following example shows some generated methods The most original aspectof IF@ is that it draws upon both associatedto the class C-Truck: elementswhich may be said conceptual. such as fragments and rcprcscnted types, and implementable such as object method body Che&Compo_Truck: boolean in class C-Truck idcntificrs. The case of multiple inheritance is a special ( if (!(self->Test-Cab(self->Truclc.Cab)))return false; case given that, at the conceptual Icvcl, no conflicts arc if (!(self->Teat~Trailor(self->Truck.Trailor))) return false; involved while at the system icvcl, all conflicts gencratcd if (!(self->Test_Truck_Engine(self->Truck.Truck~Engine))) are explicitly processed. We have seen that IF02 retum false; return true; ); inheritance may be multiple but does not rquire any prior method body Test-Cab (object: C-Cab): boolean in class management.The conflicts are processedaccording to the C-Truck ( 02 C-Truck obj; target model while the translation rules are defined. 02 boolean result=true; Another advantageof IF@ is the way it can modulate and for (obj in C-Truck-s where obj->Truck.Cab == object) reuse parts of schemathat have been dcvelopped, through (result=false;); return result; ); the fmgment concept. Therefore, it is possible to focus on /* namedvalues declaration */ only one part of the schema while reusing, through name C-Truck-s: set (C-Truck); represented types, the already dcfincd and validated components. The fragment concept represents another advantage of 7 Conclusion IFO2: namely the easeof integrating application dynamic through this structure. It cnablcs the behavior of the heart In this paper, we have formally defined an object model type to be described naturally and above all makes it IF02 as well as its transformation into the 02 model. We possible for behavior to be inhcritcd through represcntcd have also presented the offered updates facilities in an types. informal way. As a conclusion, first of all we would like to Finally, IF02 is totally independent in relation to highlight its contributions so as to indicate the prospectsof implementable models, while providing an ease of this work. transformation rule definition towards different models The first contribution, that of the IF@ whole-object. is the due to its genericity. The translation of an IF@ schema coherent and rigorous definition of the component into an @ one is a prime example of this. The formal rule elementsof the model through the object identity concept. definitions rcducc data-lossand misinterpretation.

288 The presented update capacities is a strength of our Hull R. and King R. - Semantic Database Modelling: Survey, approach. They ensure the integrity of the updated Applications, and Research Issues. ACM COmpIIli~lg Surveys, Vd. 19, No 3, Sepmbcr 1987, pp. 201-260. - schemas. The result is a cohcrcnt and formal approach. Hull H. - Four Views of Complex Obiects: A Soohisticatef The ambiguities and contradictions are then detected and Ietrodt&tm. In lAbFi89i. pp. 87-l 16. - different schemas may be compared. Furthermore, in a Kim W.. Be&o e. and- Garza. J.F. - Composite Objects reusability goal, the security obtained through the Revisited. Procdinnr of the ACM SIGMOD Conference. June 1989, pp. 337-347. - consistency of handled infonnations is crucial. Kim W. - Object-Oriented Databases: Defiiition and Research Directions. IEEB Transacrions on Knowledge and Dora The prospects of the presented work begin with the Engineering. Vol. 2. No 3. September 1990. pp. 327-341. integration of modeling abilities for the application Ucluse C.. Richard p. and Vclez F. - 02, An Object-Oriented dynamic. The conceptual rules associated with the IF02 Duta Modal. Proceedings of the ACM SIGMOD Conference. June1988, pp. 424-433. model advocate an attribute-oriented modeling and are Lyngback p. and Vianu V. - Mapping a Semantic Database principally based on the object behavior. Moreover, hi&l to the Relational Model. Sigmod Record, Vd. 16. N” 3. through “process” specification associated with the December 1987. pp. 132-142 fragment, the most suitable optimized representation can Meyer B. - Objecr-Orianed Software Consttucticn - Prenrice Hall Inremarional series in Cornpurcr Science, 1988. be determined. According to us, dynamic and behavior Mirrikoff M. and Scholl M. - An Algorithm for Insertion into a will be integrated in the model using a formal approach Lattice: Application to Type Claps&ation. Foundations of Data based on the temporal logic [ 101 and [24]. Such an Organir&m and AlgoriLms, LNCS. Vol. 367. Springer-Verlag. approach automatically validates the specified constraints 1989. pp. 64-82. Nguyen G.T. and Rieu D. - Schernrr Evdtiion in Object-Oriented whilst being easily understood by the users. Database Systems. Data&Knowledge Engineering (North Holland) 4,1989. pp. 4367. Pemici B. - Obiects with Roles. Conference on Office Informaticn Syorems. Gmbtidge. April 1990. pp. 295-215. References Penney D.J. and Stein J. - Class Modification in the Gemstone Object-Oriented DBMS. OOPSLA’87. Proceedings, Ocrobcr Abiteboul S.. Fischer P. C. and Schek H.-J. (Edr) - Nested 1987.~~. 111-117. rclatiom and complex objecrs in darabrses. LNCS, Vol. 361. Ponceler p. and Lakhal L. - Consistent Structural Up&es for Springer-Verlag, 1989. Object Database Design. LNCS. proceedings of le Fifth Abitebcnrl S. and Hull R. - IFO: A Formal Semanlic Database Conference on Advanced Informalion Sysrems Engineering, Model. ACM Transaction on Database Syrremr, Vol. 12. N” 4. Paris. June 1993. lo appear. DcceInber 1987, pp. 525-56s. Saake G. - Descriptive Specification of Database Object An&y J.. I&mud M. and Palisscr C. - Management O/Schema Bchaviour. Data & Knowledge Engineering (North Holland) 6. Evolution in Data&sea - proceedings of rbc 17th Inlcmational 1991, pp. 47-73. Conference on Very Large Dara Baser. Barcelona. September Sakai H. - An Object Behavior Modcling Method. h’OCCdng1 of 1991. pp. 161.170. he 1sl International Conference on Database and Expcn Sysrems Alkin~on M.P., Bancilhon F.. DeWiu D., Diurich K., Maicr D. applications. 1990, pp. 42-48. and 2ihik S. - The Object-Oriented Data&e System Manifesto. Sronehrakcr M. (Ed.) - Special Issue on Database Prototype Pmceedlng~ of the First Deductive and Objccr-Oriented Daubare Sysrems. IEEE Transacrions on Knowledge and Data - DOOD89 Conference, Kyoto. Japan, December 1989, pp. 223- Engineering, Vol. 2, No1 , March 1990. 240. Teorey 1’. J.(Fd.) - The Entity-Reladonship Approach. Morgan Bane+ J.. Chou H.-T., Garza J.F., Kim W.. Woelk D., Ballou Kaufmann Publishers, 1990. N. and Kim H. J. - Data Model issues for Object-Oriented Teisseim M.. Ponccler P. and Ciccheui R. -A Tool Based on a Appiicatio~. ACM Tru~~~ction~ on Office Informalion Sy~twns, Formal Approach for Object-Oriented Database Modeling and l&l. 5. No 1, January 1987, pp. 3-26. Design. proceedings of lhe 6rh International Workshop on Beriino E. and Madno L. - Object-Oriented Database Computer-Aided Sofrwarc Engineering (CASE’93), IEEE Management Syrletnr: Concepts atihsnes. Computer Il:.BE. Vol Publisher. Singapore, July 1993. ro appear. 24. N04, April 1991, pp. 3347. Trcsch M. and Scholl M.H. - Meta Object Management and its Bouzeghoub M.. M&ah E., H~zi F. and Lebqne L - A Design Application to Database Evolution. proceedings of the lllh Tool for Object Databases. LNCS, Vol. 436, Slcinhollr. B., lnlcmalional Conference on rhe Entity-Relationship Approach, .%lvberg A. and Bergman L (Eds.), proceedings of rhe Second LNCS NW5. Karlsruhe. Germany. October 1992. pp. 299-321. Conference on Advanced Informariun Systems Engineering, Twine S. - Mapping between a NIAM conceptual schema and Springer-Verlag. 1990, pp. 365-392. KE,!I frames. Data k Knowledge Engineering. Vol. 4. N” 4, Collet C. and Brunei E. - Dtffinition et mattipulalion de December 1989. pp. 125-155. formdaires avec FO2. TSI Technique et science informatique, Unland R. and Schlageler G. - Object-Oriented Database Vol. 10, N”2, 1991, pp. 97.124. Systems: Concepts and Perspectives. Database Sysrcms of the Coen-Poririni A., lmrur L and Zicari R. - The ESSE Project: 9Or, LNCS. Vol. 466, Springer-Verlag, 1990, pp. 154-197. An Overview. Proceedings of the 2nd Far-East Workshop on L&xi R. - A Framework for Schema UpaWes in an Object- Fumre Da&are IYI(WIII. Kyoto, Japan, April 26-28, 1992. pp. Oriented Database System. Proceedings of rhe 71h IEEE Dam 28-37. Engineering Conference, Kobe, Japan, April 8-12, 1991, pp. 2-13. Fiadelro 1. and Semadas A, - Specification and Verificalion of Database Dynamics. Acu Informdca, Vol. 25,1988, pp. 625 661. Heuer A. - A Data Mtniel for Complex Objects Based on a Semantic Database Model and Nested Relations. In IAbFi891, pp. 297-311.

289