27

Mapping among knowledge bases and data repositories: Precise definition of its syntax and semantics

Embed Size (px)

Citation preview

Pergamon Information Systems Vol. 24, No. 4, pp. 275{301, 1999c 1999 Elsevier Science Ltd. All rights reservedPrinted in Great Britain0306-4379/99 $20.00 + 0.00MAPPING AMONG KNOWLEDGE BASES AND DATA REPOSITORIES:PRECISE DEFINITION OF ITS SYNTAX AND SEMANTICSyJos�e Miguel Blanco, Alfredo Go~ni and Arantza IllarramendiDepartamento de Lenguajes y Sistemas Inform�aticos, Universidad del Pa��s Vasco, Apdo. 649, 20080 Donostia,Spain(Received 11 May 1996; in �nal revised form 20 November 1998)Abstract | Nowadays there is an explosion of data repositories available in the Global InformationSystem. In this context, users meet with the problems related to the heterogeneity and distributionof the data repositories. Access to the data may be facilitated by providing semantic views overthe repositories that hide all the technical and organizative details associated with them. In thispaper it is presented the de�nition of the mapping relation that permits one to relate data elementsof the semantic views and those of the underlying data repositories. We de�ne the syntax and thesemantics of the mapping. From the syntactic point of view, mapping expressions are tuples whichmain components are relational algebra expressions. From the semantic point of view, the notions ofwell formed mapping relation and the extension de�ned by that mapping are introduced. Moreover, wedemonstrate the completeness property of the mapping relation in the sense that it allows for answersto all queries formulated over the semantic view using the data stored in the data repositories.Copyright c 1999 Elsevier Science LtdKey words: Terminological Systems, Mapping Information, Global Information Systems, Data Repos-itories 1. INTRODUCTIONThe quantity of data available through the communication networks over the Global Informa-tion Systems is getting greater and greater and also is increasing the necessity that users have towork with those data stored in di�erent repositories. These repositories can be �les of any kind,databases, etc. and can be accessed directly or through the Web. However, users meet with the in-trisic problems to the context: distribution and heterogeneity of the data repositories. It is di�cultfor them to access data due to they have to deal with di�erent locations, organizations/structures,query languages and semantics of the data in the repositories.Typical query processing approaches on the Web involve keyword-based and limited form ofattribute-based access, as exempli�ed by search engines. Other approaches also support conceptbased search (e.g. [9]). However, the concept collection(s) on which they are based are not hard-coded and cannot be shared across di�erent systems and user groups.Several research projects on integration of heterogeneous information [3, 14, 11, 15] go one stepfurther and provide query processing approaches based on concepts. In such systems, semanticviews (ontologies) are used to provide concise and declarative speci�cation of semantic informa-tion. They are also used to describe information content in data repositories independent of theunderlying syntactic representation of the data [12]. Each data repository is viewed at the level ofthe relevant semantic concepts. Users express their information needs using those semantic viewsand the query processor must obtain the corresponding answer by accessing the underlying datarepositories.Semantic views can be described by using di�erent formalisms. We advocate here for usinga terminological systemz. The use of the subsumption mechanism supported by terminologicalsystems when dealing with the semantic views provides one with the following advantages: 1) thesystem maintains a hierarchical organization of term concepts which is very useful in dealing withyRecommended by Maurizio LenzerinizTerminological systems are a kind of knowledge-based system [18] descendant of KL-ONE also known as systemsbased on Description Logics (e.g. CLASSIC [6], BACK [16])275

