SlideShare a Scribd company logo






ABC is an online bus booking system. There are 3
important entities(1) Bus
(2) Passenger
(3) Route
Any user can login and check for schedule of buses
using a username and e-mail address.
The route table has the details of schedule of every bus.
It has the attributes like departure date,departure
time,bus number,capacity, seat number,status,fare,route
name,source,destination and distance.






The status attribute checks whether any seat is
available or not.
Once,an available seat is viewed by the user,he goes
ahead for booking.
A user can book tickets for many passengers.
Booking will generate a ticket which has attributes like
ticket number and mode of payment.
The mode of payment can be either by cash or by credit
card.


Normalization is a process in which a given set of
relations is replaced by successive collections of
relations that have a simpler and more regular
structure.



It transforms data from a problem into relations while
ensuring data integrity and eliminating data redundancy.



4 most commonly used normal forms are first (1NF),
second (2NF), third (3NF) and Boyce-Codd (BCNF)
normal forms.


To make it feasible to represent any
relation in the database.



To free relations from undesirable
insertion,
update, and deletion anomalies.


Full Dependency:In a relation, the attribute(s) B is fully
functional dependent on A if B is functionally dependent
on A,but not on any proper subset of A.



Partial Dependency:If there is some attribute that can be removed
from A and the dependency still holds.
Eg. Pid,Pname->userid


Transitive Dependency
In a relation, if attribute(s) A->B and B->C,
then C is transitively dependent on A via B (provided
that A is not functionally dependent on B or C)
Eg. Bus_no->Route_No and Route_No->Route_name
– A table that contains one or more
repeating groups.
– To create an unnormalized table
 Transform the data from the information
source
 (e.g. form) into table format with columns
and rows.
ONLINE BUS BOOKING SYSTEMABC travels
Booking_date:
Username:

userid:
email:

Ticket No:
Departuredate:

Seatno:
Departuretime:

PassengerId:
PassengerAddress:
GENDER:

PassengerName:
DOB:
Phoneno:

Busno:
Capacity:
Routeno:
Source:
Distance:
Modeof payment:

Busname:
type:
Route-name:
Destination:
Fare:
• The table cells must be of single value.
• Eliminate repeating groups in individual
tables.
• Create a separate table for each set of related
data.
• Identify each set of related data with a
primary key.
The new tables are as follows:
1)USER
(userid,username,u_email)
2)PASSENGER
(Pid,phno,pname,paddress, DOB ,gender)
3)BUS_ROUTE
(routeno,busno,routename,source,destination,distance,
fare,dept_time,bname,capacity,type,
dept_date)
3)RESERVATION
(seatno,busno, status,bookingdate,
ticketno, mode_of_payment)
PASSENGER TABLE-(Pid,Phno->pname,paddress,Dob,gender)
Pid

phno

pname

paddress

DOB

gender

1

9676725456

Ram Sharma

Pune

6/1/1990

Male

2

9878767878

Siya Varma

sikar

3/5/1997

female

3

98786735

Siya Varma

sikar

3/5/1997

female

USER TABLE-(userid->username,u_email)

Userid

Username

U_email

111

Savita Marwal

savi@gmail.com

222

Himanish Mansinghani

himanish@yahoo.com
BUS_ROUTE(Busno,routeno-> bname,capacity,type,routename,source,
destination,distance,fare,dept_time, dept_date)
route Bus
no
no

route sourc
name e

desti
natio
n

dista
nce

2000

10

Delhi- delhi
Jaipur

Jaipur 2000k 2000
m

11:00
am

3/4/2
012

AA

20

a/c

2001

11

Pune- pune
mum
bai

mum
bai

12:p
m

4/4/2
012

BB

25

Non
a/c

200k
n

fare

500

Dept Dept Bus
capac type
_time _date name ity

RESERVATION TABLE-(seatno,busno->status,bookingdate,ticketno,mode_of_payment)
seatno

busno

status

bdate

ticketno

modeofpay
ment

1110

10

booked

1/4/2012

1122

Cash

1111

11

Booked

