You are on page 1of 32

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompany the successful completion of any task would be incomplete without the mention of the people who made it possible, whose constant guidance and encouragements crown all efforts with success. I express our sincere thanks to Mr. Kashinath Roy and Mr.Sanjeeb Sen. for the whole hearted guidance encouragement and supervision during the course of study. Without their help this project would have been nothing but a dream. I express my deep sense of gratitude to them for their invaluable guidance, for which the summer training in IBM Kolkata on DATABASE MANAGEMENT SYSYTEM from 6th June 2011 to 4th July 2011 has become successful. I take immense pleasure in expressing my heartful thanks to all the staff member of MONIBA COMPU ACADEMY PVT.LTD who helped me to complete this project successfully and without whose help, valuable guidance, timely tips and constant supervision, the project would not have been completed.
I wish to extend profound gratitude to the entire teaching staff of Information Technology Department of BENGAL COLLEGE OF ENGINEERING AND TECHNOLOGY , who has been instrumental in completion of this project. Lastly I would like to extend my gratefulness to all the individuals who have directly or indirectly assisted in making the project, a dream come true.

Signature

OVERVIEW OF DBMS
DATABASE MANAGEMENT SYSTEM (DBMS) deals with the problem of storing and retrieving large amounts of data. It consists of specialized software (and even hardware) to efficiently support data intensive activities on the computer. Typically, an application program will have several kinds of users with differing data and usage requirements. A DBMS provide an environment to share data amongst such users. Data can be stored maintained without inconsistencies. Simultaneous access by several users without compromising on accuracy is major concern in a DBMS. For example, if there is only one railway seat and two people ask for it simultaneously, the seat should be given to only one of them. Computer system often fails due to mechanical and electrical faults. Preserving the accuracy of the data and restoring the database form a crashed system is a major concern for Database Management System. DBMS are also provides facilities to make minor changes in data without having to fully rewrite the application software. There are several kinds of database management systems depending on the kind of data model they supportnetwork, relational, object oriented etc. Most of the DBMSs in use today are relational database management systems and these are what we will study in details and using this system we will solve our given project ROYAL HOTEL MANAGEMENT.

CASE STUDY:ROYAL HOTEL MANAGEMENT


Royal hotel started its operations in Kolkata five years back. An inclination towards customer delight has been a tradition for Royal hotel. Royal hotels excellent services and world-class amenities have now increased its market share to almost 18%. The success story continues because Royal Hotel has always tended to introduce innovative ideas and policies to enhance its customer base. At present Royal Hotel provides three types of suites to its customers, which are listed in the following table.

Type of Room Economic Business Luxury

No. of Rooms 30 20 10 Royal Hotel Suite Details

