Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Hotel Management System (HMS)

customer_details
c_id
HCM1
HCM2
HCM3
HCM4

c_name
punith
rajesh
seema
shailesh

c_email
s@gmail.com
r@rediff.com
a@yahoo.com
ra@ymail.com

c_address
mangalore
pune
pune
nagpur

c_contact
9644267894
9544787741
7899874264
7966545891

c_id varchar2(10) PRIMARY KEY


c_name varchar2(30)
c_email varchar2(30)
c_address varchar2(30)
c_contact number(10)
r_no FORIEGN KEY

rooms
r_no
101
102
103
201
202
203

r_type
AC_SINGLE
AC_SINGLE
AC_DOUBLE
NONAC_SINGLE
NONAC_SINGLE
NONAC_DOUBLE

r_status
NA
NA
A
NA
A
NA

r_no number(3) PRIMARY KEY


r_type varchar2(30) FOREIGN KEY [ room_rent(r_type)]
r_status varchar2(30)
r_floor number(2)

r_floor
1
1
1
2
2
2

r_no
101
102
201
203

Hotel Management System (HMS)


room_rent
R_type
AC_SINGLE
AC_DOUBLE
NONAC_SINGLE
NONAC_DOUBLE

R_rent
400
500
200
300

r_type varchar2(30) PRIMARY KEY


r_rent number(10)

booking_details
c_id
1

r_no
101

2
3
4

102
201
203

start_date
12-mar2010
19-apr-2010
22-dec-2010
20-nov-2010

end_date
13-mar2010
22-apr-2010
23-dec-2010
22-nov-2010

bill
400

b_paid
100

b_status
pending

1600
200
600

600
0
600

pending
pending
paid

c_id varchar2(10) FOREIGN KEY [customer_details(c_id)]


r_no number(3) constraint rno_fk references rooms(r_no)
start_date date
end_date date
bill number(10)
b_paid number(10)
b_status varchar2(30)

Hotel Management System (HMS)


QUERIES:

1) Show availability status of all rooms those are NONAC rooms in


month of December with the alias name AVAILABILITYSTATUS.
2) Show details of customers having bill status pending and those
who are from pune.
3) Show details of customers having pending amount greater than
250.
4) Show details of how many rooms are available on every floor.
5) Find customers who have booked AC rooms.
6) Show details of Customers who have booked the AC rooms and
also show for how many days they have booked.
7) Show details of customer(s) having pending bill status and booked
AC rooms and those are from pune
8) Find out the availability of AC single/double rooms and their rent
for 5 days. (Show room type, room status and total rent)
9) Show customer details having pending amount greater than 300
and have booked AC rooms.
10) Show customers details having Bill amount greater than 300 and
having gmail account.

You might also like