Design a Database on cinema hall booking system

create database cinema
create table credit_information(num_of_credit int,type nvarchar(20),name nvarchar(20),user_id nvarchar(20),expdate datetime,ticket int,movie nvarchar(20))
insert into credit_information values(1,'master','bipin','M1',14/02/2012,05,'housefull2')
insert into credit_information values(2,'visa','avinash','M2',15/02/2012,05,'kahani')
insert into credit_information values(3,'master','ashok','M3',16/02/2012,05,'agent vinode')
insert into credit_information values(4,'master','ankit','M4',17/02/2012,05,'housefull')
insert into credit_information values(5,'visa','abhishek','M5',19/02/2012,05,'veer')
insert into credit_information values(7,'master','sushant','M6',18/02/2012,05,'LOC')
insert into credit_information values(6,'master','shekhar','M7',10/02/2012,05,'INDIAN')
select *from credit_information

Create Statment for the User_info table:

create table user_info(First_name nvarchar(20), Last_name nvarchar(20),
Userid nvarchar(20) primary key,
password nvarchar(20),
contact nvarchar(20) ,Hint_question nvarchar(50),
Hint_answer nvarchar(50),Email_id nvarchar(20) unique)

Insert Statment for the User_info table:
insert into user_info values('Shekhar','Tiwari','1GHJ','1234','jalandhar','pet_name','dog','a@gmail.com')
insert into user_info values('Rajan','Singh','2GHJ','12345','jalandhar','pet_name','cat','f@gmail.com')
insert into user_info values('Nitin','Kumar','3GHJ','12346','jalandhar','pet_name','cow','a1@gmail.com')
insert into user_info values('Kumar','Rana','4GHJ','12347','jalandhar','pet_name','pagwin','r@gmail.com')

Select Statment for the User_info table:

Select *from user_info

Create Statment for the booking_info table:

create table booking_info(Movie_Id nvarchar(20) primary key,
Name_of_movie nvarchar(20),
Showtime nvarchar(20),
Screen_No nvarchar(20))

Insert Statment for the booking_info table:
insert into booking_info values('2222','Housefull2','12Pm','3')
insert into booking_info values('3332','Singh_is_king','10Am','4')
insert into booking_info values('3344','SINGHAM','4Pm','2')
insert into booking_info values('5556','Veer','3Pm','1')

Select Statment for the booking_info table:

Select *from booking_info

Create Statment for the location table:

create table location(Zipcode int unique,
State nvarchar(20),
City nvarchar(20),
Country nvarchar(20),
Theatre_Id nvarchar(20) primary key)

Insert Statment for the location table:
insert into location values(22222,'UP','Lucknow','India','9')
insert into location values(33322,'MP','Ciruanm','India','10')
insert into location values(33442,'AP','Arunchal','India','11')
insert into location values(55562,'Delhi','Delhi','India','12')

Select Statment for the location table:

Select *from location

create Statment for the movie table:
create table movie(movie_id nvarchar(20) primary key,
name_of_movie nvarchar(20),
Detail nvarchar(20))

Insert Statment for the movie table:
insert into movie values('2222','housefull2','comedy')
insert into movie values('3332','singh_is_king','comedy')
insert into movie values('3344','shingham','ACTION')
insert into movie values('5556','Veer','ACTION')

Select Statment for the movie table:
Select *from movie

create Statment for the screen_info table:
create table screen_info(movie_id nvarchar(20) primary key,
Screen_id nvarchar(20),
Theatre_id nvarchar(20))

Insert Statment for the screen_info table:
insert into screen_info values('2222','s1','9')
insert into screen_info values('3332','s2','10')
insert into screen_info values('3344','s3','11')
insert into screen_info values('5556','s4','12')

Select Statment for the screen_info table:
Select *from screen_info

create Statment for the Theatre_info table:
create table theatre_info(theatre_id nvarchar(20) primary key,
number_of_Screen nvarchar(20),
name_of_Theatre nvarchar(20))

Insert Statment for the screen_info table:
insert into theatre_info values('2222','4','PVR')
insert into theatre_info values('3332','3','WAVE')
insert into theatre_info values('3344','2','FUN')
insert into theatre_info values('5556','2','BIG_cinema')

Select Statment for the theatre_info table:
Select *from theatre_info

create Statment for the show_time table:
create table show_time(movie_id nvarchar(20) primary key,
Screen_id nvarchar(20),
Theatre_id nvarchar(20))

Insert Statment for the show_time table:
insert into show_time values('2222','s1','9')
insert into show_time values('3332','s2','10')
insert into show_time values('3344','s3','11')
insert into show_time values('5556','s4','12')

Select Statment for the show_time table:

Select *from show_time

posted under |

2 comments:

Unknown said...

thank you for your information

avinash said...

what about seat layout of theater?

Post a Comment

Newer Post Older Post Home

About

Cool na? :) Now Learn How to create one by Clicking here


Followers

About This Blog