0% found this document useful (0 votes)
5 views11 pages

Dbms Mini

The document outlines a mini project on a Railway Management System developed by students at the National Institute of Technology, Arunachal Pradesh. It includes an introduction to the database system, an entity relationship diagram, relational mapping, and normalization processes. The project aims to facilitate train reservations, cancellations, and inquiries while maintaining a structured database for user and train information.

Uploaded by

romagupta0743
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views11 pages

Dbms Mini

The document outlines a mini project on a Railway Management System developed by students at the National Institute of Technology, Arunachal Pradesh. It includes an introduction to the database system, an entity relationship diagram, relational mapping, and normalization processes. The project aims to facilitate train reservations, cancellations, and inquiries while maintaining a structured database for user and train information.

Uploaded by

romagupta0743
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

NATIONAL INSTITUTE OF TECHNOLOGY, ARUNACHAL

PRADESH

Mini Project
Submitted By:
Name: Ipshita Karmakar (CS22B025), Anushka Gupta (CS22B034)
Department: Computer Science and Engineering
Course Name: Database Management System
Topic Name: Railway Management System

Page no. 1
TABLE OF CONTENTS

INTRODUCTION ................................................................................................................................ 03

ER DIAGRAM ..................................................................................................................................... 06

RELATIONAL MAPPING ..................................................................................................................... 07

RELATIONAL SCHEMA ----------------------------------------------------------------------------------------------------07

NORMALIZATION .............................................................................................................................. 08

Page no. 2
INTRODUCTION:

 Database is an organized collection of data.


 A DBMS makes it possible for end users to create, read, update and delete
data in a database.
 The DBMS is as an interface between the database and end users.
 The Railway Reservation System facilitates the passengers to enquire
about the trains available on the basis of source and destination, Booking
and Cancellation of tickets, enquire about the status of the booked ticket,
etc.
 Maintaining the database for records of different trains, train status, and
passengers.
 Our project contains entity relationship model diagram, relational
mapping and normalization based on railway reservation system.
 we design a database which includes customer details, availability of seats
in trains, no of trains and their details.
 The record of train includes its number, name, source, destination, and
days on which it is available.
 The record of train status includes dates for which tickets can be booked,
total number of seats available, and number of seats already booked.
 Passengers provide the desired train number and the date for which ticket
is to be booked and they book their tickets for the train in which seats are
available.
 Before booking a ticket for a passenger, the validity of train number and
booking date is checked.
 Once the train number and booking date are validated, it is checked
whether the seat is available. If yes, the ticket is booked with confirm
status and corresponding ticket ID is generated which is stored along with
other details of the passenger.
 The ticket once booked can be cancelled at any time. For this, the
passenger has to provide the ticket ID. The ticket ID is searched and the
corresponding record is deleted.
 Then, the first ticket with waiting status also gets confirmed.

Page no. 3
The working of the reservation system
1. The number of trains has been restricted to 5.
2. The booking is open only for 1 week from the current date.
3. Two categories of tickets can be booked, namely, AC and General.
4. The total number of tickets that can be booked in each category is 10.
5. The total number of tickets that can be given the status of waiting is 3.
6. The in‐ between stoppage stations and their bookings are not considered.

ADVANTAGES:
The main purpose of maintaining database for Railway Reservation System is to
reduce the manual errors involved in the booking and cancelling of tickets and
make it convenient for the customers and providers to maintain the data about
their customers and also about the seats available at them.

LIST OF ENTITIES AND ATTRIBUTES:

USER PASSENGER TRAIN STATION TICKET


User_id Passenger_id Train_no Name Id
Password Name Train_name No Train_no
First_name Gender Source Train_no Booked_user
Last_name Age Destination Arrival_time Status
Gender Pnr_no Arrival_time Hault No_of_passengers
Age Seat_no Departure_time
Email Booked_by Availability_of_seats
Aadar_no Reservation_status Train_no
Mobile_no A_seats1
City A_seats2
State A_seats3
Pincode B_seats1
Security_ques B_seats2
Security_ans B_seats3
W_seats1
W_seats2
W_seats3