2/4/2012

1121

credit


A table is in 2NF if it is in 1NF and if all nonkey attributes are dependent on all of the
key.
1)USER
(userid->username,u_email)
2)PASSENGER
(pid-> pname,paddress, DOB, gender,userid)

3) CONTACTS
(pid,phid->phno)
4)BUS_ROUTE
(routeno,busno->bname,capacity,type,
source,destination,distance,fare,Dept_time,dept_date)
5)RESERVATION
(seatno,busno->status,
bookingdate,ticketno, mode_of_payment)
PASSENGER TABLE- (Pid(pk)->pname,paddress,Dob,gender,userid)
Pid

pname

101

DOB

gender

userid

Ram Sharma Pune

6/1/1990

Male

111

102

Siya Varma

sikar

3/5/1997

female

112

102

Siya Varma

sikar

3/5/1997

female

112

CONTACTS TABLE -

paddress

(phid(pk)->phno)

Phid

pid

phno

1

101

9887656789

2

102

9878789098

3

202

9767352453


A table is in 3NF if it is in 2NF and if it has
no transitive dependencies.
1)USER
(userid->username,u_email)
2)PASSENGER
(pid->pname,paddress,DOB, gender,userid)
3)CONTACTS
(pid,phno->phno)
(As, busno->routeno and routeno->distance)
Break BUS_ROUTE relation into 2 tablesa)BUS
(busno->bname,capacity,type,routeno)
b)ROUTE
(routeno->routename,source,destination,
dept_date,dept_time,distance,fare)
a)BUS (busno->bname,capacity,type,routeno)
busno

bname

capacity

type

routeno

10

AA

20

A/C

2000

11

BB

25

NON A/C

2001

b)ROUTE (routeno->routename,source,destination,
dept_date,dept_time,distance,fare)
routeno

routena
me

source

destinati
on

Dept_dat Dept_ti
e
me

distance

fare

2000

DelhiJaipur

Delhi

Jaipur

3/4/2012

11:00a.m

2000

2000

2001

PuneMumbai

Pune

Mumbai

4/4/2012

12:00p.m

200

500
FROM RESERVATION-{seatno->ticketno and
ticketno->modeof payment}

A)BOOKING
(seatno->pid,busno,status,ticketno)
B) TICKET
(ticketno->bookingdate,mode_of_payment)


A table is in BCNF if it is in 3NF and if every
determinant is a candidate key.



BCNF is a stronger form of 3NF
BCNF => 3NF
3NF ≠> BCNF



1)BOOKING
(seatno-> pid,busno,status)
seatno

pid

busno

status

1001

101

10

booked

1008

102

11

booked

Here,all the attributes other than seatno acts as a candidate key.
Eg,pid can act as a primary key alone.
Busno can also act as a primary key.
Status is not unique(i.e.either booked or available),so we
use(seatno and status) as candidate key.


A table is in 4NF if it is in BCNF and if it has
no multi-valued dependencies.


A table is in 5NF, also called "ProjectionJoin Normal Form" (PJNF), if it is in 4NF and
if every join dependency in the table is a
consequence of the candidate keys of the
table.
Online bus booking system-A Case study on Normalisation

More Related Content

What's hot

SRS for Railways Reservation System
SRS for Railways Reservation System SRS for Railways Reservation System
SRS for Railways Reservation System
Vignesh Arun
 
Documentation of railway reservation system
Documentation of railway reservation systemDocumentation of railway reservation system
Documentation of railway reservation system
Sandip Murari
 
Online bus ticket booking
Online bus ticket bookingOnline bus ticket booking
Online bus ticket booking
Gaurav kumar rai - student
 
Online Bus Reservatiom System
Online Bus Reservatiom SystemOnline Bus Reservatiom System
Online Bus Reservatiom System
Nikhil Vyas
 
Online reservation of bus
Online reservation of busOnline reservation of bus
Online reservation of bus
Saifullah Malik
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation system
Abhishek Yadav
 
Railway Reservation Documentation
Railway Reservation DocumentationRailway Reservation Documentation
Railway Reservation Documentation
Kunwar Singh
 