Price per day ( 1000 2000 3000

The hotel has various departments, such as housekeeping department for maintenance of rooms such that cleaning and other activities are taken care of. A report for housekeeping is maintained so that personnel can be rotated for duty. The departmental structure of Royal Hotel is displayed as follows.

Departmental Structure of Royal Hotel

Current System

Royal Hotels overall management is controlled by the General Manager and is subsequently divided into different departments.

Rooms
This includes: Front desk / front office: The booking assistant handles the front desk operations, such as inquiries, booking, and cancellation of rooms. The booking assistant performs the manual room reservation according to the customer demand, personally or on the phone. At present, Royal Hotel maintains various files for hotel reservation system. When a customer arrives to check for availability of rooms or book rooms with hotel, a confirmation number is given to the customer for his booking. The booking assistant checks for the availability of rooms according to the arrival time and departure time provided by the customer and creates a reservation report. The booking assistant also enquires whether or not the customer wants pickup facility. Housekeeping: The housekeeping assistant manages the cleanliness of rooms and takes care of the on-duty staff for individual rooms by using a manual entry of things in a Cleaning Status file, as shown in the following table.

Room No. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16

Floor No. 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3

Status Cleaned Not Cleaned Cleaned Not Cleaned Cleaned Not Cleaned Cleaned Not Cleaned Cleaned Not Cleaned Cleaned Not Cleaned Cleaned Not Cleaned Cleaned Not Cleaned Cleaning Status File

Assigned To (E_ID) 101 112 102 116 120 112 102 101 116 101 120 102 112 101 120 116

The house keeping assistant is responsible for updating the Cleaning Status file at the interval of every 4 hours.

Food and Beverages


This includes: Kitchen: The kitchen assistant/chef manages a Daily Menu file for the regular and occasional dishes to be prepared. The kitchen assistant also manages individual food-orders made by the customers. Banquet: The banquet assistant manages the banquet activities, such as party organization, booking and cancellation of banquet. Room service: The room service includes the individual requests made by the customers regarding food and other articles, such as laundry. Restaurants: The restaurants include the management of food and servicing for the customers and guests. Lounges: The lounges include the management of the services provided to the customers in the lounges.

Miscellaneous Operating Departments


This includes: Business center: The business development (BD) assistant maintains a business promotion department, which has its main focus on the development and enhancement of the hotels business. The BD assistant handles the various promotion activities, such as special discount offers, holiday packages, and executive seminars. On-site shops: The on-site shops include sale of different products by providing on-site shops inside the hotel area. Fitness center: The health trainer manages the health equipment and services to the fitness-conscious customers. The health trainer also schedules occasional fitness seminars and other related activities to achieve customer satisfaction. Parking and others: The management of the customer and hotel vehicles is looked after by the transportation assistant. The transportation assistant also handles the pick and drop facility for the customers of the hotel.

Envisioned System
The existing system needs to be computerized which would result in fast telephonic or personal inquiries about availability of rooms in Royal Hotel. The booking assistant verifies the availability of rooms in the computer and if the rooms are available, reserves that room for that customer. A new system needs to be developed for Royal Hotel where every department is interlinked. Each department should be automated as a separate interdependent module in the application. This new system should accomplish the following functions: The authorized staff of the hotel can log into the application by using different logins, such as manager and assistant, to perform various activities, such as create and view users. The housekeeping department should allow the housekeeping assistant to view and manage the cleaning status of the rooms. The housekeeping assistant should be able to generate a report for the cleaning status of the rooms. The report should also include the name of the respective cleaning staff associated with a room. Moreover, it should provide the functionality to sort the contents of the cleaning report according to different criteria, such as floor number and staff on duty. The housekeeping department should allow the housekeeping assistant or the manager to manage employee details, such as adding, updating, and deleting employee records. While accepting room reservation data, all necessary validations should be performed. For example, the system should check whether the room of a specific type is available for booking for the time duration specified by the customer. In addition, the following tasks should be performed: A unique confirmation number should be generated for each reservation process. The system should generate the room reservation report.

Following is the ER diagram for the envisioned system.

ER diagram for the Envisioned System


6

1.

2. 3. 4.

5.

The whole hotel management system needs to be computerized. The following tasks are for immediate implementation: Implement the functionality on the Login page to validate user credentials and provide the user with appropriate features and functionality. For example, the user who logs in as a clerk is not allowed viewing or managing employee details. Implement the functionality on the House Keeping page to view the cleaning status report containing the room number, floor number, status, and assigned to columns. Implement the functionality on the House Keeping page to update the cleaning status of the hotel rooms. Implement the functionality on the Manage Employees page to allow the user to search employee details, such as name, designation, address, telephone, fax, e-mail, and ID. The search could be done on the basis of name or designation. Implement the functionality on the Manage Employees page to perform various activities, such as addition, updation, and deletion of employee records.

USERS
1. Administrator
create user admin identified by admin; grant dba to admin;

2. Housekeeping
create user hkeep identified by hkeep; grant create session,create view,create sequence to hkeep;

3.RECEPTION
create user reception identified by reception; grant create session,create view,create sequence to reception;

4.KITCHEN
create user kitchen identified by kitchen; grant create session,create view,create sequence to kitchen;

5.ACCOUNTS
create user account identified by account; grant create session,create view,create sequence to account;

6.HUMAN RESOURCE
create user hrd identified by hrd; grant create session,create view,create sequence to hrd;

TABLES
1.DEPARTMENT
create table department (d_id varchar2(4) primary key, d_name varchar2(20));

2.EMPLOYEE
create table employee ( e_id number(4) primary key, d_id varchar2(5), first_name varchar2(15), last_name varchar2(30), hire_date date, address varchar2(100), designation varchar2(30), salary number(10), contact number(15), email varchar2(60), constraint fkDept foreign key(d_id) references department(d_id));

3.ROOM
create table room (room_no number(3) primary key, date_available date, category_no number(2));

4.ROOM RESERVATION
create table room_reserv (confirmation_no number primary key, cust_name varchar2(50), room_no number(3), check_in_date date, check_out_date date, constraint fkroom foreign key(room_no) references room(room_no) );

5.ROOM INFORMATION
create table room_info (room_no number(3) primary key, floor_no number(2), status varchar2(10) check(status in('clean','not clean')), e_id number, constraint fkemployee foreign key(e_id)references employee(e_id) );

6.ROOM CATEGORY
create table room_category (category_no number(2) primary key, description varchar2(60), category_name varchar2(15) check(category_name in('luxury','business','economic')) );
9

7.ACCOUNT
create table account ( room_no number(3) primary key, extra_activity_charge number(10), charge_for_stay number(10), total_charge number(10), e_id number(4));

8.RATE
create table rate ( category_no number, per_day_charge varchar2(20) );

9.LOGIN
create table login (username varchar2(20) primary key, password varchar2(10) not null);

10.MENU
create table menu (food_no varchar2(10) primary key, food_name varchar2(40));

11.FOOD & BEVERAGE


create table food_beverage ( food_no varchar2(10), food_name varchar2(40), room_no number(3) primary key, food_bill number(10), constraint fkmenu foreign key(food_no) references menu(food_no));

12.EMPLOYEE LOG
create table employee_log ( new_e_id number(4), old_e_id number(4), new_d_id varchar2(5), old_d_id varchar2(5), new_first_name varchar2(15), old_first_name varchar2(15), new_last_name varchar2(30), old_last_name varchar2(30), new_hire_date date, old_hire_date date, new_address varchar2(100), old_address varchar2(100), new_designation varchar2(30), old_designation varchar2(30), new_salary number(10), old_salary number(10), new_contact number(15), old_contact number(15),
10

new_email varchar2(60), old_email varchar2(60), CHANGE_TYPE VARCHAR2(1 byte), CHANGED_BY VARCHAR2(30 byte), CHANGED_TIME DATE);

13.ROOM LOG
create table room_log (new_room_no number(3), old_room_no number(3), new_date_available date, old_date_available date, new_category_no number(2), old_category_no number(2), CHANGE_TYPE VARCHAR2(1 byte), CHANGED_BY VARCHAR2(30 byte), CHANGED_TIME DATE );

14.ROOM RESERVE LOG


create table room_reserv_log ( new_confirmation_no number, old_confirmation_no number, new_cust_name varchar2(50), old_cust_name varchar2(50), new_room_no number(3), old_room_no number(3), new_check_in_date date, old_check_in_date date, new_check_out_date date, old_check_out_date date, CHANGE_TYPE VARCHAR2(1 byte), CHANGED_BY VARCHAR2(30 byte), CHANGED_TIME DATE );

15.ROOM INFORMATION LOG


create table room_info_log ( new_room_no number(3), old_room_no number(3), new_floor_no number(2), old_floor_no number(2), new_status varchar2(10), old_status varchar2(10), new_e_id number, old_e_id number, CHANGE_TYPE VARCHAR2(1 byte), CHANGED_BY VARCHAR2(30 byte), CHANGED_TIME DATE );
11

16.ACCOUNT LOG
create table account_log ( old_room_no number(3), new_room_no number(3), old_extra_activity_charge number(10), new_extra_activity_charge number(10), old_charge_for_stay number(10), new_charge_for_stay number(10), old_total_charge number(10), new_total_charge number(10), old_e_id number(4), new_e_id number(4), CHANGE_TYPE VARCHAR2(1 byte), CHANGED_BY VARCHAR2(30 byte), CHANGED_TIME DATE);

17.MENU LOG
create table menu_log (new_food_no varchar2(10), old_food_no varchar2(10), new_food_name varchar2(40), old_food_name varchar2(40), CHANGE_TYPE VARCHAR2(1 byte), CHANGED_BY VARCHAR2(30 byte), CHANGED_TIME DATE);

18.FOOD & BEVERAGE LOG


create table food_beverage_log ( old_food_no varchar2(10), new_food_no varchar2(10), old_food_name varchar2(40), new_food_name varchar2(40), old_room_no number(3) , new_room_no number(3) , old_food_bill number(10), new_food_bill number(10), CHANGE_TYPE VARCHAR2(1 byte), CHANGED_BY VARCHAR2(30 byte), CHANGED_TIME DATE);

19.LOGON & LOGOFF LOG


CREATE TABLE logon_logoff_audit (user_id VARCHAR2(30), sess_id NUMBER(10), logon_time DATE, logoff_time DATE, host VARCHAR2(30));

12

PRIVILEDGES
1.(BY USER:- ADMIN ; TO USER:- HRD)
grant select on department to hrd; grant select,insert,update,delete on employee to hrd;

2.(BY USER:- ADMIN ; TO USER:- ACCOUNT)


grant select,update on account to account;

3.(BY USER:- ADMIN ; TO USER:- HKEEP)


grant select,update on room_info to hkeep;

4.(BY USER:- ADMIN ; TO USER:- KITCHEN)


grant select,insert,update,delete on menu to kitchen; grant select,update on food_beverage to kitchen;

5.(BY USER:- ADMIN ; TO USER:- RECEPTION)


grant select on rate to reception; grant select,update on room to reception; grant select on room_category to reception; grant select,update on room_reserv to reception;

13

SEQUENCE
(CREATED BY USER:- RECEPTION)
create sequence confirmation_no increment by 01 start with 001;

TRIGGER
1)EMP_LOG (CREATED BY USER:- ADMIN)
CREATE OR REPLACE TRIGGER emp_log AFTER INSERT OR UPDATE OR DELETE ON employee FOR EACH ROW declare my employee_log%ROWTYPE; begin if inserting then my.change_type := 'I'; elsif updating then my.change_type :='U'; else my.change_type := 'D'; end if; my.changed_by := user; my.changed_time := sysdate; my.new_e_id := :new.e_id; my.new_d_id := :new.d_id; my.new_first_name := :new.first_name; my.new_last_name := :new.last_name; my.new_hire_date := :new.hire_date; my.new_address := :new.address; my.new_designation := :new.designation; my.new_salary := :new.salary; my.new_contact := :new.contact; my.new_email := :new.email; my.old_e_id := :old.e_id; my.old_d_id := :old.d_id; my.old_first_name := :old.first_name; my.old_last_name := :old.last_name; my.old_hire_date := :old.hire_date; my.old_address := :old.address; my.old_designation := :old.designation; my.old_salary := :old.salary; my.old_contact := :old.contact; my.old_email := :old.email; insert into employee_log values my; end; /

