Manual - Lab 1 - Building A Conceptual Model - An ER Diagram
Manual - Lab 1 - Building A Conceptual Model - An ER Diagram
Figure 1
DBMS LAB - UE20CS301
Figure 2
Demo Problem:
● A salesperson may sell many vehicles, but each two-wheeler is sold by only one
salesperson. A salesperson details such as employee_id, f_name, l_name are
stored
● A customer may have his/her vehicle/s serviced or buy a vehicle/s. Customer
details such as f_name,l_name, customer_id, address, phone_number, mail_id are
collected
● A customer may buy many two wheelers, but each vehicle is bought by only one
customer.
● On successful selling, the salesperson generates an invoice to the customer for
each vehicle sold.
● Each invoice generated records customer id, vehicle id (VID), salesperson_id
apart from the invoice_no, amount and date
● A customer can seek service or repair for multiple vehicles. A service ticket is
generated for each vehicle.
DBMS LAB - UE20CS301
Tools used: Use any free online tools such as Lucid Chart / Smart Draw/ or any simple
drawing software
Solution:
List of entities with attributes:
ER Diagram:
DBMS LAB - UE20CS301
Assignment:
Railway Reservation System
Users check for availability of seats/Fare etc. in Trains and also books/cancels Train Tickets from
particular source stations to destination stations. An user may be an admin (reservations clerks)
or a passenger.
Every train has at least one compartment and at most 5 compartments. Each compartment is of
type I class/ II Class / III Class corresponding to the ticket class. Number of seats in each type of
compartment is fixed and is equal to 16 , 30, and 60 respectively.
Every train has associated route information that stores distance between each pair of stations
along the route
Tickets compute fare from a Fare table that stores fare per KM rate for a given type of train
(Superfast, Fast and Mail), for each class of ticket (I /II/ III Class)
Every ticket booked/canceled has associated payment information.
Identify entities and relationships, weak entities, Identifying relationships, total relationships,
cardinalities and restrictions of each relationship.
Deliverables
1.jpg - Screenshot of all strong entities and weak entities with proper notation
2.jpg - Screenshot of list of Relationships ( with cardinality, restrictions, weak relationships,
weak entities indicated with proper notation)
3.jpg - Final ER Diagram
Prerequisites:
1. Any online tool for drawing ER Diagram example: smartdraw, ERWin, LucidChart
TASK A: Identify all entities in the problem domain. Draw weak and strong entities with
proper notations. Show attributes for each entity and denote composite, multivalued and
derived attributes. Take a screenshot and name it 1.jpg
TASK B: Identify all relationships between the entities. Mark the cardinality ratios,
structural constraints, total participations, identifying relationships with proper notations.
Take a screenshot and name it 2.jpg
DBMS LAB - UE20CS301
TASK C: Draw the ER Diagrams connecting all entities and relationships. Take a screenshot
and name it 3. Jpg
Zip all three files and name the zip file as yourSRN_Lab1.zip and submit on EDMODO