Database Management Systems - Tutorial 01
Database Management Systems - Tutorial 01
BachelorofofScience (Hons)Technology
Information in Computer(BIT)
Science | Software Engineering
Programme
& Information Technology
Fundamentals of Database Management
CS/ SE/ IT 1105
Database
JanuaryManagement
2022 Systems
Tutorial 01
2. Explain the advantages of using a database approach in comparison to the file- processing
system?
3. Consider the following requirements for a university database:
• A Person has a NIC (unique), age and a name.
• Professor is a Person with the following attributes: rank and research specialty.
• Projects have a project number (unique), a sponsor (e.g. NSF), a starting date, ending
date
• and a budget.
• Graduate students are also persons. Graduate students need to store information about
the
• degree program (e.g. M.S. or Ph.D.) that they are enrolled.
• Each project is managed by one professor (known as the project’s principal
investigator).
• A project must have a principal investigator.
• Each project is worked on by one or more professors (known as co-investigators).
• Professors can manage and/or work on multiple projects.
• Each project is worked on by one or more graduate students (known as project’s
research
• assistants).
• Graduate students can work on multiple projects.
1
Chathurangi D. Weerasinghe MSc (UCSC-Col), BSc (Ruh)
Bachelor of Science (Hons) in Computer Science | Software Engineering
Bachelor of&Information
Information Technology
Technology (BIT) Programme
CS/ SE/
Fundamentals IT 1105 Management
of Database
Database Management Systems
January 2022
2
Chathurangi D. Weerasinghe MSc (UCSC-Col), BSc (Ruh)
Bachelor of Scienceof(Hons)
Bachelor in Computer
Information Science(BIT)
Technology | Software Engineering
Programme
& Information Technology
Fundamentals of Database Management
CS/ SE/ IT 1105
Database Management
January 2022Systems
3
Chathurangi D. Weerasinghe MSc (UCSC-Col), BSc (Ruh)
Bachelor of Science (Hons) in Computer Science | Software Engineering
Bachelor of Information
& InformationTechnology
Technology(BIT) Programme
CS/ of
Fundamentals SE/Database
IT 1105 Management
Database Management Systems
January 2022
6. A university registrar’s office maintains data about the following entities: (a) courses,
including number, title, credits, syllabus, and prerequisites; (b) course offerings, including
course number, year, semester, section number, instructor(s), timings, and classroom; (c)
students, including student-id, name, and program; and (d) instructors, including identification
number, name, department, and title. Further, the enrollment of students in courses and grades
awarded to students in each course they are enrolled for must be appropriately modeled.
Construct an E-R diagram for the registrar’s office. Mention all assumptions that you make
about the conceptual modeling.
7. Read the given scenario below and draw an EER Diagram to represent following
requirements.
The members of an online auctioning site are identified by a unique member id and their names,
email addresses, phone numbers and postal addresses should be maintained. A member may
be a buyer or a seller. A buyer has a shipping address and a seller has a bank account number
and routing number. Items are posted by a seller. When the seller posts the item a bid may be
placed by buyers. A bidding price and the time of bid placement is recorded. The person with
the highest bid price is declared as the winner and the buyer can then buy the item. Items are
identified by a unique item number assigned by the system. Items are also described by an item
title, an item description, a starting bid price and bidding increment. Item has a category with
a category number. A category is identified by the category number and the item number
together.
4
Chathurangi D. Weerasinghe MSc (UCSC-Col), BSc (Ruh)
Bachelor of Science (Hons) in Computer Science | Software Engineering
Bachelor of Information Technology (BIT) Programme
& Information Technology
FundamentalsCS/of Database
SE/ IT 1105 Management
Database Management Systems
January 2022
8. 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:
• We have a set of teams, each team has an ID (unique identifier), name, main stadium,
and to which city this team belongs.
• Each team has many players, and each player belongs to one team. Each player has a
number (unique identifier), name, DoB, start year, and shirt number that he uses.
• 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.
• For each match we need to keep track of the following:
✓ The date on which the game is played
✓ The final result of the match
✓ The players participated in the match. For each player, how many goals he
scored, whether or not he took yellow card, and whether or not he took red card.
✓ During the match, one player may substitute another player. We want to capture
this substitution and the time at which it took place.
• Each match has exactly three referees. For each referee we have an ID (unique
identifier), name, DoB, years of experience. One referee is the main referee and the
other two are assistant referee.
5
Chathurangi D. Weerasinghe MSc (UCSC-Col), BSc (Ruh)
Bachelor Bachelor
of Scienceof(Hons) in Computer
Information Science(BIT)
Technology | Software Engineering
Programme
& Information Technology
Fundamentals CS/ of
SE/Database
IT 1105 Management
Database Management Systems
January 2022
6
Chathurangi D. Weerasinghe MSc (UCSC-Col), BSc (Ruh)
Bachelor of Science (Hons) in Computer Science | Software Engineering
Bachelor of Information Technology (BIT) Programme
& Information Technology
FundamentalsCS/of Database
SE/ IT 1105 Management
Database Management Systems
January 2022
A company has several departments. A department has a department code, a department name
and an address. Department code is unique for each department. Each department has a
supervisor and at least one employee. A supervisor supervises only one department. Employee
details such as employee number, employee name, age and position should manage and each
employee can be identified from employee number. Employees must be assigned to at least
one, but possibly more departments. The company has several projects. Each project has a
project code, start date, end date and a title. At least one employee is assigned to a project and
an employee might have to work in multiple projects upon the company’s request.
7
Chathurangi D. Weerasinghe MSc (UCSC-Col), BSc (Ruh)