1 / 12

CS 257 Database Systems Principles Assignment 1

CS 257 Database Systems Principles Assignment 1. Instructor: Student: Dr. T. Y. Lin Rajan Vyas (119). Modes of Information Integration. Information. Information Integration allows database or other distributed information to work together. Three most common approaches:

daire
Download Presentation

CS 257 Database Systems Principles Assignment 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 257Database Systems PrinciplesAssignment 1 Instructor:Student: Dr. T. Y. Lin RajanVyas (119)

  2. Modes of Information Integration

  3. Information • Information Integration allows database or other distributed information to work together. • Three most common approaches: • Federated Database • DataWareHousin • Mediators

  4. Federated Database System • Sources are independent, but one source can call on others to supply information. • One-to-One connection between the all pairs of databases DB 1 DB 2 DB 3 DB 4

  5. Dealer 1 NeededCars(mode1, color, autotrans) • Dealer 2 Autos(seria1, model, color) Options(seria1, option) • Dealer 1 to Dealer 2 f or ( e a ch t u p l e (:m, : c , :a) in neededCars) if ( : a = TRUE) { /* automatic transmission wanted */ SELECT s e r i a l FROM Autos, Options WHERE Autos.seria1 = Options.seria1 AND Options.option = 'autoTrans' AND Autos.mode1 = :m AND Autos.color = :c; } e l s e { /* automatic transmission not wanted */ SELECT serial FROM Autos WHERE Autos.mode1 = :m AND Autos.color = :c AND NOT EXISTS ( SELECT * FROM Options WHERE s e r i a l = Autos.seria1 AND option = 'autoTrans' }; } } • Dealer 3 Cars(serialN0, model, color, autoTrans, ...)

  6. Data WareHouse

  7. Information • Copies sources of data from several sources are stored in a single database. User Query Result Ware House Combiner Extractor 1 Extractor 2 Source 2 Source 1

  8. Dealer 1 Cars(serialN0, model, color, autoTrans, cdPlayer, ... ) • Dealer 2 Autos(seria1, model, color) Opt ions ( s e r i a l , option) • WareHouse AutosWhse(seria1N0, model, color, autoTrans, dealer)

  9. Mediators

  10. It is a software component that supports a virtual database. • It stores no data of its own. User Query Result Mediator Wrapper Wrapper Source 2 Source 1

  11. Extractor for translating Dealer-2 data to the warehouse • INSERT INTO AutosWhse(serialNo, model, color,autoTrans, dealer) SELECT s e r i a l , model, color, ' y e s ' , 'dealer2' FROM Autos, Options WHERE Autos.seria1 = Options.seria1 AND option = 'autoTrans'; • INSERT INTO AutosWhse(serialNo, model, color,autoTrans, dealer) SELECT s e r i a l , model, color, 'no', 'dealer2‘ FROM Autos WHERE NOT EXISTS ( SELECT * FROM Options WHERE s e r i a l = Autos.seria1 AND option = 'autoTrans' );

  12. Thank You

More Related