1 / 5

Distributed DBMS

Distributed DBMS. Examples. Fragmentation. Consider the following partial schema for Al- Saggaf pharmacies: Pharmacy ( PhID , Phone, Address) Medication ( MID , Name, Price, Quant, Description, PhID ) Prescription ( MID, PID, Date , Dosage, Doctor, Hospital)

dmitri
Télécharger la présentation

Distributed DBMS

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. Distributed DBMS Examples

  2. Fragmentation Consider the following partial schema for Al-Saggaf pharmacies: • Pharmacy (PhID, Phone, Address) • Medication (MID, Name, Price, Quant, Description, PhID) • Prescription (MID, PID, Date, Dosage, Doctor, Hospital) • Patient (PID, Name, Age, Phone, Address) Al-Saggaf Pharmacies have 3 main sites: Riyadh, Jeddah, and Dammam. • Senario 1: Each site is interested in the pharmacies located in it. Patients are to be divided by name; Riyadh site with names beginning with A to P, and Jeddah H to Z. Prescription information are needed in all sites. • Senario 2: Riyadh is interested in names and phones of patients. While Jeddah is interested in PIDs, names, ages and addresses of patients. The main branch (Dammam) needs all the database. • Fragment, using relational algebra statements, replicate if necessary, and allocate the tables based on the above description.

  3. Fragmentation • Consider the following partial schema: • Supermarket(SID, Size, numOfEmp, Address) • Employee(EID, Name, DOB, Address, Salary, SID) • Product(PID, Name, Price, Quantity, Description, SID) • Dependant(DID, Name, Relationship, EID) The supermarket has 4 sites: Malaz, Olaya, Quds, and Hamra. Malaz is interested in Supermarkets that are 400 m2 or bigger. While Olaya is interested in only the Size and Address of supermarkets smaller than 400 m2. Quds and Hamra are interested in all supermarkets. Fragment, using relational algebra statements, replicate if necessary, and allocate the tables based on the above description.

  4. Strategy • Consider the following distributed DB: • B1(Bid, title, author, price, category, Bsid) 1,000,000 records in Abha • B2(Bid, title, author, price, category, Bsid) 500,000 records in Jeddah • B3(Bid, title, author, price, category, Bsid) 2,000 records in Dammam • BookStore(Bsid, Name, City) 700 records in Riyadh We want to execute the following query from Dammam: • Get the average price of books in the Bookstore named “Hola Bookstore”. We want to execute the following queries from Jeddah: • Get the average price of books per author. • Get the Names of bookstores that sell books priced > SR1500. • Describe, in clear steps, the best strategy to execute the above query.

  5. T1 T2 T3 GWFG • Consider the following situation: We have 3 sites: S1, S2 and S3. S1 is the deadlock-detection coordinator. Information needs 1 time unit to travel from S2 to S1 and 2 time units to travel from S3 to S1. • Show the global wait-for graph at each time from t0 to t3 and indicate whether or not there is a cycle. And if there is a cycle, indicate whether or not it is real. Initial Global Graph at S1:

More Related