1 Information Integration Mediators Warehousing Answering Queries Using Views Slides are modified from Dr. Ullman’s notes.
Homework 4 uUse “spool [filename]” to record your activities: wCreate tables wInserting values into tables wPart 2: SQL queries and answers uIf you have already created tables and populated them: wUse Oracle Data Date Dictionary to sow the tables and specs 2
HW4 cont. uSelect * from cat; uDescribe user_tables; uSelect * from ; 3
4 Example Applications 1.Enterprise Information Integration: making separate DB’s, all owned by one company, work together. 2.Scientific DB’s, e.g., genome DB’s. 3.Catalog integration: combining product information from all your suppliers.
5 Challenges 1.Legacy databases : DB’s get used for many applications. uYou can’t change its structure for the sake of one application, because it will cause others to break. 2.Incompatibilities : Two, supposedly similar databases, will mismatch in many ways.
6 Examples: Incompatibilities Lexical : addr in one DB is address in another. uValue mismatches : is a “red” car the same color in each DB? Is 20 degrees Fahrenheit or Centigrade? uSemantic : are “employees” in each database the same? What about consultants? Retirees? Contractors?
7 What Do You Do About It? uGrubby, handwritten translation at each interface. wSome research on automatic inference of relationships. uData sharing uWrapper (aka “adapter”) translates incoming queries and outgoing answers.
88 Semistructured Data BARS PRICE BEERBAR name = ”JoesBar” theBeer = ”Miller” theBeer = ”Bud” SoldBy = ”…” name = ”Bud” Rose =document Green = element Gold = attribute Purple = primitive value bars.xml
99 Example Document … <BEER name = ”Bud” soldBy = ”JoesBar SuesBar … ”/> … An element node An attribute node Document node is all of this, plus the header ( <? xml version… ).
ACCESS TO MULTIPLE DATABASES 10
11 Integration Architectures 1.Federation : everybody talks directly to everyone else. 2.Warehouse : Sources are translated from their local schema to a global schema and copied to a central DB. 3.Mediator : Virtual warehouse --- turns a user query into a sequence of source queries.
12 Federations Wrapper
13 Warehouse Diagram Warehouse Wrapper Source 1Source 2
14 A Mediator Mediator Wrapper Source 1Source 2 User query Query Result
15 Two Mediation Approaches 1.Global as View : Mediator processes queries into steps executed at sources. 2.Local as View : Sources are defined in terms of global relations; mediator finds all ways to build query from views.
uNext Class wPL/SQL 16