Er+Mapping+ Normalization: Group - 6
Er+Mapping+ Normalization: Group - 6
NORMALIZATION
For
Page no. 1
TABLE OF CONTENTS
INTRODUCTION ................................................................................................................................ 03
ER DIAGRAM ..................................................................................................................................... 06
NORMALIZATION .............................................................................................................................. 07
Page no. 2
INTRODUCTION:
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.
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:
Normalizatio
n:
First normal form:
Allows:
Only single atomic values
Disallows:
Multivalued attributes
Nested relations
Bcnf:
F={X->y}where
x=key
Y=non-prime /prime
Page no. 8
Page no. 9