Department of Computer Science and Engineering (20Cs201) Database Management Systems Module Bank - 1
Department of Computer Science and Engineering (20Cs201) Database Management Systems Module Bank - 1
1
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
(20CS201) DATABASE MANAGEMENT SYSTEMS
MODULE BANK -1
d. We store each employee’s name, Aadhar number, contact, address, salary, sex,
and birthdate.
e. An employee is assigned to one department but may work on several projects,
which are not necessarily controlled by the same department.
f. We keep track of the number of hours per week that an employee works on
each project.
g. We also keep track of the direct supervisor of each employee.
h. We want to keep track of the dependents of each employee for insurance
purposes. We keep each dependent’s name, sex, birth date, and relationship
with the employee.
T1: Draw an ER diagram that captures this information.
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
3. “T-Series” has decided to store information about musicians who perform on its
albums (as well as other company data) in a database.
a. Each musician that records at T-Series has an Aadhar, a name, an address, and
a phone number.
b. Each instrument that is used in songs recorded at T-Series has a name (e.g.,
guitar, synthesizer, flute) and a musical key (e.g., C, B-flat, E-flat).
c. Each album that is recorded on the T-Series has a title, a copyright date, a
format (e.g., CD or MC), and an album identifier.
d. Each song recorded at T-Series has a title and an author.
e. Each musician may play several instruments and a given instrument may be
played by several musicians.
f. Each album has a number of songs on it, but no song may appear on more than
one album.
g. Each song is performed by one or more musicians, and a musician may
perform a number of songs.
h. Each album has exactly one musician who acts as its producer. A musician may
produce several albums, of course.
T1: Design a conceptual schema for T-Series and draw an ER diagram for your
schema. Be sure to indicate all key and cardinality constraints and any assumptions
that you make. Identify any constraints that you are unable to capture in the ER
diagram and briefly explain why you could not express them.
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
2
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
(20CS201) DATABASE MANAGEMENT SYSTEMS
MODULE BANK -1
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
4. DAG’s galleries are in New Delhi and Mumbai. They want to set up a database with
a schema that captures all the information that galleries need to maintain.
a. Galleries keep information about artists, their names (which are unique),
birthplaces, ages, and styles of art.
b. For each piece of artwork, the artist, the year it was made, its unique title, its
type of art (e.g., painting, lithograph, sculpture, photograph), and its price must
be stored.
c. Pieces of artwork are also classified into groups of various kinds, for example,
portraits, still lives, works by Picasso, or works of the 19th century.
d. A given piece may belong to more than one group.
e. Each group is identified by a name (like those above) that describes the group.
f. Finally, galleries keep information about customers. For each customer,
galleries keep their unique name, address, the total amount of dollars they have
spent in the gallery (very important!), and the artists and groups of art that each
customer tends to like.
T1: Draw the ER diagram for the database.
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
5. IndiGo decided to maintain a database for their airlines. For this work, your team is
selected from Vignan Computer Sciences Department. Your first task is to organize
the information about all the airplanes that are stationed and maintained at the airport.
The relevant information is as follows:
a. Every airplane has a registration number, and each airplane is of a specific
model.
b. The airport accommodates a number of airplane models, and each model is
identified by a model number (e.g., DC-10) and has a capacity and a weight.
c. A number of technicians work at the airport. You need to store the name,
EMPID, address, phone number, and salary of each technician.
d. Each technician is an expert on one or more plane model(s), and his or her
expertise may overlap with that of other technicians. This information about
technicians must also be recorded.
3
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
(20CS201) DATABASE MANAGEMENT SYSTEMS
MODULE BANK -1
e. Traffic controllers must have an annual medical examination. For each traffic
controller, you must store the date of the most recent exam.
f. All airport employees (including technicians) belong to a union. You must
store the union membership number of each employee.
g. The airport has a number of tests that are used periodically to ensure that
airplanes are still airworthy. Each test has a Federal Aviation Administration
(FAA) test number, a name, and a maximum possible score.
T1: Draw an ER diagram for the airport database. Be sure to indicate the various
attributes of each entity and relationship set; also specify the key and participation
constraints for each relationship set.
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
4
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
(20CS201) DATABASE MANAGEMENT SYSTEMS
MODULE BANK -1
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
7. Consider a MOVIE database in which data is recorded about the Telugu movie
industry. The data requirements are summarized as follows:
a. Each movie is identified by title and year of release. Each movie has a length
of minutes.
b. Each has a production company, and each is classified under one or more
genres (such as horror, action, drama, and so forth). Each movie has one or
more directors, and one or more actors appear in it. Each movie also has a plot
outline. Finally, each movie has zero or more quotable quotes, each of which
is spoken by a particular actor appearing in the movie.
c. Actors are identified by name and date of birth and appear in one or more
movies. Each actor has a role in the movie.
d. Directors are also identified by name and date of birth and direct one or more
movies. It is possible for a director to act in a movie (including one that he or
she may also direct).
e. Production companies are identified by name, and each has an address. A
production company produces one or more movies.
T1: Design an entity–relationship diagram for the movie database and enter the
design using a data modeling tool such as ERwin or Rational Rose.
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
8. Consider the IKEA database in which employees take orders for parts from customers.
The data requirements are summarized as follows:
a. The IKEA company has employees, each identified by a unique employee
number, first and last name, and Zip Code.
b. Each customer of the company is identified by a unique customer number, first
and last name, and Zip Code.
c. Each part sold by the company is identified by a unique part number, a part
name, price, and quantity in stock.
5
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
(20CS201) DATABASE MANAGEMENT SYSTEMS
MODULE BANK -1
d. Each order placed by a customer is taken by an employee and given a unique
order number.
e. Each order contains specified quantities of one or more parts. Each order has
a date of receipt as well as an expected ship date. The actual ship date is also
recorded.
T1: Design an entity–relationship diagram for the IKEA database and build the
design using a data modeling tool such as ERwin or Rational Rose.
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
9. Assume we have the following application that models soccer teams, the games they
play, and the players in each team. In the design, we want to capture the following:
a. We have a set of teams, each team has an ID (unique identifier), name, and to
which city this team belongs and stadium.
b. Each team has many players, and each player belongs to one team. Each player
has a number (unique identifier), name, DoB, start year, and jersey number.
c. Teams play matches, in each match there is a host team and a guest team. The
match takes place in the stadium of the host team.
d. For each match we need to keep track of the following:
i. The date on which the game is played.
ii. The result of the match
iii. The players participated in the match. For each player, how many goals
he scored, whether he took the yellow card or the red card.
iv. During the match, one player may substitute another player. We want
to capture this substitution and the time at which it took place.
e. Each match has exactly three referees. For each referee, we have an ID (unique
identifier), name, DoB, and years of experience. One referee is the main
referee and the other two are assistant referees.
T1: Design an ER diagram to capture the above requirements. State any
assumptions you have that affect your design (use the back of the page if needed).
Make sure cardinalities and primary keys are clear.)
T2: Map the above ER – diagram into Relational Model and construct the database
using MYSQL.
T3: Presentation using PPT (with voice-over) on how a given scenario is converted
into ER-Diagram and then to the relational model.
T5: Performing basic querying using DML commands on the constructed database.
6
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
(20CS201) DATABASE MANAGEMENT SYSTEMS
MODULE BANK -1
Course Instructor
Pushya Chaparala