Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Based On:
A. Sheth and V. Kashyap, So Far (Schematically) yet So Near (Semantically),
Invited paper in Proceedings of the IFIP TC2/WG2.6 Conference on Semantics
of Interoperable Database Systems, DS-5, November 1992
Schematic Heterogeneities
Domain Definition
Incompatibility
Entity Definition
Incompatibility
Abstraction Level
Incompatibility
Schematic
Discrepancy
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
Naming Homonyms
Conflicts
Data Representation
Conflicts
Synonyms
Data Precision
Conflicts
Default Value
Conflicts
Attribute Integrity
Constraint Conflicts
Naming Conflicts
• Semantically alike attributes may have different names and are called
synonyms
STUDENT(Id#, Name, Address) in database DB1
GRADUATE(SS#, Name, Address) in database DB2
STUDENT.Id# and GRADUATE.SS# are synonyms
• Semantically unrelated attributes may have the same names and are
called homonyms
STUDENT(Id#, Name, Address) in database DB1
BOOK(Id#,Title, Author) in database DB2
STUDENT.Id# and BOOK.Id# are homonyms
Solution:
Synonyms can be renamed to the same concept.
Homonyms can be renamed to different concepts.
The associations are kept in a catalog
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
CREATE U_EMPLOYEE
(Name: char(20), SS#: INTEGER, Salary: REAL)
AS SELECT Name, SS#, 1.6*Salary
FROM DB1.EMPLOYEE,
SELECT Name, SS#, Salary
FROM DB2.EMPLOYEE
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
Database
Identifier Conflicts
Homonyms
Naming
Conflicts
Entity Definition
Incompatibility Union Compatibility Synonyms
Conflicts
Schema Isomorphism
Conflicts
Missing Data
Item Conflicts
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
Naming Conflicts
• Semantically alike entities may have different names and are called
synonyms
EMPLOYEE(SS#, Name, Address) in database DB1
WORKER(SS#, Name, Address) in database DB2
EMPLOYEE and WORKER are synonyms
• Semantically unrelated entities may have the same names and are called
homonyms
TICKET(Movie, Theater, Date, Timing) in database DB1
TICKET(Date, Offense, Officer, CourtDate) in database DB2
The entities TICKET in DB1 and DB2 are homonyms
Solution:
Synonyms can be renamed to the same concept.
Homonyms can be renamed to different concepts.
The associations are kept in a catalog
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
The attributes Age and DateOfBirth are not equivalent but can be made
equivalent after some transformations
The attribute Phone in DB2 can be assumed to have both the Office and
the Home Phone numbers
Acceptable
Inconsistency
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
Known Inconsistency
When the source of Inconsistency is identified
Solution: Choose the more reliable database
In the previous example:
If DB2 is identified as the more reliable database
=> weight(USSEnterprise) = 200
Temporal Inconsistency
• Inconsistency of a temporary nature.
• Specified by using a temporal consistency predicate.
In the previous example, the two weights may be considered temporarily
inconsistent with DB1 updating it’s value subject to the following
constraints:
• At a particular date and/or at a specific point in time:
AT 9:00 o’clock on 27th April 1995
• Before or after a specific instance of time or date:
BEFORE 8:00 a.m. on 27th April 1995
• During intervals of time and/or date:
INTERVAL(27th April 1995 AT 17:00 - 28th April 1995 AT 8:00)
• Periodically, when certain amount of time has elapsed:
Every Day AT 12:00
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
Acceptable Inconsistency
Depending on the type of the query, the inconsistency between the values
from different databases might be within an acceptable range.
• Numerical Inconsistency:
QUERY: Find the Tax Bracket of an Employee
INCONSISTENCY: If abs(Salary1 - Salary2) < 0.99
The inconsistency is ignored
• Non-numerical Inconsistency:
QUERY: Find the State of residence of an Employee
INCONSISTENCY: If Residence1 IN State1 and Residence2 IN State2
and State1 = State2
The inconsistency is ignored
Generalization
Conflicts
Abstraction Level
Incompatibility
Aggregation
Conflicts
Template filename: ba-tmplt-vugrfDiffTitle.fm Version 1.0.3
Generalization Conflicts
When the same entity is represented at different levels of generalization
Aggregation Conflicts
When an entity in one database corresponds to a set of entities (or any
other aggregation) in another
Schematic Discrepancies
Data Value
Attribute Conflict
Data Value
Entity Conflict
Schematic Discrepancies
Database DB1:
relation STOCKS(Date, StkCode, ClsPrice)
Database DB2:
relation STOCKS(Date, Stk1, Stk2, ...)
Schematic Discrepancies
Database DB2:
relation STOCKS(Date, Stk1, Stk2)
Database DB3:
relations Stk1(Date, ClsPrice),
Stk2(Date, ClsPrice)
Schematic Discrepancies
Database DB1:
relation STOCKS(Date, StkCode, ClsPrice)
where values(StkCode) = Stk1, Stk2, ....
Database DB2:
relations Stk1(Date, ClsPrice)
Stk2(Date, ClsPrice) ......