Airline reservation system documentation
Airline reservation system documentationAirline reservation system documentation
Airline reservation system documentation
Surya Indira
 
Bus management system
Bus management systemBus management system
Bus management system
Shamim Ahmed
 
Online Bus Reservation System
Online Bus Reservation SystemOnline Bus Reservation System
Online Bus Reservation System
A-Tech and Software Development
 
Airline reservation system
Airline reservation system Airline reservation system
Airline reservation system
krishnayadav962132
 
Bus Ticket Management System Documentation
Bus Ticket Management System DocumentationBus Ticket Management System Documentation
Bus Ticket Management System Documentation
muzammil siddiq
 
SRS on airline reservation system
SRS on airline reservation system SRS on airline reservation system
SRS on airline reservation system
VikasSingh958
 
Srs on-railway-reservation-system
Srs on-railway-reservation-systemSrs on-railway-reservation-system
Srs on-railway-reservation-system
Rajesh Salla
 
Railways reservation system using socket programming
Railways reservation system using socket programmingRailways reservation system using socket programming
Railways reservation system using socket programming
Utkarsh Sharma
 
Airline Database Design
Airline Database DesignAirline Database Design
Airline Database Design
Abhishek Jaisingh
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation system
KOYELMAJUMDAR1
 
Process control system of bus ticket booking (closed loop)
Process control system of bus ticket booking (closed loop)Process control system of bus ticket booking (closed loop)
Process control system of bus ticket booking (closed loop)
Jigar Nayak
 
vehicle management system project report
vehicle management system project reportvehicle management system project report
vehicle management system project report
Ashik Khan
 
Presentation on Railway Reservation System
Presentation on Railway Reservation SystemPresentation on Railway Reservation System
Presentation on Railway Reservation System
Priyanka Sharma
 

What's hot (20)

SRS for Railways Reservation System
SRS for Railways Reservation System SRS for Railways Reservation System
SRS for Railways Reservation System
 
Documentation of railway reservation system
Documentation of railway reservation systemDocumentation of railway reservation system
Documentation of railway reservation system
 
Online bus ticket booking
Online bus ticket bookingOnline bus ticket booking
Online bus ticket booking
 
Online Bus Reservatiom System
Online Bus Reservatiom SystemOnline Bus Reservatiom System
Online Bus Reservatiom System
 
Online reservation of bus
Online reservation of busOnline reservation of bus
Online reservation of bus
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation system
 
Railway Reservation Documentation
Railway Reservation DocumentationRailway Reservation Documentation
Railway Reservation Documentation
 
Airline reservation system documentation
Airline reservation system documentationAirline reservation system documentation
Airline reservation system documentation
 
Bus management system
Bus management systemBus management system
Bus management system
 
Online Bus Reservation System
Online Bus Reservation SystemOnline Bus Reservation System
Online Bus Reservation System
 
Airline reservation system
Airline reservation system Airline reservation system
Airline reservation system
 
Bus Ticket Management System Documentation
Bus Ticket Management System DocumentationBus Ticket Management System Documentation
Bus Ticket Management System Documentation
 
SRS on airline reservation system
SRS on airline reservation system SRS on airline reservation system
SRS on airline reservation system
 
Srs on-railway-reservation-system
Srs on-railway-reservation-systemSrs on-railway-reservation-system
Srs on-railway-reservation-system
 
Railways reservation system using socket programming
Railways reservation system using socket programmingRailways reservation system using socket programming
Railways reservation system using socket programming
 
Airline Database Design
Airline Database DesignAirline Database Design
Airline Database Design
 
Railway reservation system
Railway reservation systemRailway reservation system
Railway reservation system
 
Process control system of bus ticket booking (closed loop)
Process control system of bus ticket booking (closed loop)Process control system of bus ticket booking (closed loop)
Process control system of bus ticket booking (closed loop)
 
vehicle management system project report
vehicle management system project reportvehicle management system project report
vehicle management system project report
 