14

2.ROOM_LOG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER room_log AFTER INSERT OR UPDATE OR DELETE ON room FOR EACH ROW declare my room_log%ROWTYPE; begin if inserting then my.change_type := 'I'; elsif updating then my.change_type :='U'; else my.change_type := 'D'; end if; my.changed_by := user; my.changed_time := sysdate; my.new_room_no := :new.room_no; my.new_date_available := :new.date_available; my.new_date_available := :new.date_available; my.old_room_no := :old.room_no; my.old_date_available := :old.date_available; my.old_category_no := :old.category_no; insert into room_log values my; end;/

3.ROOM_RESERV_LOG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER room_reserv_log AFTER INSERT OR UPDATE OR DELETE ON room_reserv FOR EACH ROW declare my room_reserv_log%ROWTYPE; begin if inserting then my.change_type := 'I'; elsif updating then my.change_type :='U'; else my.change_type := 'D'; end if; my.changed_by := user; my.changed_time := sysdate; my.new_confirmation_no := :new.confirmation_no; my.new_cust_name := :new.cust_name; my.new_room_no := :new.room_no; my.new_check_in_date := :new.check_in_date ; my.new_check_out_date := :new.check_out_date ; my.old_confirmation_no := :old.confirmation_no; my.old_cust_name := :old.cust_name; my.old_room_no := :old.room_no; my.old_check_in_date := :old.check_in_date; my.old_check_out_date := :old.check_out_date; insert into room_reserv_log values my; end;/