276 Jos�e Miguel Blanco et al.large collections of de�nitions; 2) queries, which are also descriptions, are themselves classi�edinto the subsumption hierarchy. This can help �rst to remove redundant constraints in the query,second, to detect inconsistent queries, and third to identify relevant data repositories for the query.Organizations can create their own semantic views to describe their own repositories or theycan use pre-existing ones (e.g. pre-existing ontologies developed by di�erent organizations). Inthe former case it is necessary to have a system that provides with the following fundamentalcomponents: the translator that permits the de�nition of a semantic view over each repositoryand the integrator that allows to obtain a semantic view (or several) by unifying or integrating thedi�erent views de�ned over the repositories. The advantages of using a terminological system forthe two components, translator and integrator, can be summarized in the following ones [4]:� From the point of view of the semantic view generation process 1) the speci�cation of con-cepts using intensional descriptions permits richer translation and integration processes;2) the use of the classi�cation mechanism permits inferring automatically new correspon-dences among concepts, not explicitly de�ned by the Person Responsible of the Integration(PRI), both in the translation and integration processes; and 3) the integration process ismore consistent, because the descriptions associated with the concepts can be used to dis-cover errors in the de�nition of correspondences between data elements expressed by the PRIin order to integrate them.� From the point of view of the resultant semantic view, it allows for the de�nition of a richersemantic view, due to the speci�cation of concepts using intensional descriptions expressedin terms of the necessary or necessary and su�cient properties that must be satis�ed by theirinstances. Moreover, those concepts can be used as intensional descriptions of answers, thusproviding an alternative to extensional listing of values and therefore eliminating sometimesthe cost of accessing to the underlying data repositories.Furthermore, the query processor [11] retrieves data corresponding to the query { expressed overthe semantic view { by accessing data repositories associated to that view. So, for each semanticview there must exist a mapping information that links that semantic view with the underlyingdata repositories. This information is used by the Query Processor to translate the user query(expressed in terms of a semantic view) into di�erent queries to the underlying data repositories(each subquery expressed in the local query language of the repository where it is going to beexecuted by the corresponding wrappery).The work presented in this paper deals with that mapping information. The goal consists onintroducing a formalism to describe the mapping information: its syntax, semantics and the notionof well-formed mapping information. It is also demonstrated the property of completeness of themapping information in the sense of providing with answers to all queries formulated over semanticviews using the data stored in the corresponding underlying data repositories. The literature showsthat the relation for mapping among semantic views expressed by using a terminological systemand data repositories has not been studied in detail, only few works such as [5], [7] have consideredit partially.With respect to the mapping expressions, data repositories are seen as a set of entity typesand attributes. Thus each repository has an associated logical schemaz. Each data repositoryhas a speci�c data organization and may or may not have a data manager. It can be composedof several data sources which actually store the data. The di�erent data sources of a repositorycan be distributed. The simplest data source is a system �le. Almost everything can be a datarepository: a set of �les of di�erent formats, an HTML page, a database and their combinations.Mapping information relates terms in the semantic view (concepts, roles) with data elements in datarepositories (e.g. tables and columns in the case of a relational database, entities and attributesof the underlying logical schemata in general). These mappings play a key role in encapsulatingthe heterogeneity due to di�erent formats and organization of the data in the various repositories.They act as an intermediate language between the terminological expressions and the concretequery languages of the local repositories (see Figure 1).yA wrapper is a module which understands a speci�c data organization.zLogical schemas are expressed by using the relational model.

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 277

@x1@x2

K.Korta Mayor 11 @x2J. Sala Mayor 17 @x1

....................................

Picture file Text file

Name Address @Picture

Entity: Student

Attributes: Name, Address, Picture

Data administrator

Semantic View

Data Repositories

(a)

Knowledge Base

<Name,Address,Picture>Student

Data Repository

Relational View

STUDENT(Name,Address,Picture)

MAPPING

WRAPPER

(b)Fig. 1: View of Data Repositories as Entities and AttributesMappings are described by using the extended relational algebra [19] that permits one to workwith a wide spectrum of possible mappings and not only with direct ones (concept-table and role-attribute) as in other related works [2, 14]. Although it is true that some repositories do notsupport directly all the power of the relational algebra, other mechanisms exist that treat thisproblem but this goes out the scope of this article.In the rest of this paper we present �rst the types of mappings that can be de�ned betweenthe data elements that appear in the terminological and relational views. Next we explain thesyntax and the semantics of the mapping information. Finally we show the mapping informationcorresponding to any concept description. Queries formulated over the terminological view are infact concept descriptions with, possibly, projection of some roles, so in this last section we showthe mapping information for any query and therefore the completeness property of the mapping.In addition we also study how optimized mapping informations can be generated depending onthe type of concept descriptions and properties veri�ed by the elements involved in the mappinginformations.2. MAPPING TYPES BETWEEN BOTH KINDS OF VIEWS: TERMINOLOGICAL ANDRELATIONALIn a semantic view described using a terminological system, hereafter a terminology, thereappear two types of data elements: concepts and roles, while in a logical schema described usinga relational model, hereafter a relational view, the data elements that appear are relations andattributes, therefore we need to de�ne mapping expressions that relate those types of data elements.Our goal is to link the terminological and relational data elements in such a way that given amapping de�nition and one extensiony of the data repositories, the instances of the terminologicalconcepts as well as the role values for those instances can be determined.A singular feature of terminological systems is the open world assumption. In the consideredcontext, terminological systems are used to provide semantically richer views of data repositoriesand the actual extension lies in the underlying data repositories that follow the close world as-sumption, so the open world feature is not consideredz and the closed world is assumed intrinsicallyyBy extension we understand the content of a data repository in a given time just as it is considered in the caseof databases.zIn order to follow the open world assumption then, applications or languages that access the underlying datarepositories would have to be changed, so that it were possible to explicitly close some roles. However this wouldgo against the autonomy of the underlying data repositories.

278 Jos�e Miguel Blanco et al.throughout the paper. In order to be consistent with the previous assumption, as the extension ofthe underlying data repositories may change then it is considered that all the roles are closed beforeanswering a query over the terminological view. When an update happens in the underlying datarepositories it is like if a new and di�erent extension with all the roles closed were created. And�nally, notice that as long as properties of individuals do not come into play in the subsumptioncomputations, then the close or open world assumption does not a�ect the subsumption reasoning.In the rest of this section we explain brie y the notions of concept and role of terminologicalsystems and we introduce in an intuitive way (formal de�nitions appear in the following sections)the types of mappings that can be de�ned for them.2.1. The ConceptsA concept groups individual elements of the real world. For example, the concept teachergroups the set of teachers of a faculty. Those elements are represented by concept instances.Concepts are described in terms of some conditions that the corresponding instances verify (theconcept descriptions are variable-free and composed by di�erent constructors, e.g. atleast, all). Ifthe speci�ed conditions are only necessary conditions then the concept is recognized as primitive(for example, using notation of BACK, teacher :< person), if the speci�ed conditions are necessaryand su�cient then the concept is recognized as de�ned (for example assistant professor := teacherand title:`Assistant'). Concepts as well as roles can be classi�ed in a lattice.When a concept instance is created in a terminological system, the own system is in chargeof assigning an identi�er that permits its unique identi�cation. However, when a terminology-data repository association is established, there exists a relation among the content of the datarepository and the instances in such a way that one extension of the data repository correspondsto a set of instances.The mapping that we de�ne is based on the idea that each instance is supported by data, storedin the data repository, that work as the instance identi�er. Those data are attribute valuesy (theattribute or attributes appear in the formal de�nition of the concept mappingz) and satisfy thefollowing properties:� The elimination of attribute values from the data repository is equivalent to the deletion ofthe corresponding instances.� Attribute values permit the unique identi�cation of instances.� Attribute values allow one to obtain the values of the roles for those instances (values thatare also stored in the underlying data repositories).In this context, the simplest type of mapping that can be de�ned is one that relates a conceptto a basic relation. The semantics of this mapping is that there exists a concept instance for eachtuple of the basic relation. For example, consider the concept teacher in Figure 3 the mapping ofthis concept with the relation TEACHER in Figure 2, means that for each tuple in the relationTEACHER there is one instance of the concept teacher.However, in many situations it can happen that only a subset of tuples of a basic relation,which satisfy some conditions, determines concept instances. For example, suppose that we areinterested in de�ning the concept assistant professor that has been de�ned in such a way that thereis an instance of this concept for each tuple of the relation TEACHER that satis�es the conditionTitle=`Assistant'. Therefore, we generalize the previous de�nition by allowing a mapping to beestablished between a concept and a relation that can be either basic or derived (in the formalde�nition derived relations are expressed using the extended relational algebra notation). Thesemantic of the mapping is rede�ned to mean that there exists a concept instance for each tupleof the relationx.yA particular entity will have a value for each of its attributes.zWe use indistinctly the terms support and mapping.xRelation refers to a basic relation as well as to a derived one.

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 279TEACHER(ID,Reg,SS,Name,Addr,Phone,Title,Hours,Dept)ADMINISTRATIVE STAFF(ID,Reg,Contract type,Level)RESEARCH ASSISTANT(ID,Name,Addr,Phone,Start Date,Final Date,Type,Salary)STUDENT(ID,Exp,Name,Addr,Year)PROJECT(Code,Name,Leader,Budget,Start Date,Final Date)SUBJECT(Sub,Name,Type,Credits,Responsible,Dept)PREREQUISITE(Sub Pre,Sub Post)DEPARTMENT(Dept,Name,Head,Secretary)Fig. 2: Relational View of a Data Repositoryassistant_professor

person

project_leader

teacher administrative_staffresearch_assistantstudent

anything

project department subject

Fig. 3: Concepts of the Terminology Corresponding to the Relational View in Figure 2In other contexts, the need arises for several tuples of a relation to represent one conceptinstance. This means that there exists a concept instance for each di�erent value that takes one(or more) attributes of a relation. For example, there exists an instance of the concept project-leaderfor each di�erent value that the attribute Leader takes in the table PROJECT.As a result of situations such as the previous one, we could also �nd cases where a tuple partic-ipates in the support of more than one instance. For example, a tuple of the relation PROJECTimplies the existence of an instance of the concept project and another one of the concept project-leader.Eventually, several relations may determine the instances of a concept. For example,the concept person can be mapped with the relations named TEACHER, STUDENT, RE-SEARCH ASSISTANT and ADMINISTRATIVE STAFF and there is an instance of person foreach tuple of each relation. In this case, a mapping is established between a concept and a set ofrelations.In summary, a mapping can be established between a concept and one relation in such a waythat there exists a concept instance for each di�erent value that the corresponding attribute(s)(attribute that serves to obtain the identi�ers of instances) takes for the tuples of that relation.In the case that the attribute is a key attribute, there exists an instance for each tuple. Moreover,a concept can be based on more than one relation in which case, there is an instance for eachdi�erent value taken by the corresponding attributes for each one of the relations.2.2. The RolesSo far we have presented the mapping types for a concept; we now concentrate on roles. Rolesrepresent binary relationships between concept instances and other instances or values. A role canbe seen as a predicate with two arguments: the domain (the concept with which is associated) andthe range (the type of values that it can take).Example 1 The role Responsible for can be described asResponsible for :< domain(teacher) and range(subject).

280 Jos�e Miguel Blanco et al.This role is associated with the concept teacher and takes as values instances of the conceptsubject. 2The extension of a role can be seen as a set of pairs (i,v) where i corresponds to the values thatidentify the instance (of the concept that appear in the domain) and v to the values that the roletakes (of the type that appear in the range). When the role is multivalued there can exist morethan one pair (i,v) for one instance. On the contrary, if an instance does not take any value forone role then no pair is associated to it.For example in the case of the concepts teacher and subject related through the role Respon-sible for (it corresponds to the subjects for which a teacher is responsible for) then part of theextension of that role could be: f(18123456,DB01),(17121131,PL01), (17121131,OS01)g.In general, the mapping information of a role is based on the mapping information of theconcept to which it belongs. Therefore, the simplest type of mapping that can be de�ned for arole is one that relates the role to an attribute of a relation that supports the concept to which itbelongs. Two di�erent situations can arise:� There exists an instance for each relational tuple. In this case, each role value is the corre-sponding attribute value, excluding the null values for which there is no image. For example,the role Title of teacher can be mapped to the attribute Title of TEACHER.� There exists an instance for a set of tuples. In this case, the role takes as values all the distinctvalues that correspond to the attribute for the set of tuples, excluding the null values. Forexample, the role Dept name associated with the concept department can be mapped to theattribute Dept of TEACHER.However, a role may also be based on an attribute that does not appear in the relation thatsupports the concept to which the role belongs. For this case, it is necessary to establish amapping between the role values obtained from the attributes and the instances in which the roletakes part. For example, the role Leaders associated with teacher is mapped with the attributePROJECT.Leader of the derived relation TEACHER 1ID=Leader PROJECT. In this way themapping between instances of teacher and the value of the role Leader is established through thejoin of two relations.3. FORMALIZATION OF THE MAPPING INFORMATIONThis section presents how the terminological-relational mapping is de�ned. For this reason�rst, we introduce a set of basic principles with respect to the association between values and theobjects of the real world that they represent. Those principles are used then to de�ne the supportof concepts and roles. Finally, by using the de�nition of concept and role support we characterizethe extension function, de�ned by a support function that links a terminology with a relationalview.3.1. Basic De�nitionsWhen a mapping between a terminology and a relational view is established, an associationamong the data elements of the terminology (concepts and roles) and a set of values stored in thedata repositories is de�ned. However, the extension of a concept or a role is something more than aset of values: it represents a set of objects and relations taken from the real world. That is, �nallya value has an interpretation within the context in which it is used. Taking into account that in ourframework di�erent conceptions or representations of the same object can coexist, we are obligedto reason about the objects themselves (in addition to reasoning about the values that representthe objects) in order to establish the meaning of the mapping. For this reason we introduce thenotion of Real World State (RWS). This notion has been used with di�erent shades of distinction[13, 17]. In our case we use it in the following way: to de�ne the constraints that a mappingbetween a terminology and a relational view must satisfy.

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 281ID Name Address Phone StartingDate : : :18123456 Pedro Alkiza Arrasate, 10, 4 210989 1/10/9211234568 Marta Vadillo Gernika, 18, 1 202020 1/10/9314235681 Ander Urizar Getaria, 8, 2 null 1/10/9322235681 Pedro P�erez Isabel II, 8, 2 451010 1/10/92Fig. 4: Tuples in the Relation RESEARCH ASSISTANTID Name ContractType Level81234561 Tom�as Sol�e Permanent 1162345681 Isabel Uria Temporary 1143235681 Alfredo Alonso Permanent 1416589022 Pedro P�erez Permanent 16Fig. 5: Tuples in the Relation ADMINISTRATIVE STAFFIn the following we describe the notion of a RWS of a value and of a set of values, as well asthe notions of ambiguity and redundancy.De�nition 1 Let us assume that RWO is the set of all the real world objects, VAL the setof all the values (scalar values as names, ids, etc.) that are used in order to identify objects inthe real world and CON the set of all the contexts or organizational information systems. Thefunction RWS (de�ned as RWS: VAL � CON �! P(RWO)) assigns to each value v 2 VAL in acontext con 2 CON the subset of real world objects RWS(v; con)=fo1; � � � ; oNg to which the valuev identi�es. Hereafter, as we consider that the mapping information only makes sense within aparticular context cony then we omit con in RWS(v; con) in all de�nitions and refer to it simplyas RWS(v).De�nition 2 Let V be a set of values v1; : : : ; vn; we de�ne the RWSz of V asRWS(V)=RWS(v1) [ . . .[ RWS(vn)Notice that we have omitted the context con in RWS(V; con) and referred to it as RWS(V ).De�nition 3 Let v be a value, we say that v is non-ambiguous if jRWS(v)j= 1, that is, if it is a setof cardinality 1. In this case, v represents a unique real world object. Notice that non-ambiguousvalues can be used to identify the instances of concepts.Example 2 By examining the extensions of relations RESEARCH ASSISTANT and ADMINIS-TRATIVE STAFF (Figures 4 and 5), in the context of the organizational information system of thecomputer science department in the University of the Basque Country (� upv), it can be seen that`Pedro P�erez' is a value that represents two di�erent persons and that therefore, it is ambiguous.RWS(`Pedro P�erez')=fPerson with ID 22235681,Person with ID 16589022gjRWS(`Pedro P�erez')j= 2 6= 1 2yThe context where the data repositories are exploited.zLet us allow to abuse of the notation of RWS.

282 Jos�e Miguel Blanco et al.De�nition 4 A set V � V AL of values is redundant if it contains two values that represent thesame real world object.V is redundant , 9vi; vj2V ((vi 6= vj) ^ (RWS(vi) \ RWS(vj) 6= �))Example 3 The set of values fPedro Alkiza,18123456,: : :g, formed by values extracted from theextension of RESEARCH ASSISTANT, is redundant, because there exists at least two di�erentvalues (Pedro Alkiza and 18123456) that represent the same person.RWS(`Pedro Alkiza') \ RWS(18123456) = fPerson with ID 18123456g6= � 23.2. Concept SupportIn this subsection we introduce �rst the formal speci�cation of the mapping between a conceptand a relational view. This mapping speci�cation, to which we call concept support, has to satisfytwo requirements in order to be valid: lack of redundancy and ambiguity. Then, we de�ne opera-tions between concept supports conjunction and di�erence that are needed in the next section inorder to deal with concept descriptions. Finally we show the operation complement based on thedi�erence between the support of anythingy and the concept support to be complemented.De�nition 5 Let E be a relational view composed of a set of relations, a basic concept supportSb de�ned upon E is a tuple <R,(atr1,. . . ,atrn),T>, where R is either a basic relation of E,or a derived relation upon E; atr = atr1; : : : ; atrn are the attributes of R that take the valuesrepresenting the instances; and T = D1 � : : :�Dn, where Di is the domain of the attribute atrifor all i between 1 and n.Example 4 The basic concept supports corresponding to some examples presented in Subsec-tion 2.1 are:� <TEACHER,(ID),integer> for the concept teacher.� <�Title=0Assistant0 (TEACHER),(ID),integer> for the concept assistant professor.� <PROJECT,(Leader),integer> for the concept project leader. 2A basic concept support Sb de�nes a set of values for an extension e of Ez,SV(Sb,e)=fv 2 T j 9t 2 e(R) s.t. (t[atr1],. . . ,t[atrn])=vgExample 5 Let Sb = <ADMINISTRATIVE STAFF,(ID),integer> be the basic concept supportand e the extension represented in Figure 5, thenSV(Sb,e) = f81234561,62345681,43235681,16589022g 2De�nition 6 The Real World State de�ned by a basic concept support Sb for an extension e ofE (RWSCONSUP ) is the RWS of the set of values that Sb de�nes for this extension.RWSCONSUP (Sb,e)=RWS(SV(Sb,e))De�nition 7 Let E be a set of relations, a concept support S de�ned upon E is a list of basicconcept supports Sb1; : : : ; Sbn de�ned upon E.Example 6 Let E be the relational view of Figure 2, the concept support for person can be de�nedas the list formed by the following basic concept supports:yThe concept anything is the most general concept: any instance belongs to it.zWe use the notation e(R) to refer to the extension of the relation R. Moreover, t is used to denote a tuple andt[atr] refers to the value that the attribute atr takes for the tuple t.

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 283<TEACHER,(ID),integer><ADMINISTRATIVE STAFF,(ID),integer><STUDENT,(ID),integer><RESEARCH ASSISTANT,(ID),integer> 2A concept support S de�nes a set of values for an extension e of E. This set of values, SV(S,e),is the union of the set of values de�ned by each basic support member of the concept support Sfor e. SV(S,e)=SV(Sb1,e)[. . .[SV(Sbn,e)SV(S,e)� T1[. . .[TnDe�nition 8 The Real World State de�ned by a concept support S for an extension e of E(RWSCONSUP y) is the RWS of the set of values that de�ne S for e.RWSCONSUP (S,e)=RWS(SV(S,e))De�nition 9 A concept support S is well formed if for each extension e of E, SV(S,e) is non-redundant and for each v 2 SV(S,e) it is satis�ed that v is not ambiguous.Our goal when introducing the notion of well formed support is to restrict the types of validmappings between a terminology and a relational view to those that de�ne a biyective functionbetween the concept instances and the values that represent them.In the following, we de�ne the operations between concept supports (conjunction, di�erence,and complement of concept supports) that are used in order to deal with concept descriptions.De�nition 10 Let S1 and S2 be two concept supports de�ned upon E, the conjunction of S1 andS2 is a concept support S de�ned asconjunction(S1; S2)=f< �atr1(R1) \ �atr2(R2) ,atr1,T1> : <R1,atr1,T1> is a basic support of S1^ <R2,atr2,T2> is a basic support of S2 ^ T1=T2gNotice that also atr2 could have been chosen in the concept support of the conjunction since bothatr1 and atr2 take the same values. By T1=T2 we mean compatible-types.Lemma 1 The set of values corresponding to the concept support S is the intersection of thesets of values corresponding to the concept supports S1 and S2. For each extension e of E,SV(S,e) = SV(S1,e) \ SV(S2,e).Example 7 Let Ss=f<STUDENT,(ID),integer>g be the concept support of student and letSt=f<TEACHER,(ID),integer>g be the concept support of teacher. The conjuction of both sup-ports is: conjunction(Ss,St)= f<�ID(STUDENT)\�ID(TEACHER),(ID),integer>g 2De�nition 11 Let S1 and S2 be two concept supports de�ned upon E, the di�erence of S1 andS2 is a concept support S de�ned asdi�erence(S1; S2)=f< �atr1(R1) � �atr2(R2) ,atr1,T1> : <R1,atr1,T1> is a basic support of S1^ <R2,atr2,T2> is a basic support of S2 ^ T1=T2gLemma 2 The set of values corresponding to the concept support S is the di�erence of thesets of values corresponding to the concept supports S1 and S2. For each extension e of E,SV(S,e) = SV(S1,e) { SV(S2,e).yAs in the case of the RWS, let us allow to abuse of the notation RWSCONSUP .

284 Jos�e Miguel Blanco et al.Example 8 Let Ss=f<STUDENT,(ID),integer>g be the concept support of student and letSt=f<TEACHER,(ID),integer>g be the concept support of teacher, used in a previous example.The di�erence of both supports is:di�erence(Sstudent,Steacher)= f<�ID(STUDENT)��ID(TEACHER),(ID),integer>g 2De�nition 12 The complement of a concept support S1 is a concept support S calculated as thedi�erence between the concept support of anything (Sanything) and S1. We assume that everyvalue in the domain appears as instance of some primitive concept. Combining this assumptionwith the closed world assumption, the support of anything is the list of all the basic conceptsupports corresponding to all the primitive concepts of the terminology.<RaN ,atraN ,TaN> <RA1,atrA1,TA1>, : : : ,<RAN ,atrAN ,TAN>S = complement(S1) =di�erence(Sanything; S1)=f< �atrA(RA) � �atr1(R1) ,atr1,T1> :<RA,atrA,TA> is a basic support of anything ^ <R1,atr1,T1> is a basic support of S1 ^TA=T1g3.3. Role SupportFollowing the procedure used for concepts, we de�ne next the role support. What is new withrespect to the concept support is the possibility of including a function in the role support. Thegoal of this function is to permit changes of representation of scale, type, etc.De�nition 13 Let E be a relational view composed of a set of relations, we de�ne a basic rolesupport Sbr as a tuple <Rrl,(atrd1,. . . ,atrdn),(atrn1,: : :,atrnm),TC ,frl,Tr>where Rrl is, either a basic relation of E, or a derived relation upon E; atrd1; : : : ; atrdn andatrn1; : : : ; atrnm are attributes of Rrl; TC=T1�. . .�Tn, where Ti is the domain of the attributeatrdi for all i between 1 and n; frl is a function with de�nition frl:D1� : : :�Dm ! T , where Dj isthe domain of the attribute atrnj for all j between 1 and m and T is the range of the role. Finally,Tr=D1�. . .�Dm. When a basic role support does not include a function then T is equal to Tr.As we will see in the following section, in order to establish the correspondence between ter-minological descriptions and relational algebra expressions, the function frl has to satisfy tworestrictions. The �rst one is that its inverse must be known. The second one is that frl has to bein strictly ascending order with respect to the order de�ned over T .Example 9 The tuple <RESEARCH ASSISTANT,(ID),(Name),integer,-,string> is an exampleof basic role support (corresponding to the role Name). 2For an extension e of E, a basic role suport Sbr de�nes a set of pairs of values of the form:SP(Sbr,e)=f<v; vr> j 9tr 2e(Rrl)t:q:((tr [atrd1]; : : : ; tr[atrdn])=v ^frl(tr[atrn1]; : : : ; tr[atrnm])=vr)gExample 10 For the extension introduced in Figure 4 the set of pairs de�ned by the basic rolesupport of Name would be:(<18123456,Pedro Alkiza>,<11234568,Marta Vadillo>,<14235681,Ander Urizar>,<22235681,Pedro P�erez>) 2De�nition 14 The Real World State (RWSRLSUP ) de�ned by a basic role support Sbr for anextension e of E is the set of pairs of real world objects represented by the set of pairs of valuescorresponding to SP(Sbr; e).RWSRLSUP (Sbr,e)=f<o; or> j 9 < v; vr >2 SP (Sbr; e) ^ RWS(v) = fog ^ RWS(vr) = forgg

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 285De�nition 15 Let E be a set of relations, we de�ne a role support Sr upon E as a list of basicrole supports Sbr1; : : : ; SbrN .We assume that all the role values corresponding to a same instance have to be in a uniquebasic role support. Notice that this is not a hard restriction because the relation Rrl in a basic rolesupport can be any derived relation, and therefore, it can be the union of several relations (Rrl1 [Rrl2) containing role values for a same instance.Example 11 The role support Name for the concept person that has been previously introducedis formed by the following elements:<TEACHER,(ID),(Name),integer,-,string><ADMINISTRATIVE STAFF,(ID),(Name),integer,-,string><STUDENT,(ID),(Name),integer,-,string><RESEARCH ASSISTANT,(ID),(Name),integer,-,string> 2De�nition 16 The Real World State (RWSRLSUP y) de�ned by a role support Sr for an extensione of E is the union of the RWS for e of the basic role supports that compose Sr.RWSRLSUP (Sr ,e)=RWSRLSUP (Sbr1; e) [ : : :[ RWSRLSUP (Sbrn; e)3.4. Extension De�ned by the Mapping InformationSo far, we have described the way in which the concepts and roles can be mapped with arelational view. Next, we present the notion of well-formed support function that expresses the setof restrictions that the mapping between a terminology and a relational view must satisfy. Finallywe describe the extension of a terminology that the mapping information de�nes.De�nition 17 Let T be a terminology and let E be a set of relations, we de�ne a support functionF upon T as an association among concepts and roles of T and concept and role supports de�nedupon E.F = f<ter; Ster> j ter is a concept or a role of T and Ster is a well formed concept support or arole support de�ned upon E gDe�nition 18 Let T be a terminology, E is a set of relations and F a support function thatde�nes a mapping between T and E. We say that F is well formed if for each C1 and C2 conceptsof T with supports SC1 , SC2 respectively in F , for each role r of T with support Sr in F , for eachextension e of E, it is satis�ed that:� 8v1 2 SV (SC1; e)8v2 2 SV (SC2; e)(v1 = v2 $ RWS(v1) = RWS(v2))In other words, there does not exist an extension where the same value identi�es two instancesthat represent two di�erent real world objects.� If the domain of the role r is the concept C1:8 < i; v >2 SP (Sr; e)(i 2 SV (SC1; e))It enforces that for each pair belonging to the extension de�ned by a role support, the valueon the left (corresponding to an instance identi�er) belongs to the extension of the conceptwhich is the domain of that role.� If the range of the role r is the concept C2:8 < i; v >2 SP (Sr; e)(v 2 SV (SC2; e))When a role has a concept as range, it enforces that for each pair belonging to the extensionde�ned by a role support, the right value (corresponding to an instance identi�er) belongsto the extension of the concept which is the range of that role.yAs in the case of RWS, we abuse of the notation RWSRLSUP .

286 Jos�e Miguel Blanco et al.In order to clarify the meaning of the de�nition, we give three examples that do not satisfy theserestrictions (corresponding to a support function that is not well formed), one for each requirementof the previous de�nition:� `Pedro P�erez' belongs to the set of de�ned values, for a particular extension e, forSresearch assistant and for Sadministrative staff , but it represents two di�erent persons.� The domain of the role Responsible for is teacher and the range is subject. Supposing thatthe pair <12121212,OS01> belongs to SP (SResponsible for; e) then there is a problem be-cause 12121212 does not belong to SV (Steacher ; e). This corresponds to a subject taught bysomeone that is not a teacher.� For the same role Responsible for, supposing that the pair <18123456,OS11> belongs toSP (SResponsible for; e) and that OS11 does not belong to SV (Ssubject; e) then there is aproblem because a teacher teaches a non-existing subject.De�nition 19 A support function F that relates a terminology T with a set of relations E de�nes(or induces) univocally an extensional function "F for each extension e of the relational view E.Let C and r be a concept and a role of a terminology T:� "F [C]=SV (SC ; e) if and only if <C,SC>2F� "F [r]=SP (Sr; e) if and only if <r,Sr>2FThe extensional function "F is de�ned for any concept description in this way:� "F [atleast(n,r)]=fd 2 VAL : j"F [r](d)j � ngwhere "F [r](d) = fv :< d; v >2 "F [r]g� "F [r: v]=fd 2 VAL : v 2 "F [r](d)g� "F [r: close(v)]=fd 2 VAL : "F [r](d) = fvgg� "F [atmost(m,r)]=fd 2 VAL : j"F [r](d)j � mg� "F [all(r,C)]=fd 2 VAL : "F [r](d) � "F [C]g� "F [C1 and C2]="F [C1] \ "F [C2]� "F [r1 and r2]="F [r1] \ "F [r2]� "F [domain(C)]="F [C] � VAL� "F [range(C)]= VAL � "F [C]� "F [inv r]= f< a; b >:< b; a >2 "F [r]gDe�nition 20 Let F be a support function that relates a terminology T with a set of relations E.We say that F satis�es T if F satis�es, for each extension e, every assertion in the terminology T.F satis�es an assertion of the form C1 := C2 if and only if "F [C1] = "F [C2]F satis�es an assertion of the form C1 :< C2 if and only if "F [C1] � "F [C2]F satis�es an assertion of the form r1 :< r2 if and only if "F [r1] � "F [r2]The notion of satisfaction is key, because it de�nes the validity of a support function. In orderto illustrate it, let us see the following case:Suppose that a terminology includes the concept internal project, described as a primitiveconcept that is a specialization of the concept project (internal project :< project). This terminologyis bound with a set of relations by a support function F such that for a particular extension e0 ofE, de�nes an extensional function

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 287� "F [project] = fDIPU12,DIPU16,ESPR06,GOVA8,INT10g� "F [internal project] = fINT10,INT12gThis support function does not satisfy the terminology, because as said by the last de�nition theinstances of internal project must be a subset of the instances of project for every extension, butthis is not satis�ed at least for the extension e0 (INT12 is not a project).The following lemmas show that adding new de�ned concepts to the terminology with supportsbased on the operations conjunction and di�erence preserve the satisfaction property. The demon-strations of the lemmas are in the appendix. In next section, we refer to the lemmas correspondingto the rest of constructors.Lemma 3 Let C1 and C2 be two concepts belonging to a terminology T , associated with a relationalview by a well formed support function F that satis�es T . If the terminology is augmented with anew de�ned concept C whose description is C1 and C2 and the support function F with the pair<C,conjunction(SC1,SC2)>, then the obtained support function, F 0, is well formed and satis�esthe new terminology T 0.Lemma 4 Let C1 and C2 be two concepts that belong to a terminology T , associated with a rela-tional view by a well formed support function F that satis�es T . If the terminology T is augmentedwith a new de�ned concept C whose description is C1 and not(C2) and the support function Fwith the pair <C,di�erence(SC1,SC2)> then the obtained support function, F 0, is well formed andsatis�es the new terminology T 0.In summary, the terminological-relational mapping, that is the support for concepts and roleshas been shown in this section. It has also been presented which is the extension de�ned by thatmapping and the conditions that must be veri�ed in order to have a well-formed mapping.4. ENLARGEMENT OF THE MAPPING TO DEAL WITH DESCRIPTIONSIn the previous section, we have presented the syntax and semantics of the mapping expres-sions that relate concept and roles with relational views. In fact, they relate concept and rolenames instead of concept and role descriptions (see Figures 6 and 9) where more constructors andrestrictions can appear. In the following, we show on the one hand, that for each description builtover a terminology there is a corresponding mapping in terms of the relational view, support ofthe terminology. Furthermore, as working with terminological systems, queries are expressed asconcept descriptions and possibly with projection of roles, then the mapping for concept and roledescriptions is also the mapping for queriesy, demonstrating in this way the completeness propertyof the mapping.On the other hand, taking into account that the extended relational algebra expressions of themappings are translated into expressions in the query languages of the repositories (the reposito-ries are accessed by using the corresponding wrappers) and that some mapping expressions canbe expensive to execute it is important to optimize the mapping information. The optimizationprocess avoids performing some ine�cient plans where redundant information is accessed. A veryinteresting optimization case is when an expression is detected as inconsistent and so, underlyingdata repositories do not have to be accessed because the answer is empty. This optimization ispossible when some information about the underlying data repositories is known: functional, inclu-sion and exclusion dependencies between attributes, attributes that take null values, and ranges ofvalues taken by attributes. Optimization is also possible when some combinations of constructorsappear in the descriptions.yLet SC be the mapping for a concept description C, let Sr be the mapping for a role r, then the mapping forthe query that projects role values of r for instances of concept C (rf(r) for getall C) isf <Rrl1atrn=atrcRC ,atrd,atrn,TC ,frl,Tr> :<Rrl,atrd,atrn,TC ,frl,Tr> is a basic role support of Sr ^ <RC ,atrc,TC> is a basic support of SC ^ Tr=TCg

288 Jos�e Miguel Blanco et al.<concept> ::= <concept name>j atleast `(' number `,' <role> `)'j <role> `:' <value>j <role> `:' close `(' <value> `)'j atmost `(' number `,' <role> `)'j all `(' <role> `,' <concept> `)'j all `(' <role> `,' <set> `)'j all `(' <role> `,' <number rest> `)'j not `(' <concept> `)'j <concept> and <concept>Fig. 6: Brief Syntax of Concept DescriptionsThis section is organized in two parts, the �rst one is related to concept descriptions and thesecond one to role descriptions. In both of them, the di�erent constructors that can appear in adescription are analyzed, with the goal of associating the corresponding mapping information toeach one of them.4.1. Concept DescriptionsIn a terminological system, a concept description is formed by the conjunction of basic conceptdescriptions (see Figure 6).We have already introduced the notion of concept and role support and de�ned the support ofthe conjunction, di�erence of concepts and the complement of a concept support. We still haveto de�ne the support of the descriptions formed by only one constructor (atleast, :, atmost andall) and the support of a general concept description in order to complete the speci�cation of themapping information. In this subsection, we present �rst the support of the constructors, andnext, the support associated with general concept descriptions.4.1.1. atleast(n,role)The constructor atleast(n,role) de�nes a concept, whose instances are the instances of theconcept domain of role and that take at least n values for that role. Remember that the rolesupport de�nes the pairs (instance,value) corresponding to a role extension.Let r be a role, Sr the support of r and n an integer greater than 0, the constructor atleast(n; r)has Satleast(n,r) as support, whereSatleast(n,r) = f<Rrl,atrd,TC> if n = 1 ^ not(can be null(atrn)y<�atrd6=NULL(Rrl),atrd,TC> if n = 1 ^ can be null(atrn)"z if n > 1 ^ functional dependency(atrd! atrn)x<�COUNT>n�1(atrdFCOUNT atrn(Rrl)),atrd,TC> in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a basic role support (b.r.s.) of SrgExample 12 Let it be the role support of Responsible for that was introduced in Subsection 2.2:<SUBJECT,(Responsible),(Sub),integer,-,integer>.Satleast(4,Responsible for) =f<�COUNT>3(ResponsibleFCOUNT Sub(SUBJECT)),(Responsible),integer>g 2ycan be null(atrn) is a expression that takes the value true if it is possible that atrn takes NULL values andfalse in other case.zIn this case, it is avoided accessing the underlying data repositories because the answer is empty.xfunctional dependency(atrd ! atrn) is a expression that takes the value true if the functional dependencyatrd! atrn is satis�ed and false in other case.

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 289As it can be seen, it has been necessary to use an aggregate function [8], in order to groupthe role values that correspond to the same instance. This function, grouping attrFCOUNTatr(R),de�nes a relation that has as attributes grouping attr and COUNT . Its extension includes a tuplefor each di�erent value that grouping attr has for the tuples of R, the attribute COUNT has asvalue the number of di�erent values taken by atr for the set of tuples with the same value for theattribute grouping attr.The following lemma introduces that the satisfaction property is mantained when conceptswith description atleast(n,r) are added to the terminology. The demonstrationy of the lemma is inthe appendix.Lemma 5 Let r be a role that belongs to a terminology T , associated with a relational viewthrough a well formed support function F that satis�es T . If the terminology is augmented witha new de�ned concept C whose description is atleast(n,r) and the support function F with thepair <C,Satleast(n,r)> then the obtained support function, F 0, is well formed and satis�es the newterminology T 0.4.1.2. role : expressionThe constructor role : expression de�nes a concept whose instances are the instances of theconcept that has role as domain that satisfy the restrictions imposed on the role values by theexpression. The expression de�nes a set of values that the role must take; this de�nition can beclose or not. If the expression is closed (when the keyword close is used) then it indicates that therole must take the values that appear in the expression and not other values. In the other case,the role must take at least these values but it may take others too.role: valueWe introduce the mapping information for the description role: value. The generalization fora list of values is trivial and we do not introduce it here.Sfills(Sr,v) = f" if f�1rl (v) =2 range(atrn)z<�atrn=f�1rl (v)(Rrl),atrd,TC> in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Sr gIn this case, it is necessary to use the inverse of the function associated with a role support.This happens because the description is expressed over the range of values taken by the role andnot over the values stored in the data repository.Example 13 The support corresponding to the concept whose instances take the value 880 forthe role Responsible for, whose mapping information was previously introduced, and which is notassociated with a transforming function, is the following:Sfills(SResponsible for,880) = f<�Sub=880(SUBJECT),(Responsible),integer> g 2role: close(value)We introduce the mapping information for the constructor role: close(value).Sclosefills(Sr,v) = f" if f�1rl (v) =2 range(atrn)<�atrd(�atrn=f�1rl (v)(Rrl)) � �atrd(�atrn 6= f�1rl (v)(Rrl)) ,atrd,TC> in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Sr gyLemmas and demonstrations for the rest of the constructors are similar and they are not presented anymore inthis paper.zrange(atrn) is the range of values that atrn may have.

290 Jos�e Miguel Blanco et al.Example 14 The support corresponding to the concept whose instances take the value 880 (andonly that value) for the role Responsible for (Responsible for: close(880)) is the following:Sclosefills(SResponsible for,880) = f<�Responsible(�Sub=880(SUBJECT)) ��Responsible(�Sub 6= 880(SUBJECT)) ,(Responsible),integer> g 24.1.3. atmost(n,role)The concept support of atmost(n,role) is the complement of the concept support of the con-structor atleast(n+1,role), that is, the instances that have at most n values for role are all theinstances except those ones that take at least n+ 1 values for role.Satmost(n,r) = complement(Satleast(n+1,r))where Satleast(n+1,r) has been previously de�ned.Example 15 For the description atmost(3,Responsible for), that corresponds to the conceptwhose instances satisfy that at most are responsible for three subjects, the mapping informationwould be the following: complement(Satleast(4,Responsible for))That is, the di�erence between the mapping information of anything and the concept whoseinstances take at least four values for the role Responsible for. 24.1.4. all(role,concept type)The constructor all(role,concept type) de�nes a concept whose instances are instances of theconcept domain of the role that satisfy that the values that role takes belong to the concept type.It is not possible to obtain the concept support de�ned for all(role,concept type) only with the rolesupport of role. The reason is that those instances of the concept that have role as domain butthat do not have any value for this role, cannot be found among those de�ned by the role support.However, they satisfy the description because all the values that they take (no value in this case)satisfy the restriction imposed by the constructor all. On the contrary, it is possible to obtain fromthe role support, the support for the concept that takes at least one value for the role that doesnot satisfy the restriction.The constructor all can restrict the values to take for a role to be instances of a concept or tobelong to a numerical range or to belong to a set of non-numerical values. Depending on each oneof the cases the way of obtaining the mapping information is di�erent:D.1. all(role,concept)Let C be a concept and let SC be the support of C; and r a role and Sr the support of r, thesupport for the constructor all(role,concept) is:Sall(Sr,SC) = complement(Snotall(Sr,SC))where Snotall(Sr,SC) is de�ned as:Snotall(Sr,SC) = f< [�atrd(�atrn6=NULL(Rrl))] { [�atrd(Rrl1atrn=atrcRC)],atrd,TC>if can be null(atrn) ^ functional dependency(atrd! atrn)< [�atrd(Rrl)] { [�atrd(Rrl1atrn=atrcRC)],atrd,TC>if not(can be null(atrn)) ^ functional dependency(atrd! atrn)

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 291< [�atrd atrn(�atrn 6=NULL(Rrl))] { [�atrd atrn(Rrl1atrn=atrcRC)],atrd,TC>if can be null(atrn) ^ not(functional dependency(atrd! atrn))< [�atrd atrn(Rrl)] { [�atrd atrn(Rrl1atrn=atrcRC)],atrd,TC>if not(can be null(atrn))^ not(functional dependency(atrd! atrn)): <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Sr ^ <RC ,atrc,TC> is a basic support of SC^ Tr=TCgExample 16 If the concept support corresponding to the concept assistant professor in Exam-ple 3 is <�Title=0Assistant0 (TEACHER),(ID),integer> and the role support for Responsible forof the concept subject is <SUBJECT,(Responsible),(Sub),integer,-,integer>, then the complementconcept support equivalent to all(Responsible for,assistant professor) is:complement(Snotall(SResponsible ,Sassistant professor)) =f<�Responsible([�Responsible Sub(SUBJECT)] {[�Responsible Sub(SUBJECT1Responsible=ID(�Title=0Asoc0(TEACHER)))]),(Responsible),integer> g 2D.2. all(role,value set)Let D be a domain, de�ned over a set of values d = (v1; : : : ; vn); let r be a role and Sr thesupport of r. The support for the constructor all(role,value set) is:Sallin=(Sr ,d) = complement(Snotallin(Sr ,d))where Snotallind(Sr,d) is de�ned as:Snotallind(Sr,d) = f<Rrl,atrd,TC> if ff�1rl (v1), : : : ,f�1rl (vn)g \ range(atrn) = � ^ not(can be null(atrn))<�atrn6=NULL(Rrl),atrd,TC>if ff�1rl (v1), : : : ,f�1rl (vn)g \ range(atrn) = � ^ can be null(atrn)<atrd,�atrn 6= f�1rl (v1) and ::: and atrn 6= f�1rl (vn) and atrn 6= NULL(Rrl),TC> in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of SrgD.3. all(role,numerical range)Let rnum be a numerical range, de�ned by a pair (inf; sup); let r be a role and Sr the supportof r, the supporty for the constructor all(role,numerical range) is:Sallinrnum(Sr,(inf,sup)) = complement(Snotallinrnum(Sr,(inf,sup)))where Snotallinrnum(Sr,(inf,sup)) is de�ned as:Snotallinrnum(Sr,(inf,sup)) = f<�atrn6=NULL(Rrl),atrd,TC> if [f�1rl (inf); f�1rl (sup)] \ range(atrn) = �<�atrn<f�1rl (inf) or atrn>f�1rl (sup)(Rrl),atrd,TC> in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of SrgyIt is possible to de�ne this support because the inverse of the transforming function exists (f�1rl ) and it is instrictly ascending order (as it was established in De�nition 8).

292 Jos�e Miguel Blanco et al.<concept> ::= <concept name>f<concept>.sup := <concept name>.sup)gj atleast '(' number ',' <role> ')'f<concept>.sup := Satleast(number.val,<role>.sup))gj <role> ':' <value>f<concept>.sup := Sfills(<role>.sup,<value>.val)gj <role> ':' close (' <value> )'f<concept>.sup := Sclosefills(<role>.sup,<value>)gj atmost '(' number ',' <role> ')'f<concept>.sup := Satmost(number.val,<role>.sup))gj all '(' <role> ',' <concept> ')'f<concept>.sup := Sall(<role>.sup,<concept>(1).sup)gj all '(' <role> ',' <set> ')'f<concept>.sup := Sallind(<role>.sup,<set>.set))ggj all '(' <role> ',' <number rest> ')'f<concept>.sup := Sallinrnum(<role>.sup,<number rest>.range))gj not '(' <concept> ')'f<concept>.sup := complement(<concept>(1).sup)gj <concept> and <concept>f<concept>.sup := conjunction(<concept>(1).sup,<concept>(2).sup)gFig. 7: Support for a General Concept Description4.1.5. General Concept Description all(role,concept)atleast(n,role) atmost(m,role) role: v all(role,value set) condall(role,number range)1 atleast(n,role) atmost(m,role) n � m2 atleast(n,role) role: v n > 13 atleast(n,role) all(role,concept type)4 atmost(m,role) role:v m 6= 05 atmost(m,role) all(role,concept type) m 6= 06 role:v all(role,concept type)7 atleast(n,role) atmost(m,role) role: v n > 1 ^ n � m8 atleast(n,role) atmost(m,role) all(role,concept type) n � m9 atleast(n,role) role:v all(role,concept type) n > 110 atmost(m,role) role:v all(role,concept type)11 atleast(n,role) atmost(m,role) role:v all(role,concept type) n > 1 ^ n � mFig. 8: Possible Combinations of Restrictions over the Same RoleOnce that it has been de�ned the mapping for concept names and constructors then we cande�ne the support for a general concept description. In Figure 7 the syntax-directed de�nition [1]of the mapping information for the general concept descriptionsy is shown. In that de�nition, itcan be seen that the support for a general concept description is the conjunction of all the conceptsupports for each one of the constructors (see action for <concept> and <concept>). However,there are two kinds of possible optimizations. The �rst one is when the concept description containsseveral restrictions over the same role. In that case, restrictions that refer to the same role aregrouped together and the mapping information is obtained for that group. The second one is whenexclusion and inclusion dependencies between attributes in the concept support are known.In Figure 8 all the possible combinations over the same role appear. The optimized conceptsupports for all of them are detailed in the appendix. Although there can be other combinationsyThe concept descriptions are written with the syntax of BACK, but the equivalent ones exist in any termino-logical system.

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 293over the same role (for example atleast(n,role) and atmost(m,role) with m < n or atleast(n,role)and atleast(m,role) with m < n) we assume that during the query processing there is a previousstep where the Most Immediate Superconcepts are calculated and all the redundant descriptionsand the inconsistencies are detected and eliminated [10].1) In the following, we develop the concept support for one of the possibilities and explainwhy it is better than the support calculated as the conjunction of concept supports. Followingthe syntax-directed de�nition of Figure 7, the concept support for the description atleast(n,r) andatmost(m,r), when n > 1 ^ atrd 6! atrn ^m � n is:Satleast(n,r)^atmost(m,r) =conjunction(Satleast(n,r),Satmost(m,r)) =conjunction(Satleast(n,r),complement(Satleast(m+1,r)))=di�erence(Satleast(n,r),Satleast(m+1,r))=di�erence(f<�COUNT>n�1(atrdFCOUNT atrn(Rrl)),atrd,TC> : <Rrl,atrd,atrn,TC ,frl,Tr> is ab.r.s. of Srg, f<�COUNT>m(atrdFCOUNT atrn(Rrl)),atrd,TC> : <Rrl,atrd,atrn,TC ,frl,Tr> is ab.r.s. of Srg) =f< �COUNT>n�1(atrdFCOUNT atrn(Rrl)) {�COUNT>m(atrdFCOUNT atrn(Rrl)), atrd, TC> :<Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of SrgHowever, a better concept support for this expression appears in the following, because, sup-posing that the underlying data repository is a relational database, it can be translated into aselect clause with the operators group by and having. For the previous expression then thetranslated SQL query consists of two select clauses joined with the minus operator. In general,for any kind of data repository, this better concept support avoids one scan and computing onedi�erence. f< �m�COUNT>n�1(atrdFCOUNT atrn(Rrl)), atrd, TC> :<Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Srg2) It is also possible to optimize the concept support when exclusion and inclusion dependenciesare known:If the concept supports of two descriptions are f<R1,a1,T1>g and f<R2,a2,T2>g, and theexclusion dependency a1 \ a2 = � is satis�ed, thenconjunction( f<R1,a1,T1>g, f<R2,a2,T2>g) = �This means that it is not needed to calculate the intersection because there cannot be commontuples, due to the exclusion dependency.If the concept supports of two descriptions are f<R1,a1,T1>g and f<R2,a2,T2>g, and theinclusion dependency R1:a1 � R2:a2, is satis�ed, thenconjunction( f<R1,a1,T1>g, f<R2,a2,T2>g) = f<R1,a1,T1>gThis means that it is not needed to calculate the intersection because it is f<R1,a1,T1>g, dueto the inclusion dependency.4.2. Role DescriptionsRole descriptions are also formed by conjunction of role names and domain and range restric-tions (see Figure 9). We describe �rst the support that corresponds to a role whose de�nition isformed by the conjunction of two given roles. Then we introduce the mapping information for theroles de�ned as the inverse of other roles. And �nally, we show the support for the roles de�nedby restricting the domain or the range.We assume that all the role descriptions have at least one domain and one range di�erent thanthe more general concept anything.

294 Jos�e Miguel Blanco et al.<role> ::= <role name>j inv ( <role> )j <role> and <role>j <role> and domain '(' <concept> ')'j <role> and range '(' concept ')'j <role> and range '(' <set> ')'j <role> and range '(' <number rest> ')'Fig. 9: Brief Syntax of Role DescriptionsDe�nition 21 Let Sr1 and Sr2 be two role supports de�ned upon E, the conjunction of Sr1 andSr2 is a role support Sr de�ned asSr=f< �atrd1 atrn1(R1) \ �atrd2 atrn2(R2) ,atrd1,atrn1,TC1,frl1,Tr1> :<R1,atrd1,atrn1,TC1,frl1,Tr1> is a b.r.s. of Sr1 ^ <R2,atrd2,atrn2,TC2,frl2,Tr2> is a b.r.s. Sr2^ Tr1=Tr2 ^ TC1=TC2 ^ frl1=frl2gNotice that also atrd2 and atrn2 could have been chosen in the role support of the conjunctionsince they take the same values as atrd1 and atrn1 respectively. By Tr1=Tr2 and TC1=TC2 wemean compatible-types.Lemma 6 The set of pairs of values corresponding to the role support Sr is the intersection of thesets of pairs of values corresponding to the role supports Sr1 and Sr2. For each extension e of E,SP (Sr; e) = SP (Sr1; e) \ SP (Sr2; e).De�nition 22 Let r be a role that has as domain the concept C and as range the concept C1,the role inv(r) represents the inverse of the relation represented by r, inv(r) takes as domain theconcept C1 and as range the concept C.Let r be a role and let Sr be the support of r. The role de�ned by inv(r) has as supportSinv(Sr).Sinv(Sr) = f<Rrl,atrn,atrd,Tr,-,TC>: <Rrl,atrd,atrn,TC ,-,Tr> is a b.r.s. of SrgDe�nition 23 Let r be a role that has as domain the concept C, and let C1 be a concept that isa specialization of C, the role r and domain(C1) de�nes a subrelation of the relation representedby r. This subrelation de�nes for the instances of C1 (and only for them) the same relation as r.Let C be a concept and let SC be the support for C; let r be a role and let Sr be the supportfor r. The role de�ned by r and domain(C) has Sdom(Sr,SC) as support.Sdom(Sr,SC) = f<Rrl1atrd=atrcRC ,atrd,atrn,TC ,frl,Tr> :<Rrl,atrd,atrn,TC1 ,frl,Tr> is a b.r.s. of Sr ^ <RC ,atrc,TC> is a basic support of SC ^ TC1=TCgDe�nition 24 Let r be a role that has as domain the concept C, the role r and range(concept type)de�nes a subrelation of the relation represented by r. This subrelation is only established amongthe instances of C and those objects that belong to the concept type. The mapping informationassociated with role depends on whether the concept type is a concept, a set of values or a numericalrange. We describe each one of the possibilities in the following:

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 295<role> ::= <role name>f<role>.sup := <role name>.supgj inv ( <role> )f<role>.sup := Sinv(<role>(1).sup)gj <role> and <role>f<role>.sup := conjunction(<role>(1).sup,<role>(2).supgj <role> and domain '(' <concept> ')'f<role>.sup := Sdom(<role>(1).sup,<concept>.sup)gj <role> and range '(' <concept> ')'f<role>.sup := Srg(<role>(1).sup,<concept>.sup)gj <role> and range '(' <set> ')'f<role>.sup := Sranged(<role>.sup,<set>.set)gj <role> and range '(' <number rest> ')'f<role>.sup := Srangen(<role>.sup,<number rest>.range)gFig. 10: Support for the Role Descriptionsrange(concept)Let C be a concept and let SC be the support of C; let r be a role and let Sr be the supportof r. The role de�ned by r and range(C) has Srg(Sr ,SC) as support, whereSrg(Sr,SC) = f<Rrl1atrn=atrcRC ,atrd,atrn,Td,frl,Tr> :<Rrl,atrd,atrn,Td,frl,Tr> is a b.r.s. of Sr ^ <RC ,atrc,TC> is a basic support of SC ^ Tr=TCgrange(value set)Let r be a role and let Sr be the support of r, let D be a domain that de�nes a set of values d.The role de�ned by r and range(D) has Sranged(Sr,d) as support, whereSranged(Sr,d) = f<�atrn=f�1rl (v1) or ::: or atrn=f�1rl (vn)(Rrl),atrd,atrn,TC ,frl,Tr> :<Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Sr ^ d=(v1,: : :,vngrange(numerical range)Let r be a role and let Sr be the support of r. The role de�ned by r and range(numerical range)has as support Srangen(Sr ,(inf; sup)), whereSrangen(Sr,(inf; sup)) =f<�atrn � f�1rl (inf) and atrn � f�1rl (sup)(Rrl),atrd,atrn,TC ,frl,Tr> : <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s.of SrgExample 17 Let <SUBJECT,(Responsible),(Sub),integer,-,integer> be the role support of Re-sponsible for then the role support for a new role Responsible for 800s de�ned as Responsible forand range(800..899) would be<�Sub � 800 and Sub � 899(SUBJECT),(Responsible),(Sub),integer,-,integer> 2Once the mapping information has been de�ned for each one of the basic components of therole descriptions we can use a syntax-directed de�nition (see Figure 10) to specify the mappinginformation for any role.Summarizing, in this section, the mapping for any concept and role descrption has been shown.As in terminological systems, queries are expressed as concept descriptions and possibly withprojection of roles, so the mapping for any query has been shown, demonstrating in this way thecompleteness property of the mapping. We have also identi�ed optimization possibilities whende�ning the mapping.

296 Jos�e Miguel Blanco et al.5. CONCLUSIONSNowadays there is an explosion of data repositories available in the Global Information System.However, many times it results cumbersome for the users to access them due to the heterogeneityand distribution of the data repositories. One way to facilitate the access consists on providingsemantic views over the repositories that hide all the technical and organizative details associatedwith the repositories. When those semantic views are included an important aspect is the de�nitionof the mapping relation that permits one to relate data elements of the semantic views and thoseof the underlying data repositories. We have de�ned in this paper the syntax and the semanticsof the mapping. From the syntactic point of view, mapping expressions are tuples which maincomponent are relational algebra expressions. From the semantic point of view, the notions of wellformed mapping relation and the extension de�ned by that mapping have been introduced.Moreover, we have demonstrated the completeness property of the mapping relation in the sensethat it allows for answers to all queries formulated over the semantic view using the data storedin the data repositories. Taking into account that in our case semantic views are expressed usinga terminological system and that terminological queries are expressed in terms of descriptions, themapping information that corresponds to a description has been speci�ed. The same procedurehas been followed for the concept descriptions and for the role descriptions. First, we have de�nedthe mapping information for each constructor that can appear in a description. Next, we haveassociated the grammar that describes the descriptions with the actions that specify the mappinginformation by using a syntax-directed de�nition. Notice that the process of looking for the datain the data repositories is done e�ciently due to the use of optimization criteria when translatingfrom a terminological query to a local query expression. Finally, we want to emphasize the widespectrum of possible transformations that the mapping relation covers.Acknowledgements | The authors thank Jes�us Berm�udez (University of the Basque Country) and Alex Borgida(Rutgers University) for their useful suggestions.REFERENCES[1] A. Aho, R. Sethi, and J. Ullman. Compilers: Principles, Techniques and Tools. Addison Wesley (1985).[2] Y. Arens, C.Y. Chee, C. Hsu, and C.A. Knoblock. Retrieving and integrating data from multiple informationsources. International Journal on Intelligent and Cooperative Information Systems, 2(2):127{158 (1993).[3] Y. Arens, C.A. Knoblock, and W. Shen. Query reformulation for dynamic information integration. Journal ofIntelligent Information Systems, 6(2-3):99{130 (1996).[4] J.M. Blanco, A. Illarramendi, and A. Go~ni. Building a federated database system: an approach using aknowledge based system. International Journal on Intelligent and Cooperative Information Systems, 3(4):415{455 (1994).[5] A. Borgida and R. J. Brachman. Loading data into description reasoners. In Proceedings of the ACM SIGMODConference, Washington, DC, pp. 217-226, ACM Press (1993).[6] A. Borgida, R.J. Brachman, D.L. McGuinness, and L.A. Resnick. CLASSIC: A structural data model forobjects. In Proceedings ACM SIGMOD-89, Portland, Oregon, pp. 58-67, ACM Press (1989).[7] P.T. Devanbu. Translating Description Logics to Information Server Queries. In Proceedings of the ISMMInternational Conference on Information and Knowledge Management CIKM, Washington, DC, pp. 256-263,ACM Press (1993).[8] R. Elmasri and S. B. Navathe. Fundamentals of Database Systems. Addison-Wesley (1989).[9] Excite, http://www.excite.com.[10] A. Go~ni, A. Illarramendi, E. Mena, and J.M. Blanco. An optimal cache for a federated database system.Journal of Intelligent Information Systems, 9(2):125{156 (1997).[11] A. Go~ni, A. Illarramendi, E. Mena, and J.M. Blanco. An ontology connected to several data repositories.Journal of Computing and Information, To be published (1999).[12] V. Kashyap and A. Sheth. Semantic and schematic similarities between database objects: A context-basedapproach. The International Journal of Very Large Data Bases (VLDB), 5(4):276-304 (1996).[13] J. A. Larson, S. B. Navathe, and R. Elmasri. A theory of attribute equivalence in databases with applicationto schema integration. IEEE TOSE, SE-15(4):449-463 (1989).[14] A.Y. Levy, D. Srivastava, and T. Kirk. Data model and query evaluation in global information systems. Journalof Intelligent Information Systems, 5(2):121{143 (1995).

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 297[15] E. Mena, A. Illarramendi, V. Kashyap, and A. Sheth. Observer: An approach for query processing in globalinformation systems based on interoperation across pre-existing ontologies. Distributed And Parallel Databases(DAPD). To be published. (1998).[16] C. Peltason, A. Schmiedel, C. Kindermann, and J. Quantz. The BACK system revisited. Technical UniversityBerlin (1989).[17] S. Spaccapietra, C. Parent, and Y. Dupont. Model independent assertions for integration of heterogeneousschemas. VLDB, 1(1):81{126 (1992).[18] P.H. Speel. Selecting Knowledge Representation Systems. PhD thesis, University of Twente, Enschede, theNetherlands (1995).[19] J.D. Ullman. Principles of Database systems. Computer Science Press, Inc (1982).APPENDIX A: PROOFSProof of Lemma 3. Let C1 and C2 be two concepts belonging to a terminology T , associatedwith a relational view by a well formed support function F that satis�es T . If the terminology isaugmented with a new de�ned concept C whose description is C1 and C2 and the support functionF with the pair <C,conjunction(SC1,SC2)>, then the obtained support function, F 0, is well formedand satis�es the new terminology T 0.Proof. Firstly, we prove that F 0 is well formed. As the only modi�cation in the initial terminologyhas been to add a new concept, then it has to be proven that the support of this new concept iswell formed (see de�nition 7) and the �rst of the three points in De�nition 15:� If for each extension e of the data repository, SV (SC1; e) and SV (SC2; e) are well formedand F is also well formed, then it is not possible that there exists two di�erent values ofSV (SC ; e) that represent the same real world object. This is demonstrated by reductio adabsurdum. Let us suppose that for the extension e, there exists two di�erent values, v1 andv2, that belong to SV (SC ; e) and that represent the same object. This means that v1 andv2 belong to SV (SC1; e) and to SV (SC2; e). As SC1 and SC2 are well formed, then theRWS(v1) 6= RWS(v2), that is a contradiction with the previous a�rmation.It must also be satis�ed that for each extension e and for each v 2 SV (SC ; e), v is notambiguous. We use the same technique as in the previous case. Let us suppose that thereexists an extension e for which there is an ambiguous value v 2 SV (SC ; e). As v alsobelongs to SV (SC1; e) and to SV (SC2; e), then either SC1 or SC2 are not well formed, orthat F is not well formed. But this cannot happen because it contradicts the hypothesis.� If there exists an extension e such that 9v 2 SV (SC ; e)9vi 2 SV (SCi; e)(v = vi ^RWS(v) 6=RWS(vi)) (in other words, F 0 is not well formed) then this would imply that F is also not wellformed, due to there exists an extension e such that 9v 2 SV (SC1; e)9vi 2 SV (SCi; e)(v =vi ^ RWS(v) 6= RWS(vi)).Secondly, in order to prove that F 0 satis�es T 0, we use the reductio ad absurdum again. F 0 doesnot satisfy T 0 if a) there exists an instance of C that is not an instance of C1 or of C2, which isnot possible due to the construction of SC ; or b) if there exists an instance of C1 and of C2 thatis not an instance of C. This last situation would imply that there exists an extension e such thatthere exists a value v that belongs to SV (SC1; e) and to SV (SC2; e) that does not belong to SC ,which is not possible, due to the fact that the support of SC is based on the intersection of therelations that form the support of C1 and C2. 2Proof of Lemma 4. Let C1 and C2 be two concepts that belong to a terminology T , associatedwith a relational view by a well formed support function F that satis�es T . If the terminology Tis augmented with a new de�ned concept C whose description is C1 and not(C2) and the supportfunction F with the pair <C,di�erence(SC1,SC2)> then the obtained support function, F 0, is wellformed and satis�es the new terminology T 0.Proof. The demonstration is similar to that developed for the conjunction of concept supports.Firstly, we prove that F 0 is well formed. As the only modi�cation in the initial terminology hasbeen to add a new concept, as before it has to be proven that the support of this is well formedand that the �rst of the three points in De�nition 15:

298 Jos�e Miguel Blanco et al.� If for each extension e of the data repository, SV (SC1; e) and SV (SC2; e) are well formedand F is also well formed, then it is not possible for two di�erent values of SV (SC ; e)that represent to the same real world object to exist. This is demonstrated by reductio adabsurdum. Let us suppose that for an extension e, there exists a pair of di�erent values,v1 and v2, that belong to SV (SC ; e) and that represents the same object. This means thatv1 and v2 belong to SV (SC1; e) and, as SC1 is well formed, then the RWS(v1) 6= RWS(v2),which is a contradiction with the previous a�rmation.It must also be satis�ed that for each extension e and for each v 2 SV (SC ; e) v is notambiguous. We use the same technique as in the previous case. Let us suppose that thereexists an extension e such that there exists an ambiguous value v 2 SV (SC ; e). As v alsobelongs to SV (SC1; e), this would imply that SC1 or F are not well formed, but this cannotbe because it contradicts the hypothesis.� If there exists an extension e such that 9v 2 SV (SC ; e)9vi 2 SV (SCi; e)(v = vi ^RWS(v) 6=RWS(vi)) (means that F 0 is not well formed) then F would not be well formed, becausethere exists an extension e such that 9v 2 SV (SC1; e)9vi 2 SV (SCi; e)(v = vi ^ RWS(v) 6=RWS(vi)).In order to prove that F 0 satis�es T 0, we use the reductio ad absurdum again. F 0 does notsatisfy T 0 if a) there exists an instance of C that is not an instance of C1 and it is an instance ofC2, which is not possible due to the construction of SC ; or b) if there exists an instance of C1 thatis not an instance of C2 nor C. This latter situation would imply that there exists an extension esuch that there exists a value v that belongs to SV (SC1; e) which does not belong to SV (SC2; e)but does belong to SC , but this is not possible, due to the fact that the support of SC is based onthe di�erence of the relations that form the support of C1 and C2. 2Proof of Lemma 5. Let r be a role that belongs to a terminology T , associated with a relationalview through a well formed support function F that satis�es T . If the terminology is augmentedwith a new de�ned concept C whose description is atleast(n,r) and the support function F withthe pair <C,Satleast(n,r)> then the obtained support function, F 0, is well formed and satis�es thenew terminology T 0.Proof. First of all, we prove that F 0 is well formed. As the only modi�cation in the initialterminology has been to add a new concept, then it has to be proven that the support of this newconcept is well formed (see De�nition 7) and the �rst of the three points in De�nition 15:� As F is well formed it is not possible that there exists two di�erent values of SV (SC ; e) thatrepresent the same real world object. We demonstrate it by reductio ad absurdum. Let ussuppose that for the extension e, there exist two di�erent values, v1 and v2, that represent thesame real world object. This means that there exist at least two values v1 and v2 that belongto SP (Sr; e). Due to the second condition of a well formed function, v1 and v2 must belongto SV (SC1; e), where C1 is the concept which is the domain of role r. This is a contradiction,because the �rst property of a well formed support function says that there cannot exist twodi�erent values belonging to the set of values de�ned for an extension by a concept supportand that represent the same real world object.It must also be satis�ed that for each extension e and for each v is not ambiguous. Let ussuppose that there exists an extension e for which there is an ambiguous value v 2 SV (SC ; e).There must exist a pair of the form (v; v1) in SP (Sr; e). Due to the second condition of awell formed function, v must belong to SV (SC1; e) where C1 is the concept which is thedomain of role r. This implies that SC1 is not well formed, which is a contradiction with thehypothesis.� Suppose that there exists an extension e such that 9v 2 SV (SC ; e)9vi 2 SV (SCi; e)(v =vi ^ RWS(v) 6= RWS(vi)) (means that F 0 is not well formed). As v 2 SV (SC ; e), thenthere must exist a pair of the form (v; v1) in SP (Sr; e) where v belongs to SV (SC1; e) (C1is the concept which is the domain of role r). This would imply that F is not be well

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 299formed, because there exists an extension e such that 9v 2 SV (SC1; e)9vi 2 SV (SCi; e)(v =vi ^ RWS(v) 6= RWS(vi)).Secondly, in order to prove that F 0 satis�es T 0, we use reductio ad absurdum again. F 0 doesnot satisfy T 0 if a) there exists an instance of C that does not take at least n values, which is notpossible due to the construction of SC ; or b) if there exists an instance that takes at least n valuesand that is not an instance of C. This last situation would imply that there exists an extension esuch that there exists at least n pairs of the form (v; vi) belonging to SP (Sr; e) and v belongs toSV (SC1; e) and v does not belong to SV (SC ; e), which is not possible, due to the semantics of theaggregate function in which the support of SC is based. 2APPENDIX B: CONCEPT SUPPORT FOR THE COMBINATIONS OF FIGURE 81. atleast(n,role) and atmost(m,role) (where n � m)Satleast(n,r)^atmost(m,r) = f<Rrl,atrd,TC> if n = 1 ^ not(can be null(atrn)) ^ functional dependency(atrd! atrn)<�atrd6=NULL(Rrl),atrd,TC>if n = 1 ^ can be null(atrn)^ functional dependency(atrd! atrn)<�m�COUNT (atrdFCOUNT atrn(Rrl)),atrd,TC>if n = 1 ^ not(functional dependency(atrd! atrn))" if n > 1 ^ functional dependency(atrd! atrn)<�m�COUNT>n�1(atrdFCOUNT atrn(Rrl)),atrd,TC> in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Srg2. atleast(n,role) and role: vSatleast(n,r)^fills(Sr,v) = f" if f�1rl (v) =2 range(atrn)y" if n > 1 ^ functional dependency(atrd! atrn)z<�COUNT>n�1(atrdFCOUNTatrn(Rrl1atrd�atrn=f�1rl (v)(Rrl)) ),atrd,TC > in other case:<Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Srg3. atleast(n,role) and all(role,concept type)Satleast(n,r)^allc t(Sr,c t) =conjunction(Satleast(n,r),Sallc t(Sr,c t)) =conjunction(Satleast(n,r),complement(Snotallc t(Sr,c t))) =di�erence(Satleast(n,r),Snotallc c t(Sr,c t))where concept type refers to concept, value set o number range.yBecause there cannot be instances in role: vzBecause there cannot be instances in atleast(n,role) where n > 1

300 Jos�e Miguel Blanco et al.4. atmost(m,role) and role: vSatmost(m,r)^fills(Sr,v) = f" if f�1rl (v) =2 range(atrn)f<�atrn=f�1rl (v)(Rrl),atrd,TC> if m > 0 ^ functional dependency(atrd! atrn)<�m�COUNT (atrdFCOUNT atrn(Rrl1atrd�atrn=f�1rl (v)(Rrl)) ),atrd,TC > in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Srg5. atmost(m,role) and all(role,concept type)Satmost(m,r)^allc t(Sr,c t) =conjunction(Satmost(m,r),Sallc t(Sr,c t)) =conjunction(complement(Satleast(m+1,r)),complement(Snotallc t(Sr ,c t))) =complement(union(Satleast(m+1,r),Snotallc t(Sr ,c t)))6. role: v and all(role,concept type)Sfills(Sr,v)^allc t(Sr,c t) =conjunction(Sfills(Sr,v),Sallc t(Sr,c t)) =conjunction(Sfills(Sr ,v),complement(Snotallc t(Sr ,c t))) =di�erence(Sfills(Sr,v),Snotallc t(Sr ,c t))7. atleast(n,role) and atmost(m,role) and role: vSatleast(n,r)^atmost(m,r)^fills(Sr,v) = f" if f�1rl (v) =2 range(atrn)" if n > 1 ^ functional dependency(atrd! atrn)<�m�COUNT>n�1(atrdFCOUNT atrn(Rrl1atrd�atrn=f�1rl (v)(Rrl)) ),atrd,TC>in other case: <Rrl,atrd,atrn,TC ,frl,Tr> is a b.r.s. of Srg8. atleast(n,role) and atmost(m,role) and all(role,concept type)Satleast(n,r)^atmost(m,r)^allc t(Sr ,c t) =conjunction(Satleast(n,r),Satmost(m,r),Sallc t(Sr,c t)) =conjunction(Satleast(n,r)^atmost(m,r),complement(Snotallc t(Sr,c t))) =di�erence(Satleast(n,r)^atmost(m,r),Snotallc t(Sr,c t))9. atleast(n,role) and role: v and all(role,concept type)Satleast(n,r)^fills(Sr,v)^allc t(Sr,c t) =conjunction(Satleast(n,r),Sfills(Sr,v),Sallc t(Sr,c t)) =conjunction(Satleast(m,r)^fills(Sr,v),complement(Sallc t(Sr,c t))) =di�erence(Satleast(m,r)^fills(Sr,v),Sallc t(Sr,c t))

Mapping among Knowledge Bases and Data Repositories: Precise De�nition of its Syntax and Semantics 30110. atmost(m,role) and role: v and all(role,concept type)Satmost(m,r)^fills(Sr,v)^allc t(Sr ,c t) =conjunction(Satmost(m,r),Sfills(Sr,v),Sallc t(Sr,c t)) =conjunction(Satmost(m,r)^fills(Sr ,v),complement(Sallc t(Sr,c t))) =di�erence(Satmost(m,r)^fills(Sr,v),Sallc t(Sr,c t))11. atleast(n,role) and atmost(m,role) and role:v and all(role,concept type)Satleast(n,r)^atmost(m,r)^fills(Sr,v)^allc t(Sr,c t) =conjunction(Satleast(n,r),Satmost(m,r),Sfills(Sr,v),Sallc t(Sr,c t)) =conjunction(Satleast(n,r)^atmost(m,r)^fills(Sr,v),complement(Snotallc t(Sr,c t))) =di�erence(Satleast(n,r)^atmost(m,r)^fills(Sr,v),Snotallc t(Sr,c t))