Presentation on Railway Reservation System
Presentation on Railway Reservation SystemPresentation on Railway Reservation System
Presentation on Railway Reservation System
 

Viewers also liked

Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
Jargalsaikhan Alyeksandr
 
Online Bus Ticket Reservation System
Online Bus Ticket Reservation SystemOnline Bus Ticket Reservation System
Online Bus Ticket Reservation System
Tuvshinbayar Davaa
 
ONLINE BUS BOOKING SYSTEM
ONLINE BUS BOOKING SYSTEMONLINE BUS BOOKING SYSTEM
ONLINE BUS BOOKING SYSTEM
christ university
 
Bus Booking Management System
Bus Booking Management SystemBus Booking Management System
Bus Booking Management System
Mike Marshall
 
Railway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj dateRailway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj date
memonsana
 
Automated Bus Ticket Booking System
Automated Bus Ticket Booking System Automated Bus Ticket Booking System
Automated Bus Ticket Booking System
Daffodil International University
 
Normalization
NormalizationNormalization
Normalization
Salman Memon
 
Online movie ticket booking
Online movie ticket bookingOnline movie ticket booking
Online movie ticket booking
mrinnovater007
 
Maxim mozgovoy. sberbank. crm
Maxim mozgovoy. sberbank. crmMaxim mozgovoy. sberbank. crm
Maxim mozgovoy. sberbank. crm
ECR Community
 
Aeroflot
AeroflotAeroflot
Paper sheremetyevo
Paper sheremetyevoPaper sheremetyevo
Paper sheremetyevo
Filip Vl
 
Aeroflot Red Devils - Creative Brief !
Aeroflot Red Devils - Creative Brief ! Aeroflot Red Devils - Creative Brief !
Aeroflot Red Devils - Creative Brief !
Aeroflot Red Devils
 
Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...
Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...
Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...
Aeroflot - Russian airlines
 
Sberbank Europe Company Presentation (January 2014)
Sberbank Europe Company Presentation (January 2014)Sberbank Europe Company Presentation (January 2014)
Sberbank Europe Company Presentation (January 2014)
Jennifer Gerstl
 
Lunch presentatie aeroflot vers.1.2 2016-11-28
Lunch presentatie aeroflot  vers.1.2 2016-11-28Lunch presentatie aeroflot  vers.1.2 2016-11-28
Lunch presentatie aeroflot vers.1.2 2016-11-28
Airtrade Holland
 
Internationalization of civil aviation
Internationalization of civil aviationInternationalization of civil aviation
Internationalization of civil aviation
kluchaninova
 
Aeroflot
AeroflotAeroflot
Aeroflot
sooner2012
 

Viewers also liked (17)

Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)Database design & Normalization (1NF, 2NF, 3NF)
Database design & Normalization (1NF, 2NF, 3NF)
 
Online Bus Ticket Reservation System
Online Bus Ticket Reservation SystemOnline Bus Ticket Reservation System
Online Bus Ticket Reservation System
 
ONLINE BUS BOOKING SYSTEM
ONLINE BUS BOOKING SYSTEMONLINE BUS BOOKING SYSTEM
ONLINE BUS BOOKING SYSTEM
 
Bus Booking Management System
Bus Booking Management SystemBus Booking Management System
Bus Booking Management System
 
Railway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj dateRailway Reservation system Case study of oracle db by cj date
Railway Reservation system Case study of oracle db by cj date
 
Automated Bus Ticket Booking System
Automated Bus Ticket Booking System Automated Bus Ticket Booking System
Automated Bus Ticket Booking System
 
Normalization
NormalizationNormalization
Normalization
 
Online movie ticket booking
Online movie ticket bookingOnline movie ticket booking
Online movie ticket booking
 
Maxim mozgovoy. sberbank. crm
Maxim mozgovoy. sberbank. crmMaxim mozgovoy. sberbank. crm
Maxim mozgovoy. sberbank. crm
 
Aeroflot
AeroflotAeroflot
Aeroflot
 
Paper sheremetyevo
Paper sheremetyevoPaper sheremetyevo
Paper sheremetyevo
 
