October 6 University
Faculty of Information System & Computer Science
Department: IS/CS
Study Year/Level: Fourth
Course Title: Advanced Database
Course Code: 424
Examination Date: 1/06/ 2015
Examination Starts: Evening
Allowed Examination time: 1 hours
Total Marks: 40 Marks
The Examination Consists of Twelve Questions in Two Pages
Answer all the following questions
PART A- (10 x 2 = 20 marks)
1. What are advantages of B+-tree index files?
a. automatically reorganizes itself with small, local, changes, in the face of insertions and
deletions.
b. Reorganization of entire
file is not required to maintain performance.
2. What are the types of ordered indices?
Primary index and Secondary index
3. Why do we need normalization?
We need the normalization to enhance the design and get a good DB system.
4. What is the difference between ordered and hashed indices?
a. Ordered indices: search keys are stored in sorted order in the index file.
b. Hash indices: search keys are distributed uniformly across “buckets” using a “hash
function”.
5. What role do Armstrong's inference rules-the three inference rules: IRI through IR3-play in
the development of the theory of relational design?
These are rules hold and all other rules that hold can be deduced from them.
6. What is the difference between BCNF and third normal forms?
In BCNF, the left side of the rule must be a key, but in 3rd normal form the left must be a
key or the right must be a prime attribute.
7. What is the IS-A relationship?
Relation between the super and sub classes.
8. What is the difference between a category and shared subclass?
The category inherits one of its parent, but the shared inherits all its parents.
9. What is the difference between join and cartesian product operations?
Join is a cartesian product with a condition.
10. What is operation in algerbra that similar to the select clause in SQL ? project operation.
Page 1 of (6)
PART B - (2 x 10 = 20 marks)
11. A sports newspaper needs to design a database to record the matches held between teams
during the annual competitions for different sports (football, basketball, etc). The newspaper
needs to keep track of club name, address, and phones. Club names are unique. Each club
may have many teams: one for each sport (suppose it is only for men), a team has a manager, coach,
and many players (their count may differ due to the sport type), the newspaper needs to keep track
each person id (unique), name, date of birth, nationality and if he is a player, his number and position
in the team (defender, goalkeeper, etc). At the beginning of each competition (once for a year), the
competitor clubs are recorded along with their data. For each match, the newspaper needs to record
the match date, the two teams, members for that match and the match result, also the position of
team players which may differ from match to match (except for goalkeeper of course). It also
required recording the position in the competition and total points for each team based on match
results. At the end of the competition, the winner team is recorded. Draw an enhanced-entityrelationship diagram that captures, as far as possible, the requirements stated above.
Page 2 of (6)
12. Considering the number of pointers is four in the node, construct a B+ -tree for the
following set of key values:
(2, 3, 5, 7, 11, 17, 19, 23, 29, 31)
Page 3 of (6)
13. Consider the universal relation R = {A, B, C, D, E, F, G, H, I,J} and the set of functional
dependencies F ={{A, B} → {C}, {A} → {D, E}, {B}→ {F}, {F} → {G, H},{D}→ {I,J}}.
What is the key for R? Decompose R into 2NF and then 3NF relations.
A minimal set of attributes whose closure includes all the attributes in R is a key. (One
can also apply algorithm 15.4a (see chapter 15 in the textbook)). Since the closure of
{A, B}, {A, B}+ = R, one key of R is {A, B} (in this case, it is the only key). To normalize
R intuitively into 2NF then 3NF, we take the following steps (alternatively, we can apply
the algorithms discussed in Chapter 15): First, identify partial dependencies that violate
2NF. These are attributes that are functionally dependent on either parts of the key, {A}
or {B}, alone. We can calculate the closures {A}+ and {B}+ to determine partially
dependent attributes: {A}+ = {A, D, E, I, J}. Hence {A} -> {D, E, I, J} ({A} -> {A} is a trivial
dependency) {B}+ = {B, F, G, H}, hence {A} -> {F, G, H} ({B} -> {B} is a trivial
dependency) To normalize into 2NF, we remove the attributes that are functionally
dependent on part of the key (A or B) from R and place them in separate relations R1
and R2, along with the part of the key they depend on (A or B), which are copied into
each of these relations but also remains in the original relation, which we call R3 below:
R1 = {A, D, E, I, J}, R2 = {B, F, G, H}, R3 = {A, B, C} The new keys for R1, R2, R3 are
underlined. Next, we look for transitive dependencies in R1, R2, R3. The relation R1
has the transitive dependency {A} -> {D} -> {I, J}, so we remove the transitively
dependent attributes {I, J} from R1 into a relation R11 and copy the attribute D they are
dependent on into R11. The remaining attributes are kept in a relation R12. Hence, R1
is decomposed into R11 and R12 as follows: R11 = {D, I, J}, R12 = {A, D, E} The
relation R2 is similarly decomposed into R21 and R22 based on the transitive
dependency {B} -> {F} -> {G, H}: R21 = {F, G, H}, R22 = {B, F} The final set of relations
in 3NF are {R11, R12, R21, R22, R3}.
.
Page 4 of (6)
14. A
COMPANY
database
contains
the
following
tables:
Specify the following queries in the relational algebra:
a. Retrieve the names of all employees in department 5 who work more than 10 hours per
week on the ProductX project.
b. List the names of all employees who have a dependent with the same first name as
themselves.
c. For each project name find the total of working hours.
15. BOOK (Book_title, Authorname, Booktvpe, price, Author_affil, Publisher).
Suppose the following dependencies exist:
Book_title → Publisher, Book_type.
Book_type → price.
Authorname → Author_affil.
a. What normal form is the relation in? Explain your answer.
b. Apply normalization until you cannot decompose the relations further. State the reasons
behind each decomposition.
Page 5 of (6)
With my best wishes
Dr. Abd El-Aziz Ahmed
Page 6 of (6)
© Copyright 2026 Paperzz