0% found this document useful (0 votes)
61 views4 pages

Distributed Database Design Practices

Uploaded by

Youssef Khaled
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
61 views4 pages

Distributed Database Design Practices

Uploaded by

Youssef Khaled
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Practice 80 Distributed Databases

Q1) Consider the following Department table; The emirates attribute contains the names of the
cities where the departments are located i.e. Dubai, Abu Dhabi, Ajman, Al Ain etc. We want to
store the information for each department from each emirate in a separate partition except
departments from Al Ain and Abu Dhabi where we want to keep them in the same partition.
Write create table and create index commands to create list based partitions based on the
attribute address for storing the data and indexes for the following table. The departments are
from the following cities: Dubai, Abu Dhabi, Al Ain, Ajman, Ras Al Khaima. (3 marks)

CREATE TABLE Department


(deptid NUMBER(5),
dept_name VARCHAR2(30),
sales_amount NUMBER(10),
emirates VARCHAR2(20));
Q2) Assuming: the following conceptual schema shows the structure of our distributed database
and assuming Hotel and Room tables are in a database called [Link] and the Guest
table is located in another database called [Link] and can be accessed through
user name HotelGuest and password of “verySecret”.
Create a database link to access the Guest table from [Link] database.
Then write a SQL statement to find “How many rooms have been booked by Italians in each
hotel” (4 marks)
Q3) Consider a set of tables as below:
Employee(empno, name, empDate)
Customer(cno, name, area, city)
Orders(ono, odate, cno)
Items(ono, itemno, itemid, qtty, price)

Let’s say these tables belong to an online retailer that maintains office-warehouses in 5 cities including headquarters.
a) How would you go about distributing these tables if you were told the company has a very high volume of
orders in each one of the cities.
b) Write the appropriate CREATE TABLE and INDEX commands as necessary for your choice.
c) Now, if instead we want to keep track of seasonal sales rather than cities, how that would change your
design. Basically we want to keep each season in a different file or partition.
d) How you would go about indexing, would design global or partitioned indexes.
Q4) Explain the difference between each pair of keywords:
a) Replication vs Duplication
b) Share nothing distributed database vs fragmented distributed database
c) Connected user link vs Fixed user link vs Current user link
d) Horizontal fragmentation vs Horizontal fragmentation
e) Global index vs global portioned index vs local partitioned index

You might also like