4.ROOM_INFO_LOG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER room_info_log AFTER INSERT OR UPDATE OR DELETE ON room_info FOR EACH ROW declare my room_info_log%ROWTYPE;
15

begin if inserting then my.change_type := 'I'; elsif updating then my.change_type :='U'; else my.change_type := 'D'; end if; my.changed_by := user; my.changed_time := sysdate; my.new_room_no := :new.room_no; my.new_floor_no := :new.floor_no; my.new_status := :new.status; my.new_e_id := :new.e_id; my.old_room_no := :old.room_no; my.old_floor_no := :old.floor_no; my.old_status := :old.status; my.old_e_id := :old.e_id; insert into room_info_log values my; end;/

5.ACC_LOG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER acc_log AFTER INSERT OR UPDATE OR DELETE ON account FOR EACH ROW declare my account_log%ROWTYPE; begin if inserting then my.change_type := 'I'; elsif updating then my.change_type :='U'; else my.change_type := 'D'; end if; my.changed_by := user; my.changed_time := current_timestamp ; my.new_room_no := :new.room_no; my.new_extra_activity_charge := :new.extra_activity_charge; my.new_charge_for_stay := :new.charge_for_stay; my.new_total_charge := :new.total_charge; my.new_e_id := :new.e_id; my.old_room_no := :old.room_no; my.old_extra_activity_charge := :old.extra_activity_charge; my.old_charge_for_stay := :old.charge_for_stay; my.old_total_charge := :old.total_charge; my.old_e_id := :old.e_id; insert into account_log values my; end;/

6.FOOD_LOG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER food_log AFTER INSERT OR UPDATE OR DELETE ON food_beverage FOR EACH ROW declare my food_beverage_log%ROWTYPE; begin if inserting then my.change_type := 'I'; elsif updating then my.change_type :='U'; else my.change_type := 'D';
16

