








































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!









































Mediators
Semistructured Data
Answering Queries Using Views
docsity.com
Very many modern DB applications involve combining databases.
Sometimes a “database” is not stored in a DBMS --- it could be a spreadsheet,flat file, XML document, etc.
docsity.com
You can’t change its structure for thesake of one application, because it willcause others to break.
docsity.com
addr
in one DB is
address
in
another.
same color in each DB?
Is 20 degrees
Fahrenheit or Centigrade?
database the same?
What about
consultants?
Retirees?
Contractors?
docsity.com
docsity.com
Wrapper
Wrapper
Wrapper
Wrapper
Wrapper
Wrapper
docsity.com
Result
User query
Mediator
Wrapper
Wrapper
Query
Query
Query
Query
Result
Result
Result
Result
Source 1
Source 2
docsity.com
docsity.com
Mediator might start by querying each bus manufacturer for model-protocol pairs.
The wrapper would turn them into triples byadding the manf component.
Then, for each protocol returned, mediator queries disk manufacturers for disks withthat protocol.
Again, wrapper adds manf component.
docsity.com
Sources’ capabilities are defined in terms of the global predicates.
E.g.,Quantum’s disk database could bedefined by QuantumView(M,P) =Disks(’Quantum’,M,P).
Mediator discovers all combinations of a bus and disk “view,” equijoined on theprotocol components.
docsity.com
A data model that is suited for integrating (slightly) incompatiblesources.
Based on labeled graphs.
Key attribute: flexibility --- there is no schema; sources do not all need tohave the same attributes.
docsity.com
Use semistructured data in place of the global schema.
Easier to translate sources with varyinglocal schemas into one flexible schema.
XML and its attendant standards (XSL, XQUERY, etc.) are really animplementation of semistructured data.
docsity.com
XML (Extensible Markup Language) uses a semistructured data model to representdocuments.
Example:
St.
docsity.com
You can represent a semistructured data graph (or XML document) asrelations or predicates:
arcs(From, To, Label)
data(Node, Value)
But queries about paths in the graph become complex joins.
docsity.com