Assignment 2 (Database Systems)
Assignment 2 (Database Systems)
1. Identify all the entities in the system. An entity should appear only once in a particular diagram.
Create rectangles for all entities and name them properly.
2. Identify relationships between entities. Connect them using a line and add a diamond in the middle
describing the relationship.
3. Add attributes for entities. Give meaningful attribute names so they can be understood easily.
1. Provide a precise and appropriate name for each entity, attribute, and relationship in the diagram.
Terms that are simple and familiar always beats vague, technical-sounding words. In naming
entities, remember to use singular nouns. However, adjectives may be used to distinguish entities
belonging to the same class (part-time employee and full-time employee, for example). Meanwhile
attribute names must be meaningful, unique, system-independent, and easily understandable.
2. Remove vague, redundant or unnecessary relationships between entities.
3. Never connect a relationship to another relationship.
Question.1: Draw Entity Relationship Diagram for the given case studies: consider following points to
prepare your ERDs:
• Show Entities
• Show Relationships
• Show Multiplicities and Cardinalities
• If there is any multivalued attribute. Apply 1NF form and show sample table. You can
assume occurrences of records.
Case Study 1:
Draw Entity Relationship Diagram for the following case studies: Case Study 1: Organization made up of
various departments, each having a name, identifying no., and an employee who is the manager. A
department may be located in different places. Information about employee includes name, identification
number, birth date, address, sex, and salary. Each employee is assigned to one department. The date the
manager is appointed to a department is also tracked. Employees may be directly supervised by another
employee. Each project within the organization is controlled by a department. Employees (not necessarily
from the controlling dept.) are assigned to projects. Information about projects includes project name, no.,
and location. Hours spent by employees on each project are also kept.
Case Study 2:
Case Study 3:
An organization makes many models of cars, where a model is characterized by a name and a suffix (such
as GL or XL which indicates the degree of luxury) and an engine size. Each model is made up from many
parts and each part may be used in the manufacture of more than one model. Each part has a description
and an id code. Each model of car is produced at just one of the firm's factories, which are produced at just
one of the firm's factories, which are located in London, Birmingham, Bristol, Wolverhampton and
Manchester -one in each city. A factory produces many models of car and many types of part although each
type of part is produced at one factory only.
ABC Ltd plans to computerize its sales ordering and stock control system. A feasibility study has strongly
suggested that a relational database system be installed. The details of ABC's sales and stock control are as
follows:
•Customers send in orders for goods. Each order may contain requests for variable quantities of one or more
products from ABC's range. ABC keeps a stock file showing for each product the product details and the
preferred supplier, the quantity in stock, the reorder level and other details.
•ABC delivers those goods that it has in stock in response to the customer order and an invoice is produced
for the dispatched items. Any items that were not in stock are placed on a back-order list and these items
are usually re-ordered from the preferred supplier. Occasionally items are ordered from alternative sources.
from alternative sources.
•In response to the invoices that are sent out to ABC's customers, the customers send in payments.
Sometimes a payment will be for one invoice, sometimes for part of an invoice and sometimes for several
invoices and part-invoices.
Case Study 5:
A Bus Company owns a number of busses. Each bus is allocated to a particular route, although some routes
may have several busses. Each route passes through a number of towns. One or more drivers are allocated
to each stage of a route, which corresponds to a journey through some or all of the towns on a route. Some
of the towns have a garage where busses are kept and each of the busses are identified by the registration
number and can carry different numbers of passengers, since the vehicles vary in size and can be single or
double-decked. Each route is identified by a route number and information is available on the average
number of passengers carried per day for each route. Drivers have an employee number, name, address,
and sometimes a telephone number.
Entities are:
Bus - Company owns busses and will hold information about them.
Route - Buses travel on routes and will need described.
Town - Buses pass through towns and need to know about them
Driver - Company employs drivers, personnel will hold their data.
Stage - Routes are made up of stages
Garage - Garage houses buses, and need to know where they are.
Attributes:
Bus (reg-no, make, size, deck, no-pass)
Route (route-no, avg-pass)
Driver (emp-no, name, address, tel-no)
Town (town-no, name)
Stage (stage-no)
Azeema Yaseen Lecturer
Garage (name, address)
Note: You’ll get marks on the base of your assignment presentation too.
GOOD LUCK 😊