end if; my.changed_by := user; my.changed_time := sysdate; my.new_food_no := :new.food_no; my.new_food_name := :new.food_name; my.new_room_no := :new.room_no; my.new_food_bill := :new.food_bill; my.old_food_no := :old.food_no; my.old_food_name := :old.food_name; my.old_room_no := :old.room_no; my.old_food_bill := :old.food_bill; insert into food_beverage_log values my; end;/

7.MENU_LOG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER menu_log AFTER INSERT OR UPDATE OR DELETE ON menu FOR EACH ROW declare my menu_log%ROWTYPE; begin if inserting then my.change_type := 'I'; elsif updating then my.change_type :='U'; else my.change_type := 'D'; end if; my.changed_by := user; my.changed_time := sysdate; my.new_food_no := :new.food_no; my.new_food_name := :new.food_name; my.old_food_no := :old.food_no; my.old_food_name := :old.food_name; insert into menu_log values my; end;/

8.LOGON_AUDIT_TRIG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER logon_audit_trig AFTER LOGON ON DATABASE BEGIN INSERT INTO logon_logoff_audit VALUES (user, sys_context('userenv', 'sessionid'),sysdate,null,sys_context('userenv', 'host')); END; /

9.LOGOFF_AUDIT_TRIG (CREATED BY USER:- ADMIN)


CREATE OR REPLACE TRIGGER logoff_audit_trig BEFORE LOGOFF ON DATABASE BEGIN INSERT INTO logon_logoff_audit VALUES (user,sys_context('userenv', 'sessionid'),null,sysdate,sys_context('userenv', 'host')); END; /

17

INSERTION
1.DEPARTMENT
insert into department values('d-1','reception'); insert into department values('d-2','house keeping'); insert into department values('d-3','kitchen'); insert into department values('d-4','human resource'); insert into department values('d-5','accounts'); insert into department values('d-6','administration');

2.EMPLOYEE
insert into employee values(101,'d-2','somnath','sur','14-jul-2007','d-12,sanjay sharma path,belghoria,kol23','cleaner',2000,8925479865,'somnath@ymail.com'); insert into employee values(102,'d-2','rajesh','thakur','20-jun-2009','aldrin path,bidhannagar,kol16','cleaner',2000,9923457895,'rajesh@gmail.com'); insert into employee values(103,'d-4','sahela','firdaus','22-oct-2010','d-23,rashbihari avenue,kol10','typist',6000,8002456987,'sahela@hotmail.com'); insert into employee values(104,'d-5','rumi','roy','10-jan-2008','e/22,sahid sukumar banerjee lane,behala,kol-78','jnr.accountant',8000,7789654896,'rumi@rocketmail.com'); insert into employee values(105,'d-6','raja','chakravarty','09-apr-2006','7/12,matribhumi apartment,behala,kol-78','admin_manager',14000,9785649875,'raja@gmail.com'); insert into employee values(106,'d-3','suman','hazra','14-sep-2005','45/t,kalpana chawla street,garia,kol09','chef',7000,7784596321,'suman@gmail.com'); insert into employee values(107,'d-3','subha','guha','18-aug-2006','a/12,sahid bhagat singh lane,dumdum,kol-70','chef',7000,8496578965,'subha@hotmail.com'); insert into employee values(108,'d-2','prosenjeet','chatterjee','29-aug-2008','r-15,rabindra nagar,ramrajatala,howrah-10','room service',3000,8126598745,'prosenjeet@hotmail.com'); insert into employee values(109,'d-1','priyanka','kumari','22-dec-2011','s-10,khudiram sarani,khidirpur,kol19','snr.executive',8000,7015498654,'priyanka@yahoomail.com'); insert into employee values(110,'d-6','deepa','bharti','04-may-2009','d-177,columbia street,rajarhat,kol33','human resource manager',12000,8956471254,'deepa@gmail.com'); insert into employee values(111,'d-6','paushali','nath','12-apr-2008','40/12,howrah maidan,how-10','head accountant',6000,8877996545,'paushali@gmail.com'); insert into employee values(112,'d-2','shreya','chandra','09-aug-2006','12/3,ranjana aprtment,liluah,howrah-09','cleaner',2000,9012456985,'shreya@hotmail.com'); insert into employee values(113,'d-5','piyush','agarwalla','07-aug-2007','rd-12,bidhannagar,kol13','snr.accountant',10000,7012965478,'piyush@yahoo.com'); insert into employee values(114,'d-2','ram','kumar','20-jan-2011','16d/4,jupiter apartment,rajarhat,kol76','room service',3000,8795632145,'ram@hotmail.com'); insert into employee values(115,'d-6','tonmoy','mukherjee','20-feb-2008','c/12,sahid sukumar banerjee lane,behala,kol-78','house keeping assistant',9000,8925447127,'tonmoy@hotmail.com'); insert into employee values(116,'d-2','raktim','mukherjee','28-aug-2009','e/12,rammohan sarani,kudghat,kol-72','cleaner',2000,8000146578,'raktim@hotmail.com'); insert into employee values(117,'d-5','rajesh','sinha','20-mar-2009','d-122,nazrul bithi,tollygaunge,kol22','jnr.accountant',2500,7004569321,'rajesh@yahoomail.com'); insert into employee values(118,'d-6','paromita','lahiri','18-aug-2007','c/16,sahid sukumar banerjee lane,behala,kol-78','booking assistant',6000,7004714253,'paromita@gmail.com'); insert into employee values(119,'d-3','ankur','bharadwaj','17-nov-2010','a/13,rabindra sarani,belur,how07','chef',7000,8925784596,'ankur@hotmail.com'); insert into employee values(120,'d-2','ankit','kumar','20-aug-2006','d/22,sahid sukumar banerjee lane,behala,kol-78','cleaner',2000,8925123355,'ankit@hotmail.com'); insert into employee values(121,'d-5','sanjay','chakraborty','16-jan-2009','2a/3,venus apartment,ballygaunge,kol-40','snr. accountant',11000,8845987456,'sanjay@gmail.com');
18