Page no. 4
ENTITIES:
Specific object or things represented in database
Composite attribute:
Composed of several components
Simple attributes:
Single atomic values
Primary key:
key in a relational database that is unique for each record
Foreign key:
key used to link two tables together
Relational types:
Relationships of same type are grouped
Entities

USER
TICKET
PASSENGER
TRAIN
STATION
TRAIN_STATUS -WEAK

COMPOSITE
ATTRIBUTE

NAME
ADDRESS

PRIMARY KEY
USER_ID
ID
NUMBER
PASSENGER_ID
TRAIN_NO

FOREIGN KEY
TRAIN_NO IN
Page no. 5
TRAIN_ STATUS
ID IN TICKET

RELATIONAL TYPES

STOPS
TRAIN(N)- STATION (1)
REACHES
TRAIN(1)-STATION(N)
STARTS
TRAIN(1)-STATION(N)
SOURCE
TICKET(N)-STATION (1)
DESTINATION
TICKET(N)-STATION (1)
BOOKS
USER(1)-TICKET(N)
BOOKS
TRAIN_STATUS(N)-
PASSENGER(N)
CANCEL
USER(N) -TICKET (1)

ER Diagram:

Page no. 6
Relational Mapping:

Step 1: Mapping of Regular Entity Types


Step 2: Mapping of Weak Entity Types
Step 3: Mapping of Binary 1:1 Relation Types
Step 4: Mapping of Binary 1: N Relationship Types.
Step 5: Mapping of Binary M: N Relationship Types.
Step 6: Mapping of Multivalued attributes.
Step 7: Mapping of N-aryl Relationship Types.

Retational Schema
User(User_ID [PK], Password, First_Name, Last_Name, Gender, Age, Email, Aadhar_No,
Mobile_No, City, State, Pincode, Security_Ques, Security_Ans)
Passenger(Passenger_ID [PK], Name, Gender, Age, PNR_No, Seat_No, Booked_By [FK →
User.User_ID], Reservation_Status)
Train(Train_No [PK], Train_Name, Source, Destination, Arrival_Time, Departure_Time,
Availability_Of_Seats)
Station(Station_No [PK], Name, Train_No [FK → Train.Train_No], Arrival_Time, Halt)

Page no. 7
Ticket(Ticket_ID [PK], Train_No [FK → Train.Train_No], Booked_User [FK → User.User_ID],
Status, No_Of_Passengers)
Train_Status(Status_ID [PK], Train_No [FK → Train.Train_No], A_Seats1, A_Seats2,
A_Seats3, B_Seats1, B_Seats2, B_Seats3, W_Seats1, W_Seats2, W_Seats3)

Normalization:
First normal form:
Allows:
 Only single atomic values
Disallows:
 Multivalued attributes
 Nested relations

Second normal form:


Disallows:
 F={x->y} where
x=subset of any key
Y=non-prime attributes

Third normal form:


Disallows:
 X->y and y->z then x->z (transitive dependency)
Allows:
 F={X->y}where
x= key
Y=non prime

Bcnf:
 F={X->y}where
x=key
Page no. 8
Y=non-prime /prime

Fourth normal form:


Disallows:
 Non trial multivalued dependency
 X->>y in f+, where
x =super key

Fifth normal form:


 Cannot decompose the relation further into a lossless decomposition

Page no. 9
Page no. 10
Canonical Covers:

Passenger_id → Name, Address, Age, Gender, Phone


Ticket_no → Booking_date, Price, Passenger_id, Train_no, Source_id, Destination_id
Train_no → Train_name, Route_no, Booked_seat, Available_seat
Station_id → Station_name
Schedule_id → Departure_time, Arrival_time, Train_no
(Train_no, Class_type) → Fare

Page no. 11

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy