0% found this document useful (0 votes)
242 views

Er+Mapping+ Normalization: Group - 6

The document describes the design of a database for a railway reservation system, including entity relationship modeling, relational mapping, and normalization. It outlines the key entities like users, passengers, trains, stations, and tickets. It also provides an introduction to the reservation system functionality and the advantages of maintaining the database. Finally, it discusses transforming the ER diagram into relational tables and normalizing the tables to eliminate anomalies.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
242 views

Er+Mapping+ Normalization: Group - 6

The document describes the design of a database for a railway reservation system, including entity relationship modeling, relational mapping, and normalization. It outlines the key entities like users, passengers, trains, stations, and tickets. It also provides an introduction to the reservation system functionality and the advantages of maintaining the database. Finally, it discusses transforming the ER diagram into relational tables and normalizing the tables to eliminate anomalies.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

ER+MAPPING+

NORMALIZATION
For

RAILWAY MANAGEMENT SYSTEM


GROUP - 6
PREPARED BY
Bhoovika(19Z310)
Gokul(19Z314)
Niranjan(19Z335)
Pavithra Yazhini(19Z337)
Venkat ram(19Z340)
Swaminathan(19Z57)

Page no. 1
TABLE OF CONTENTS

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

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

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

NORMALIZATION .............................................................................................................................. 07

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.

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

Second normal form:


Page no. 7
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
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. 8
Page no. 9

You might also like