insert into employee values(122,'d-1','rahul','jha','20-dec-2008','12c,sahid sukumar banerjee lane,behala,kol78','jnr.executive',4000,8925470000,'rahul@hotmail.com'); insert into employee values(123,'d-3','ramesh','sippy','14-april-2011','e/1,lajpat nagar,dakhineswar,how10','chef',7000,8925143322,'ramesh@hotmail.com'); insert into employee values(124,'d-6','sandeep','sarkar','17-aug-2009','d-130,mahatma gandhi road,kol72','kitchen assistant',11500,8925479860,'sandeep@gmail.com'); insert into employee values(125,'d-1','rahul','roychowdhury','22-oct-2010','7/12,sahid sukumar banerjee lane,behala,kol-78','jnr.executive',4000,8925479848,'rahul@hotmail.com');

3.ROOM
insert into room values(01,'15-aug-2011',1); insert into room values(02,'01-sep-2011',1); insert into room values(03,'04-oct-2011',1); insert into room values(04,'04-aug-2011',1); insert into room values(05,'06-aug-2011',1); insert into room values(06,'05-sep-2011',1); insert into room values(07,'10-oct-2011',1); insert into room values(08,'06-oct-2011',2); insert into room values(09,'10-aug-2011',2); insert into room values(10,'10-oct-2011',2); insert into room values(11,'27-sep-2011',2); insert into room values(12,'16-aug-2011',2); insert into room values(13,'03-oct-2011',2); insert into room values(14,'21-sep-2011',2); insert into room values(15,'12-dec-2011',3); insert into room values(16,'12-aug-2011',3); insert into room values(17,'03-nov-2011',3); insert into room values(18,'12-oct-2011',3); insert into room values(19,'05-sep-2011',3); insert into room values(20,'10-sep-2011',3); insert into room values(21,'10-dec-2011',3);

4.ROOM RESERVATION
insert into room_reserv values(reception.confirmation_no.nextval,'vikash singh',01,'01-aug-2011','15aug-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'raj chakravarty',02,'25-aug-2011','01sep-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'suraj agarwal',03,'21-sep-2011','04oct-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'sumit ojha',04,'28-jul-2011','04-aug2011'); insert into room_reserv values(reception.confirmation_no.nextval,'sourav sarkar',05,'24-jul-2011','06aug-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'debolina de',06,'01-sep-2011','05-sep2011'); insert into room_reserv values(reception.confirmation_no.nextval,'sritama dutta',07,'01-oct-2011','10oct-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'santanu maity',08,'20-sep-2011','06oct-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'nishit prasad',09,'31-jul-2011','10-aug2011');
19

insert into room_reserv values(reception.confirmation_no.nextval,'vikash rao',10,'20-aug-2011','10-oct2011'); insert into room_reserv values(reception.confirmation_no.nextval,'rakesh sharma',11,'17-sep-2011','27sep-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'rick chatterjee',12,'10-jul-2011','16aug-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'paromita mondol',13,'01-oct2011','03-oct-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'sadhvi gupta',14,'11-sep-2011','21sep-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'puja banerjee',15,'05-dec-2011','12dec-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'debarun de',16,'02-aug-2011','12-aug2011'); insert into room_reserv values(reception.confirmation_no.nextval,'seema mishra',17,'28-oct-2011','03nov-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'subhadeep banerjee',18,'01-oct2011','12-oct-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'oishi chatterjee',19,'01-sep-2011','05sep-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'rishi malhotra',20,'01-aug-2011','10sep-2011'); insert into room_reserv values(reception.confirmation_no.nextval,'kiran singh',21,'02-dec-2011','10-dec2011');

