0% found this document useful (0 votes)
98 views2 pages

TD 2

The document outlines exercises related to the relational model in a databases module for a 2nd Year Bachelor's in Computer Science program. It includes tasks such as identifying primary keys, anomalies, and transforming tables into third normal form (3NF) based on given data and functional dependencies. Additionally, it requires the creation of functional dependency graphs and equivalent schemas for various relations.

Uploaded by

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

TD 2

The document outlines exercises related to the relational model in a databases module for a 2nd Year Bachelor's in Computer Science program. It includes tasks such as identifying primary keys, anomalies, and transforming tables into third normal form (3NF) based on given data and functional dependencies. Additionally, it requires the creation of functional dependency graphs and equivalent schemas for various relations.

Uploaded by

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

Level: 2nd Year Bachelor's in Computer Science (2024/2025)

MODULE: DATABASES
TD No. 2: RELATIONAL MODEL (PART I)

Exercise 1 :

Let the following part of the table contain information related to a company selling household electrical
appliances:

Order Customer Customer Customer Product Quantity Unit Supplier


OrderDate ID ProductID
ID Name Address Name Ordered Price Name
1 Ali Rue Alpha-
1 15/01/2025 101 Television 2 25000
Ahmed Freedom Electro
1 Ali Rue Alpha-
1 20/01/2025 102 Refrigerator 1 46000
Ahmed Freedom Electro
6 Sara Avenue Alpha-
2 18/01/2025 101 Television 1 25000
Benaiche Istiklal Electro
6 Sara Avenue Washing Electro
2 18/01/2025 103 1 70000
Benaiche Istiklal Machine Star
1. What is the primary key of this relation (1 Point)
2. Identify anomalies in this table (4 Points).
3. Transform the table into the third normal form (3NF) (3 Points).

Exercise 2 :
We consider the relation R (A, B, C, D, E, F) on which the following functional dependencies
are defined:
A, B → C
D→C
D →E
C, E→ F
E→A
Complete the empty cells in the table.

Exercice 3
Let the relation R1(NumMatriculeOuvrier, NomOuvrier, NumRéparation, NumMachine, TempsPassé,
DateRéparation, NomMachine, NumAtelier, NomAtelier) be given with the following functional
dependencies:

NumMatriculeOuvrier → NomOuvrier
NumRéparation →Dateréparation
NumMatriculeOuvrier, NumRéparation → TempsPassé
NumRéparation →NumMachine
NumMachine→ NomMachine
NumMachine →NomAtelier
NumAtelier → NomAtelier
NumMachine →NumAtelier

1. Find the functional dependency graph.


2. Primary key of R1?
3. Define the equivalent schema in the 3rd normal form (3NF).
Exercice 4

We consider the set of the following functional dependencies:


e, f, g → t
a→v
a→b
b→c
b→w
c→d
c→z
d→c
d→u

1. Find the functional dependency graph.


2. Define the equivalent schema in the 3rd Normal Form (3NF), specifying the primary and foreign

You might also like