Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
14 views

Testbank Distributed Database Mid 2024 Fall With Solution

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Testbank Distributed Database Mid 2024 Fall With Solution

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Kasit Team

Distributed Database – Mid – Fall – 2023 / 2024


‫ ريم الفايز‬.‫ د‬:‫منسق المادة‬

Answers are at the end of the test bank

There are 2 suggested solutions

Question 1 - 5: MCQs: [5 marks]


Q1: What is a distributed database :
a. A database that is distributed across multiple locations
b. A database that only stores distributed data
c. A database that uses a distributed query language
d. A database that can only be accessed by a distributed network

Q2: Which of the following is an example of a distributed database


architecture :
a. Relational database management system (RDBMS)
b. Centralized database system
c. NoSQL database system
d. Peer-to-peer network

1 | Page
Kasit Team

Q3: In a distributed database system, what does the term "transparency"


refer to :
a. The visibility of data to all nodes in the system
b. The simplicity of data management tasks
c. The ability to access data without knowledge of its physical location or
distribution
d. The consistency of data across distributed nodes

Q4: What is the primary goal of data replication in a distributed database :


a. Decrease data redundancy
b. Improve data consistency
c. Enhance data availability and fault tolerance
d. Simplify data retrieval

Q5: What role does data partitioning play in a distributed database system :

a. Enhancing data security


b. Simplifying data retrieval
c. Dividing data into smaller, manageable subsets
d. Increasing data redundancy

2 | Page
Kasit Team

Q6 : Answer the following questions with clear and concise answers :


[10 marks]

A. What are the key motivations behind the adoption of distributed

databases in modern computing ? [2 marks]

B. Explain the concept of horizontal scalability and how it is related to

distributed databases : [2 marks]

C. Discuss the challenges associated with deploying a distributed database

system compared to a centralized system : [3 marks]

D. Explain the difference between horizontal and vertical data

fragmentation. Provide examples to illustrate each type : [3 marks]

3 | Page
Kasit Team

Q7 : Suppose we have a database for a library with a table named "Books"


that contains information about various books available. Below is a snippet
of the Books table : [7 marks]

BID Title Author Genre Published Copies


Year Available

1 The Great F. Scott Fiction 1925 10


Gatsby Fitzgerald

2 To Kill a Harper Fiction 1960 8


Mockingbird Lee

3 1984 George Dystopian 1949 12


Orwell

4 The Catcher J.D. Fiction 1951 5


In The Rye Salinger

4 | Page
Kasit Team

Consider that the library wishes to distribute its database. Given the
following requirement for each case, explain the needed type of horizontal
fragmentation (Derived, Primary) and show with Relational Algebra how the
fragmentation will be performed .

a. The library admin is concerned about high stocked books and low stocked
books. The library considers the book with 10 or more copies available as
highly stocked and other than as low stocked books . [3 marks]

b. The library is considering splitting its content based on Genre and


published year. Consider the following applications for the library :
[4 marks]

✓ Genre = Fiction
✓ Published Year > 1950

5 | Page
Kasit Team

Q8 : Given the following queries on an Employee table with the following


column set | EmployeeID | FirstName | LastName | Department | Salary 8
Consider the following queries to perform vertical fragmentation, and
answer the following questions : [8 marks]

a. SELECT EmployeeID, FirstName, LastName FROM Employee WHERE EmployeeID = 1;

b. SELECT EmployeeID, Department, Salary FROM Employee WHERE EmployeeID 17;

c. SELECT P.EmployeeID, FirstName, LastName, Department, Salary FROM Employee


WHERE P. EmployeeID 11;

d. SELECT EmployeeID, FirstName, LastName, Department FROM Employee WHERE


Department = ‘ IT’ ;

1. Build a Query usage matrix for the employee table based on these queries
: [4 marks]

6 | Page
Kasit Team

2. Now consider the following query frequency matrix :

Query Usage Frequency

a 200

b 100

c 10

d 5

And given the following fragments of the Employee table :

1. EmpPersonallinformation: EmployeelD, FirstName, LastName

2. EmploymentDetails: EmployeelD, Department, Salary

Calculate the split quality for the suggested fragments. Please show the rule
when solving this question : [4 marks]

7 | Page
Kasit Team

Answers

Question 1 2 3 4 5

Answer A D C C B

Q6:
A:
Solution 1 :-
It is more reliable , by distributing the database in separate locations . And It increases
the performance and fault tolerance .

Solution 2 :-
1. Several copies of data that ensure reliability and availability .
2. Performance of servers: work multiprocessor to speed up data access .

B:
Using a distributed databases reduce the cost of increasing scalability so the expansion
will be easier to happened .

C:
Solution 1 :-
1. Increasing The cast of communicating across a network .
2. It needs more security .
3. It increases the cost of updating the database as well as the concurrent control .

Solution 2 :-
1. security issues 2. Complexity 3. Consistensy

8 | Page
Kasit Team

Q7:
a.

b.

9 | Page
Kasit Team

Q8:
1.

First Name Last Name Department Salary


A1 A2 A3 A4
a 1 1 0 0
b 0 0 1 1
c 1 1 1 0
d 1 1 1 0

2.
split quality = acc (VF1) * ac (VF2) – acc (VF1 , VF2)2
= 200 * 100 – (15)2
= 20000 – 225
= 19775

10 | Page

You might also like