5.ROOM INFORMATION
insert into room_info values(01,1,'clean',101); insert into room_info values(02,1,'clean',102); insert into room_info values(03,1,'not clean',112); insert into room_info values(04,1,'clean',120); insert into room_info values(05,1,'not clean',116); insert into room_info values(06,1,'clean',116); insert into room_info values(07,1,'clean',101); insert into room_info values(08,2,'clean',101); insert into room_info values(09,2,'not clean',102); insert into room_info values(10,2,'clean',101); insert into room_info values(11,2,'not clean',102); insert into room_info values(12,2,'clean',120); insert into room_info values(13,2,'not clean',112); insert into room_info values(14,2,'clean',116); insert into room_info values(15,3,'not clean',120); insert into room_info values(16,3,'not clean',116); insert into room_info values(17,3,'clean',102); insert into room_info values(18,3,'clean',112); insert into room_info values(19,3,'clean',101); insert into room_info values(20,3,'not clean',120); insert into room_info values(21,3,'clean',116);

6.ROOM CATEGORY
insert into room_category values(1,'a.c room,double bed room','luxury'); insert into room_category values(2,'a.c room,single bed room','business'); insert into room_category values(3,'double/single bed room','economic');
20

7.ACCOUNT
insert into account values(01,4500,45000,49500,104); insert into account values(02,null,null,null,null); insert into account values(03,null,null,null,null); insert into account values(04,null,null,null,null); insert into account values(05,null,null,null,null); insert into account values(06,null,null,null,null); insert into account values(07,null,null,null,null); insert into account values(08,null,null,null,null); insert into account values(09,null,null,null,null); insert into account values(10,null,null,null,null); insert into account values(11,null,null,null,null); insert into account values(12,null,null,null,null); insert into account values(13,null,null,null,null); insert into account values(14,null,null,null,null); insert into account values(15,null,null,null,null); insert into account values(16,3000,22000,25000,121); insert into account values(17,null,null,null,null); insert into account values(18,null,null,null,null); insert into account values(19,null,null,null,null); insert into account values(20,800,10000,10800,117); insert into account values(21,null,null,null,null);

8.RATE
insert into rate values(1,'Rs-3000/-'); insert into rate values(2,'Rs-2000/-'); insert into rate values(3,'Rs-1000/-');

9.LOGIN
insert into login values('admin','admin'); insert into login values('hrd','hrd'); insert into login values('reception','reception'); insert into login values('hkeep','hkeep'); insert into login values('account','account'); insert into login values('kitchen','kitchen');

10.MENU
insert into menu values('1','chinese'); insert into menu values('2','italian'); insert into menu values('3','bengali'); insert into menu values('4','gujrati'); insert into menu values('5','south indian'); insert into menu values('6','north indian'); insert into menu values('7','punjabi'); insert into menu values('8','mocktails'); insert into menu values('9','continental');

21

11.FOOD & BEVERAGE


insert into food_beverage values('9','continental',01,4500); insert into food_beverage values('','',02,null); insert into food_beverage values('','',03,null); insert into food_beverage values('','',04,null); insert into food_beverage values('','',05,null); insert into food_beverage values('','',06,null); insert into food_beverage values('','',07,null); insert into food_beverage values('','',08,null); insert into food_beverage values('','',09,null); insert into food_beverage values('','',10,null); insert into food_beverage values('','',11,null); insert into food_beverage values('','',12,null); insert into food_beverage values('','',13,null); insert into food_beverage values('','',14,null); insert into food_beverage values('','',15,null); insert into food_beverage values('3','bengali',16,3000); insert into food_beverage values('','',17,null); insert into food_beverage values('','',18,null); insert into food_beverage values('','',19,null); insert into food_beverage values('7','punjabi',20,800); insert into food_beverage values('','',21,null);

22

QUERRIES
USER:-ADMIN 1.LIST ALL RECORDS IN THE DEPARTMENT TABLE
INPUT:- select * from department; OUTPUT:-

2.LIST ALL RECORDS IN THE ROOM TABLE


INPUT:- select * from room; OUTPUT:-

3. Retrieve employee name of all cleaners along with room no anD e_id.
INPUT:- select first_name,last_name,room_no from employee,room_info where designation='cleaner'and room_info.e_id=employee.e_id; OUTPUT:-

23

4. RETRIEVE PASSWORD OF USER KITCHEN


INPUT:- select * from login where username='kitchen'; OUTPUT:-

5. RETRIEVE CONFIRMATION N.O,EMPLOYEE NAME AND STATUS OF ROOM


