Term Paper of Database Management System

1572 Words Sep 20th, 2011 7 Pages
TERM PAPER

OF

DATABASE MANAGEMENT SYSTEM

Topic: Railway reservation system for Indian railways

Submitted To:- Submitted By:-

Mr. Dinesh Kumar Rohit Kapoor

B.Tech CSE

Section- C1701

Roll No.-41

Regd. No.-1050070080

TABLE OF CONTENTS:

1. INTRODUCTION

2. ABOUT THE DATABASE

3. PHYSICAL DATA MODEL FOR RAILWAY RESERVATION

4.
…show more content…
tion_schedule

(

train_no varchar2(10),

station_id varchar2(10),

arrival_time varchar2(10),

departure_time varchar2(10),

constraint ss_tno_fk foreign key(train_no)

references train_info(train_no),

constraint ss_sid_fk foreign key(station_id)

references station_info(station_id)

);

[pic]

5.4 TRAIN_SEATS:

create table train_seats

(

train_no varchar2(10),

total_seats number,

constraint ts_tno_fk foreign key(train_no)

references train_info(train_no)

);

[pic]

5.5 RESERVATION

create table reservation

(

reservation_id varchar2(10),

passenger_id varchar2(10),

date_of_journey date,

reservation_date date,

from_station_id varchar2(10),

to_station_id varchar2(10),

constraint res_pid_pk primary key(passenger_id),

constraint res_fsid_pk foreign key(from_station_id)

references station_info(station_id),

constraint res_tsid_pk foreign key(to_station_id)

references station_info(station_id)

);

alter table reservation

add (seat_no varchar2(10));

[pic]

5.6 PASSENGER:

create table passenger

(

passenger_id varchar2(10),

passenger_name varchar2(20),

address varchar2(30),

phone_no varchar2(15),

gender varchar2(2),

constraint p_pd_fk foreign key(passenger_id)

references reservation(passenger_id),

Related Documents