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

tutorial on hashing

Uploaded by

hamodhh313
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)
1 views2 pages

tutorial on hashing

Uploaded by

hamodhh313
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
You are on page 1/ 2

THE NATIONAL HIGHER SCHOOL OF ARTIFICIAL INTELLIGENCE

INTELLIGENT SYSTEMS ENGINEERING DEPARTMENT


SEMESTER 1 –2024/2025

DataBases
TUTORIAL 5 : Entity/Relationship model (E/R)
Exercise 1
We are interested in a database managing information on external consultations of doctors in a hospital.
Each doctor has a unique number, an address, as well as a set of specialties. A doctor performs consultations on
patients. A specialty has a unique code and a description.
For each patient in the hospital, we must memorize his social security number, name, address, date of birth and
gender. A consultation is characterized by a unique code, a date and concerns a doctor and a specialty.
During a consultation, a set of pathologies is diagnosed for each patient. A pathology is characterized by a code
which is unique and a name. A pathology is diagnosed by a single doctor during a consultation. It is necessary to
record the pathologies of a patient, i.e. to keep all the pathologies having affected a patient over time (on given
dates).
During a consultation, a patient is prescribed a set of medications. Each medicine has a unique reference, a type
(pill, ointment, syrup etc.) and a quantity of packaging. Each patient may be given several drugs. It is important
to keep, for each drug and for a consultation, the dosage (i.e. the quantity per day) prescribed for each patient.
Questions:
1. Develop the Entity/Relationship (E/R) model related to this case study.
2. Give the corresponding logical model by applying the rules for moving towards the Relational Schema.

Exercise 2:
The faculty of electronics and computer science wishes to carry out the pedagogical and financial follow-
up of the research. To this end, it wishes to develop a database of research and post-graduation:
The faculty is structured into research laboratories. A laboratory is characterized by its code, its wording, its
manager and the budget allocated to it. Each laboratory manages teacher-researchers, post-graduate students and
research projects. The head of the laboratory is a teacher-researcher of the laboratory. A teacher-researcher or a
post-graduate is characterized by his registration number, surname, first name and date of birth. In addition, a
teacher-researcher has a research bonus, a diploma and a grade, while a post-graduate has a scheduled defense
date and a research director (promoter) who is a teacher-researcher from the same laboratory.
Each research project is characterized by its number, its title, its start and expected end dates, the teacher-
researchers and post-graduate students assigned to it, the area of research and the allocated budget. Each
laboratory manages projects concerning a set of research domains, characterized by a number and a label.
In each project, teacher-researchers and post-graduates work to produce national and international publications.
Any publication is characterized by its number, its title, its date of publication, the authors and the name of the
journal where it appeared. We also have additional constraints:
● A teacher-researcher or a post-graduate can only belong to one research laboratory,
● A post-graduate can only have one research director,
● A project concerns only one a single domain and belongs to a single laboratory,
● A publication concerns a single project and may have several authors.
● A research domain belongs to only one research laboratory.

Questions
1. Develop the Entity/Relationship (E/R) model related to this case study.
1
THE NATIONAL HIGHER SCHOOL OF ARTIFICIAL INTELLIGENCE
INTELLIGENT SYSTEMS ENGINEERING DEPARTMENT
SEMESTER 1 –2024/2025

2. Give the corresponding logical model by applying the rules for moving towards the Relational Schema.

Exercise 03

The objective of this statement is to design an archaeological database. Items found at dig sites are listed.
We want to know which archaeological diggers are digging and on which sites.
An excavation team is made up of researchers. Each researcher is characterized by a number which is unique, a
surname and first name, rank (research associate, research manager, researcher, research director). Each
researcher belongs to a team. The team is led by one of its members. A team must have a manager. The teams
work on plots that belong to excavation sites. The excavation site is a geographical space bearing the name of the
nearest town. An excavation site is divided into separate plots. A plot is characterized by a number, a length (in
meters) and a width (in meters). Several teams can simultaneously excavate the same dig site, but not the same
plot. A team can search several plots on the same day. A plot can be excavated by different teams but on different
dates.
An object is found by a given team, on a given plot. The object is identified by a number, a designation (e.g.
plate), a category (e.g. kitchen accessory), a state of completeness (e.g. fragment) and by a state of conservation
(e.g. to be restored) .
Questions:
1. Develop the Entity/Relationship (E/R) model related to this case study.
2. Give the corresponding logical model by applying the rules for moving towards the Relational Schema.

Exercise 04
The city of Algiers wishes to computerize the management of locations as well as the cleaning of markets
(fruit-vegetables, clothing, etc.).
A market is described by a single name and address and has many locations. A merchant rents a location year-
round to sell his products. The system should keep track of location rentals. For each merchant the system must
memorize his number, his name, as well as the type of product sold. For each market, the numbering of pitches
starts at 1. The annual rental price and the surface area of each pitch must be memorized by the system. It is also
necessary to know if the location has running water and/or electricity.
On the other hand, the system must be able to report on the teams carrying out market cleaning. A team is has an
address, it is also necessary to memorize its telephone number. The teams are very mobile, they can work on
different markets, none is assigned to a particular market. A team is made up of several workers and can have
different vehicles. For each worker, the system must memorize his social security number, surname, first name
and address. One of the workers is appointed as a team leader. A vehicle is identified by its registration number,
it is of a certain type. For each vehicle, a worker is designated as responsible, he is responsible for checking the
maintenance of the machine.
Questions:
1. Develop the Entity/Relationship (E/R) model related to this case study.
2. Give the corresponding logical model by applying the rules of transition to the Relational Schema.

You might also like