INPUT:- select confirmation_no,status,first_name from room_reserv,room_info,employee where room_info.room_no=room_reserv.room_no and room_info.e_id=employee.e_id; OUTPUT:-

6.Create view of all check in,checkout,room_no,first name of employee and show all records of the view order by room_no
INPUT:- create view synopsis as select first_name,room_no,check_in_date,check_out_date from employee e join room_info ri on e.e_id=ri.e_id join room_reserv rr on rr.room_no=ri.room_no; select * from synopsis order by room_no; OUTPUT:-

7.Retreive the room no and the name of the food that is ordered
INPUT:- select room_no,food_name from food_beverage where food_name is not null; OUTPUT:-

24

8.to find How much amount is paid by customer for their food along with their room category
INPUT:- select food_bill,category_no from food_beverage,room where food_beverage.room_no=room.room_no and food_bill is not null; OUTPUT:-

9. to find operation type and user from room reservation log


(room reservation log store details of operation done on room reservation table)

INPUT:- select change_type,changed_by,changed_time from room_reserv_log; OUTPUT:-

10.to find login and logoff details


INPUT:- select * from logon_logoff_audit; OUTPUT:-

USER:- RECEPTION 1.LIST ALL RECORDS IN THE RATE TABLE INPUT:- select * from admin.rate; OUTPUT:-

25

2. Print second highest available day (check out date) of a room.


INPUT:- select max(check_out_date) from admin.room_reserv where check_out_date<(select max(check_out_date) from admin.room_reserv); OUTPUT:-

3. RETRIEVE Rate of economic catEgory room


INPUT:- select per_day_charge,category_name from admin.rate r,admin.room_category c where r.category_no=c.category_no and category_name='economic'; OUTPUT:-

4.LIST ALL RECORDS IN THE ROOM category TABLE


INPUT:- select * from admin.room_category; OUTPUT:-

5. RETRIEVE NEXT AVAILABLE DAY OF A PARTICULAR ROOM NO


INPUT:- select date_available from admin.room where room_no=20; OUTPUT:-

6.LIST ALL RECORDS IN THE ROOM reservation TABLE


INPUT:- select * from admin.room_reserv; OUTPUT:-

7.update table room reservation,set customer name as rajesh chakravarty where room_no =2 and view the updated row
INPUT:- update admin.room_reserv set cust_name='rajesh chakravarty' where room_no=2; select * from admin.room_reserv where room_no=2; OUTPUT:-

26

User:-hkeep 1.LIST ALL RECORDS IN THE ROOM information TABLE


INPUT:- select * from admin.room_info; OUTPUT:-

2. update table room_info and view the updated row of account table
INPUT:- update admin.room_info set status='not clean' where room_no=7; select * from admin.room_info where room_no=7; OUTPUT:-

User:-account 1.LIST ALL RECORDS IN THE account TABLE where e_id is not null
INPUT:- select * from admin.account where e_id is not null; OUTPUT:-

2. update table account and set total charge=11000 for the room_no= 20 and view the updated row of account table
INPUT:- update admin.account set total_charge = 11000 where room_no=20; select * from admin.account where room_no=20; OUTPUT:-

27

User:-kitchen 1.LIST ALL RECORDS IN THE menu TABLE


INPUT:- select * from admin.menu; OUTPUT:-

User:-hrd 1.LIST ALL RECORDS IN THE EMPLOYEE TABLE


INPUT:- select * from admin.employee; OUTPUT:-

28

SOFTCOPY

29

MINIMUM HARWARE AND SOFTWARE REQUIREMENT


HARDWARE REQUIREMENT :
i. ii. iii. INTEL DUAL CORE PROCESSOR 1 GB RAM 40 GB HD

SOFTWARE REQUIREMENT:
i. ORACLE ii. iSQL *PLUS

30

BIBLIOGRAPHY
BOOKS:
RELATIONAL DATABASE MANAGEMENT CONCEPTS AND ORACLE (by IBM) SQL,PL/SQL[THE PROGRAMMING LANGUAGE OF ORACLE] (Written by IVAN BAYROSS) DATABASE MANAGEMENT SYSTEMS (written by RAMAKRISHNAN AND GEHRKE)

REFERENCE FROM TEACHER:


MR.KASHINATH ROY SIR (FACULTY MEMBER OF MONIBA COMPU ACADEMY) MR.SANJEEB SEN SIR (FACULTY MEMBER OF MONIBA COMPU ACADEMY) FACULTY MEMBERS OF INFORMATION TECHNOLOGY DEPARTMENT ( BENGAL COLLEGE OF ENGINEERING AND TECHNOLOGY )

REFERENCE FROM INTERNET:


www.google.com www.oracle.com www.java2s.com

31

REMARKS

32

You might also like