Aeroflot Red Devils - Creative Brief !
Aeroflot Red Devils - Creative Brief ! Aeroflot Red Devils - Creative Brief !
Aeroflot Red Devils - Creative Brief !
 
Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...
Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...
Состоялось первое в 2015 году заседание Общественного совета Аэрофлота второг...
 
Sberbank Europe Company Presentation (January 2014)
Sberbank Europe Company Presentation (January 2014)Sberbank Europe Company Presentation (January 2014)
Sberbank Europe Company Presentation (January 2014)
 
Lunch presentatie aeroflot vers.1.2 2016-11-28
Lunch presentatie aeroflot  vers.1.2 2016-11-28Lunch presentatie aeroflot  vers.1.2 2016-11-28
Lunch presentatie aeroflot vers.1.2 2016-11-28
 
Internationalization of civil aviation
Internationalization of civil aviationInternationalization of civil aviation
Internationalization of civil aviation
 
Aeroflot
AeroflotAeroflot
Aeroflot
 

Recently uploaded

AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 

Recently uploaded (20)

AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 

Online bus booking system-A Case study on Normalisation

  • 1.
  • 2.     ABC is an online bus booking system. There are 3 important entities(1) Bus (2) Passenger (3) Route Any user can login and check for schedule of buses using a username and e-mail address. The route table has the details of schedule of every bus. It has the attributes like departure date,departure time,bus number,capacity, seat number,status,fare,route name,source,destination and distance.
  • 3.      The status attribute checks whether any seat is available or not. Once,an available seat is viewed by the user,he goes ahead for booking. A user can book tickets for many passengers. Booking will generate a ticket which has attributes like ticket number and mode of payment. The mode of payment can be either by cash or by credit card.
  • 4.  Normalization is a process in which a given set of relations is replaced by successive collections of relations that have a simpler and more regular structure.  It transforms data from a problem into relations while ensuring data integrity and eliminating data redundancy.  4 most commonly used normal forms are first (1NF), second (2NF), third (3NF) and Boyce-Codd (BCNF) normal forms.
  • 5.  To make it feasible to represent any relation in the database.  To free relations from undesirable insertion, update, and deletion anomalies.
  • 6.  Full Dependency:In a relation, the attribute(s) B is fully functional dependent on A if B is functionally dependent on A,but not on any proper subset of A.  Partial Dependency:If there is some attribute that can be removed from A and the dependency still holds. Eg. Pid,Pname->userid
  • 7.  Transitive Dependency In a relation, if attribute(s) A->B and B->C, then C is transitively dependent on A via B (provided that A is not functionally dependent on B or C) Eg. Bus_no->Route_No and Route_No->Route_name
  • 8. – A table that contains one or more repeating groups. – To create an unnormalized table  Transform the data from the information source  (e.g. form) into table format with columns and rows.
  • 9. ONLINE BUS BOOKING SYSTEMABC travels Booking_date: Username: userid: email: Ticket No: Departuredate: Seatno: Departuretime: PassengerId: PassengerAddress: GENDER: PassengerName: DOB: Phoneno: Busno: Capacity: Routeno: Source: Distance: Modeof payment: Busname: type: Route-name: Destination: Fare:
  • 10. • The table cells must be of single value. • Eliminate repeating groups in individual tables. • Create a separate table for each set of related data. • Identify each set of related data with a primary key.
  • 11. The new tables are as follows: 1)USER (userid,username,u_email) 2)PASSENGER (Pid,phno,pname,paddress, DOB ,gender) 3)BUS_ROUTE (routeno,busno,routename,source,destination,distance, fare,dept_time,bname,capacity,type, dept_date) 3)RESERVATION (seatno,busno, status,bookingdate, ticketno, mode_of_payment)
  • 12. PASSENGER TABLE-(Pid,Phno->pname,paddress,Dob,gender) Pid phno pname paddress DOB gender 1 9676725456 Ram Sharma Pune 6/1/1990 Male 2 9878767878 Siya Varma sikar 3/5/1997 female 3 98786735 Siya Varma sikar 3/5/1997 female USER TABLE-(userid->username,u_email) Userid Username U_email 111 Savita Marwal savi@gmail.com 222 Himanish Mansinghani himanish@yahoo.com
  • 13. BUS_ROUTE(Busno,routeno-> bname,capacity,type,routename,source, destination,distance,fare,dept_time, dept_date) route Bus no no route sourc name e desti natio n dista nce 2000 10 Delhi- delhi Jaipur Jaipur 2000k 2000 m 11:00 am 3/4/2 012 AA 20 a/c 2001 11 Pune- pune mum bai mum bai 12:p m 4/4/2 012 BB 25 Non a/c 200k n fare 500 Dept Dept Bus capac type _time _date name ity RESERVATION TABLE-(seatno,busno->status,bookingdate,ticketno,mode_of_payment) seatno busno status bdate ticketno modeofpay ment 1110 10 booked 1/4/2012 1122 Cash 1111 11 Booked 2/4/2012 1121 credit
  • 14.  A table is in 2NF if it is in 1NF and if all nonkey attributes are dependent on all of the key.
  • 15. 1)USER (userid->username,u_email) 2)PASSENGER (pid-> pname,paddress, DOB, gender,userid) 3) CONTACTS (pid,phid->phno) 4)BUS_ROUTE (routeno,busno->bname,capacity,type, source,destination,distance,fare,Dept_time,dept_date) 5)RESERVATION (seatno,busno->status, bookingdate,ticketno, mode_of_payment)
  • 16. PASSENGER TABLE- (Pid(pk)->pname,paddress,Dob,gender,userid) Pid pname 101 DOB gender userid Ram Sharma Pune 6/1/1990 Male 111 102 Siya Varma sikar 3/5/1997 female 112 102 Siya Varma sikar 3/5/1997 female 112 CONTACTS TABLE - paddress (phid(pk)->phno) Phid pid phno 1 101 9887656789 2 102 9878789098 3 202 9767352453
  • 17.  A table is in 3NF if it is in 2NF and if it has no transitive dependencies.
  • 18. 1)USER (userid->username,u_email) 2)PASSENGER (pid->pname,paddress,DOB, gender,userid) 3)CONTACTS (pid,phno->phno) (As, busno->routeno and routeno->distance) Break BUS_ROUTE relation into 2 tablesa)BUS (busno->bname,capacity,type,routeno) b)ROUTE (routeno->routename,source,destination, dept_date,dept_time,distance,fare)
  • 19. a)BUS (busno->bname,capacity,type,routeno) busno bname capacity type routeno 10 AA 20 A/C 2000 11 BB 25 NON A/C 2001 b)ROUTE (routeno->routename,source,destination, dept_date,dept_time,distance,fare) routeno routena me source destinati on Dept_dat Dept_ti e me distance fare 2000 DelhiJaipur Delhi Jaipur 3/4/2012 11:00a.m 2000 2000 2001 PuneMumbai Pune Mumbai 4/4/2012 12:00p.m 200 500
  • 20. FROM RESERVATION-{seatno->ticketno and ticketno->modeof payment} A)BOOKING (seatno->pid,busno,status,ticketno) B) TICKET (ticketno->bookingdate,mode_of_payment)
  • 21.  A table is in BCNF if it is in 3NF and if every determinant is a candidate key.  BCNF is a stronger form of 3NF BCNF => 3NF 3NF ≠> BCNF  
  • 22. 1)BOOKING (seatno-> pid,busno,status) seatno pid busno status 1001 101 10 booked 1008 102 11 booked Here,all the attributes other than seatno acts as a candidate key. Eg,pid can act as a primary key alone. Busno can also act as a primary key. Status is not unique(i.e.either booked or available),so we use(seatno and status) as candidate key.
  • 23.  A table is in 4NF if it is in BCNF and if it has no multi-valued dependencies.
  • 24.  A table is in 5NF, also called "ProjectionJoin Normal Form" (PJNF), if it is in 4NF and if every join dependency in the table is a consequence of the candidate keys of the table.