You are on page 1of 6

1.- Classical music concerts.

We want to collect information in a database about the classical music concert program of the Teatre Principal of
Palma de Mallorca, according to the following considerations:

● An orchestra can perform several concerts. Only a single orchestra will perform in each concert.

● The orchestra conductor is a single person (there is only a main conductor for every orchestra), but
an orchestra could have several guest conductors, who could be invited in several orchestras. In the
same concert several compositions can be played. Moreover, a composition can be performed in
several concerts.

● In the same concert several soloists may participate.

● Each composition is written by a single composer. But we can have compositions without an
author...

● Obviously, the orchestra has musicians who are specialists only in a specific instrument. A
musician belongs only to an orchestra. Musicians were born in different countries.

● You must select the attributes that you consider appropriate.

DIRECTOR(NIF,Nam ORCHESTRA(director INSTRUMENT(Name


e,Tel_number) Name) )

MUSICIAN(NIF,Name COUNTRY(Name) COMPOSER(Name,


,Tel_number) birth_date)
CONCERT(Date)
COMPOSITION(Title)
IS_SOLOIST(NIF*)

2.- Crusades in the Middle Age.

A professor of medieval history wants a database. The specifications are:


● Knights: It is interesting to keep their name, their date of birth, and their father (according to the
social rules of their time, knights can only be children of another knight). It is also interesting to
know in what province they were born, in what province they governed and in what crusades they
participated under the king's orders. Finally, we want to keep —if any— a quote claimed by the
knight in combat (e.g. “For God’s glory!”).

● Provinces: It is interesting to know their name. In addition, we want to know the knights who have
governed them and those who were born there. A province can be governed by several knights on
different dates and a knight can govern in several provinces (on different dates). It is interesting to
know the date of beginning and end of the government of each knight in the province. Provinces
are part of a kingdom.

● Crusades: It is interesting to know its name, start date, end date, against whom was the crusade (a
kingdom) and its result, as well as the kings and knights participating in it. Keep in mind that more
than one king can participate in each crusade.

● Kings: You want to store data corresponding to their names, their date of birth, start and end dates
of their reign and the kingdoms over which they reigned. Finally, we want to know the main color
of their dynasty.

PERSON(Name,ID,Date_birth)

KING(ID)

CRUSADE(Name,result,quote,date)

KNIGHT(ID,Place_birth)

GOVERNS(Knight_ID*,King_ID*)

PARTICIPATE(Knight_ID*)

IS_FATHER(Name,ID*)

ENEMY(Name)

KINGDOM(Name)

DATE(date)

COUNTRY(Name)

3.- Booking a hotel.

The aim is to design a database in the E -R model for a hotel company:

● Each hotel (you want to keep: name, address, telephone number, year of construction, etc.) is
necessarily classified in one category (for example, three stars) and can be downgraded or
upgraded in a concrete date.

● Each category has various information associated with it, such as, for example, the type of VAT
that corresponds to it and the description.

● Hotels have different kinds of rooms (suites, doubles, singles, etc.), they define the number of
hosts in the room (you also want to keep a code, a name, and a description). The rooms are
numbered and you want to know the floor where the rooms are located. For each room you want to
save their code and the type of room. Every room has a price.

● Customers can book hotel rooms. The id_card (passport or country id card), name, address,
birthday date and telephone number will appear in their private booking information. Obviously, a
booking has a check-in date and a check-out date.

● Travel agencies can also book rooms. In case a booking is made by a travel agency, the same data
as for private customers will be needed, in addition to the name of the person of the travel agency
who is making the reservation.

GENERAL_COSTUMER(ID,Tel_Number,Birth_date,Name,Address)

BOOK(ID_Agencies*,ID_Costumer)

HOTEL(Name,Address,tel_number,year_construction)

DATE(date)

ROOMS(NºRoom,Floor,Code,Type,Price)

CATEGORY(description,VAT,hotel_stars)
1.- Classical music concerts.
2.- Crusades in the Middle Age.
3.- Booking a hotel.

You might also like