integrating view schemata using an extended object definition language
DESCRIPTION
Integrating View Schemata Using an Extended Object Definition Language. Mark Roantree Dublin City University. Content. Introduction Background, Problem & Motivation View Concepts & Language Overview View Language Usage Generation of Virtual Class Extents Implementation & Conclusions. - PowerPoint PPT PresentationTRANSCRIPT
Integrating View Schemata Integrating View Schemata Using an Extended Using an Extended
Object Definition LanguageObject Definition Language
Mark RoantreeMark Roantree
Dublin City UniversityDublin City University
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 2
ContentContent
IntroductionIntroduction Background, Problem & MotivationBackground, Problem & Motivation View Concepts & Language OverviewView Concepts & Language Overview View Language UsageView Language Usage Generation of Virtual Class ExtentsGeneration of Virtual Class Extents Implementation & ConclusionsImplementation & Conclusions
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 3
IntroductionIntroduction
Federated Database SystemsFederated Database Systems– Heterogeneous Information Systems Heterogeneous Information Systems
communicate through a common (ODMG) communicate through a common (ODMG) interface.interface.
– Each system specifies data Each system specifies data viewsviews to share to share with other systems.with other systems.
– A view is a A view is a subschemasubschema of virtual classes. of virtual classes.
– An An Integration ServiceIntegration Service imports views and imports views and combines them to form a federated view.combines them to form a federated view.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 4
Oracle 8
Legacy
Informix
Versant
ODMGview
ODMGview
ODMGview
ODMGview
IntegrationService
ODMG Federated Schema
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 5
BackgroundBackground
The OASIS Project: research into building The OASIS Project: research into building a healthcare prototype.a healthcare prototype.
Six information systems to share data in Six information systems to share data in the HIV department of a Dublin hospital.the HIV department of a Dublin hospital.
Forward interoperability is a Forward interoperability is a requirement.requirement.
Four of these systems may participate in Four of these systems may participate in alternate federations.alternate federations.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 6
Problem & MotivationProblem & Motivation
Global database imports locally defined Global database imports locally defined views.views.
Specific views are selected to comprise Specific views are selected to comprise each federated schema.each federated schema.
To support forward interoperability, the To support forward interoperability, the usage of a standard model is important.usage of a standard model is important.
ODMG is a published standard which ODMG is a published standard which supports the necessary o-o features.supports the necessary o-o features.
A semantically rich model helps integration A semantically rich model helps integration engineers to “understand” each schema.engineers to “understand” each schema.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 7
Problem & MotivationProblem & Motivation
ProblemProblem– ODMG has no view mechanism.ODMG has no view mechanism.
Requirements:Requirements:– View mechanism must:View mechanism must:– retain as much semantic information as retain as much semantic information as
possible;possible;– easily facilitate complex restructuring (o-o easily facilitate complex restructuring (o-o
model is not as simple as the relational model is not as simple as the relational model);model);
– support schema integration.support schema integration.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 8
View ConceptsView Concepts
A A viewview is a is a subschemasubschema comprising one or more comprising one or more (multi-class) segments.(multi-class) segments.
A A segmentsegment comprises one or more classes comprises one or more classes connected through either inheritance or connected through either inheritance or association relationships.association relationships.
Each segment contains Each segment contains aa pivotalpivotal class which class which determines the extent for all classes in that determines the extent for all classes in that segment.segment.
No new object identifiers are created i.e. an No new object identifiers are created i.e. an object preserving semantics with tight bindings object preserving semantics with tight bindings between virtual and base classes.between virtual and base classes.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 9
Language OverviewLanguage Overview
Property Declarations:Property Declarations:– renamerename– hidehide– derivederive
Class DeclarationsClass Declarations– operation (restructure & integrate)operation (restructure & integrate)– renamerename– ffilterilter
The ODLThe ODLvv language is an extension to ODMG’s language is an extension to ODMG’s ODL.ODL.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 10
Property DeclarationsProperty Declarations
SubschemaSubschema PASlocal1 { PASlocal1 {SchemaSegmentSchemaSegment { {ImportBaseImportBase Patient, Consultant; Patient, Consultant;RestructureRestructure { {useuse Patient Patientpropertyproperty { { renamerename Fname Fname asas Firstname Firstname hidehide DOB,Bloodtype,NextOfKin DOB,Bloodtype,NextOfKin derivederive cm_height cm_height asas height * 2.5 } height * 2.5 }}}ExportExport PASlocal1.Patient, PASlocal1.Patient, PASlocal1.Consultant; PASlocal1.Consultant; }}
}}
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 11
Class RestructuringClass Restructuring
aggregate operatoraggregate operator
Patient
MRN
Quantity
Date_in
EpisodeRef
Date
Details
Patient
MRN
Quantity
Date_in
EpisodeRef
Episodes
EpisodeRef
Date
Details
PatientRef
Episodes := aggregate (EpisodeRef,Date,Details)from Patient {as EpisodeRef to PatientRef}
expand Patient.EpisodeRef (reverse operation)
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 12
Class RestructuringClass Restructuring subclass, superclass operatorssubclass, superclass operators
Fname
Lname
DOB
MRN
NextOfKin
bloodtype
consultant
Address
Episodes
Fname
Lname
DOB
Address
MRN
NextOfKin
bloodtype
consultant
Episodes
Patient Person
Patient
Person := superclass (Fname,Lname,DOB,Address)from Patient
flatten Patient into Personrename Person as Patient(reverse operation)
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 13
Restructuring SampleRestructuring Sample
subschemasubschema Agg AggFed1 Fed1 {{SchemaSegmentSchemaSegment {{ ImportImportVirtualVirtual PAS1.Patient; PAS1.Patient; RestructureRestructure { { useuse PAS1.Patient PAS1.Patient classclass { { Episodes := Episodes := aggregateaggregate
(EpisodeRef, Date, Details)(EpisodeRef, Date, Details)fromfrom Patient Patientasas EpisodeRef EpisodeRef toto PatientRef PatientRef }}
};}; ExportExport Agg AggFed1Fed1.Patient, Agg.Patient, AggFed1Fed1.Episodes.Episodes };};
};};
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 14
Integration operatorIntegration operator
join, ojoinjoin, ojoin
Patient
Fname
Lname
MRN
DOB
Address
Patient
Firstname
Lastname
DOB
PatientID
bloodtype
Patient
Fname
Lname
PatientID
DOB
Address
bloodtype
PAS database HIV database
Property Mapping
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 15
Using joinUsing join
How How to deal with synonymsto deal with synonyms??– Use Use linklink to bind two properties to bind two properties..
What happens if all four semantically What happens if all four semantically relatedrelated properties are not equal? properties are not equal?– ObjectsObjects are not are not a member of the extent for a member of the extent for
thethe new virtual class new virtual class oror– Use Use preferprefer to choose one value to choose one value oror– Use Use withwith to amend the contents of one to amend the contents of one
property so that the property pair becomes property so that the property pair becomes equal.equal.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 16
join sample (i)join sample (i)
classclass { { joinjoin Patient Patient fromfrom PAS.Patient, HIV.Patient PAS.Patient, HIV.Patient onon P PASAS.Patient.MRN.Patient.MRN linklink PatientId := MRN PatientId := MRN}}
This view will use This view will use MRNMRN and and PatientIDPatientID to perform the join to perform the join operation. operation. PatientIDPatientID is the chosen label in the view class. is the chosen label in the view class.
It will also require that both It will also require that both DOBDOB properties match, properties match, otherwise the objects will not form part of the view otherwise the objects will not form part of the view class class extent.extent.
Name properties (Name properties (eg. eg. FnameFname and and FirstnameFirstname) are treated ) are treated as unrelated properties.as unrelated properties.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 17
join sample (ii)join sample (ii)
classclass { { joinjoin Patient Patient fromfrom PAS.Patient, HIV.Patient PAS.Patient, HIV.Patient onon Pas.Patient.MRN Pas.Patient.MRN linklink PatientId := MRN PatientId := MRN linklink Fname := Firstname Fname := Firstname linklink Lname := Lastname Lname := Lastname}}
This view will expect that This view will expect that FnameFname and and FirstnameFirstname are are equal otherwise objects will not form part of the view equal otherwise objects will not form part of the view class class extent.extent.
The term after the The term after the linklink statement is used in the view statement is used in the view class (class (FnameFname, , LnameLname).).
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 18
join sample (iii)join sample (iii)
classclass { {
joinjoin Patient Patient fromfrom PAS.Patient, HIV.Patient PAS.Patient, HIV.Patient
onon Pas.Patient.MRN Pas.Patient.MRN
linklink PatientId := MRN PatientId := MRN
linklink Fname := Firstname Fname := Firstname
linklink Lname := Lastname Lname := Lastname
withwith Fname Fname preferprefer PAS.Fname PAS.Fname
withwith Lname Lname preferprefer PAS.Lname PAS.Lname
}}
Where names do not match, values frWhere names do not match, values froom the PAS database are m the PAS database are chosen.chosen.
Note that the Note that the DOBDOB properties must properties must still still match.match.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 19
Integration operatorIntegration operator superjoin, osuperjoinsuperjoin, osuperjoin
Patient
Fname
Lname
MRN
DOB
Address
Patient
Firstname
Lastname
DOB
PatientID
bloodtype
Patient
Firstname
Lastname
DOB
MRN
H_Patient
bloodtype
P_Patient
Address
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 20
Class FiltersClass Filters
A filter function A filter function f()f() is applied to a is applied to a pivotalpivotal class. class.
ThThee filter function is used to create the filter function is used to create the extents for all classes in that segment extents for all classes in that segment of the schema.of the schema.
A filter is an OQL A filter is an OQL wherewhere clause. clause.
filterfilter Patient where bloodtype = ‘A’ Patient where bloodtype = ‘A’
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 21
Generation of ExtentsGeneration of Extents
How are extents for base classes generated?How are extents for base classes generated? A A shallowshallow extent E extent Ess(C) is the set of all objects for (C) is the set of all objects for
the class the class CC. The extent query for this class is . The extent query for this class is ““select *.*select *.*”.”.
A A deepdeep extent E extent Edd(C) is the set of all objects for (C) is the set of all objects for the class the class CC, plus the deep extents for all of its , plus the deep extents for all of its sub-classes Ssub-classes Sii..
EEdd(C) = E(C) = Ess(C) (C) EEdd(S(Sii) )
ii
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 22
Virtual Class ExtentsVirtual Class Extents
Let VC be the Virtual Class and f() Let VC be the Virtual Class and f() be be the filter function applied to that class.the filter function applied to that class.
EEdd(f(VC)) = E(f(VC)) = Ess(f(VC)) (f(VC)) EEdd(f(fii(VS(VSii))))
ii
A different filter function is generated A different filter function is generated for each class based on the filter for the for each class based on the filter for the pivotal class.pivotal class.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 23
ImplementationImplementation
ODMG metamodel was extended to hold ODMG metamodel was extended to hold virtual entities (new metaclasses). virtual entities (new metaclasses).
Versant OOdb was used to store ODMG Versant OOdb was used to store ODMG representations of local Information representations of local Information Systems.Systems.
Java/ANTLR was used to construct parser Java/ANTLR was used to construct parser for view and wrapper definitions.for view and wrapper definitions.
Visual C++ 6.0 used to implement the Visual C++ 6.0 used to implement the semantic actions for each view command.semantic actions for each view command.
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 24
user-definedobject instances
ODMG-defined metadata types
(describe database schema)
Extension metadata types(describe view schemata
& object wrappers
Database Schema Repository Schema
Local IS
Database ODLProcess
Model TransformationProcess
ODLfile
wrapperdefinition
viewdefinition
ViewService
WrapperService
6th International IFCIS Conference on Cooperative Information Systems (CoopIs 2001) Slide 25
ConclusionsConclusions
Research into federated databases has Research into federated databases has proposed an o-o canonical model.proposed an o-o canonical model.
ODMG provides a standard solution but ODMG provides a standard solution but does not support virtual classes and does not support virtual classes and properties, or view schemata.properties, or view schemata.
The ODLThe ODLvv and ODL and ODLww languages languages overcome this problem, with the overcome this problem, with the inclusion of rich semantics.inclusion of rich semantics.
Carefully crafted views allow updates Carefully crafted views allow updates for some federations.for some federations.