← RGPV CS-502 DBMS May 2024 solved question paper
May 2024 — Q1(b)
Question (restated): Define an ER diagram and design one for a railway reservation system.
Answer
An ER diagram represents entities, attributes and relationships before implementation. In a railway system, Passenger(PassengerID, Name), Train(TrainID, Name), Journey(JourneyID, TrainID, TravelDate), Booking(PNR, PassengerID, JourneyID, Status) and Ticket(TicketID, PNR, SeatNo, Coach) are entities. A train operates many journeys; each journey belongs to one train. A passenger can make many bookings and each booking belongs to one passenger in this simplified design. A journey receives many bookings. A booking contains one or more tickets. A ticket belongs to exactly one booking. Primary keys identify records and foreign keys implement relationships. A unique constraint on journey, coach and seat for active allocations prevents double booking; implement this through a separate SeatAllocation relation or equivalent transactional constraint. The model assumes the booking passenger is the purchaser; additional travellers can be represented by a Traveller entity linked to Ticket. Cancellation changes booking status and releases the allocation atomically.

Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion