Project Report Group8
Project Report Group8
Contents Page
1. Introduction…………………………………………………... 2
2. Scenario Description ……………………………………….... 2
3. USECASE……………………………………………………..3
4. ACTIVITY……………………………………………………4
5. CLASS………………………………………………………….5
6. ER Diagram …………………………………………………. 6
7. Normalization………………………………………………… 7- 10
8. Schema Diagram………………………………………………11
9. Table Creation…………………………………………………12-19
10. Data Insertion………………………………………………….21-
26
11. Query Writing…………………………………………………30-
34
12. Relational Algebra……………………………………………. 35
13. Conclusion………………………………………………37
2
Introduction:
Our project is to create a luxury resort management system, which will streamline
the resort management process, provide excellent customer service, and enhance
the overall guest experience. The system will be built using C# .NET framework
and Oracle 10g database, which will ensure optimal performance and scalability.
Overview:
The luxury resort management system will consist of several modules that work
together to manage different aspects of the resort's operations. Some of the main
modules include reservation management, guest check-in and check-out, room
and inventory management, billing and payment processing, and reporting.
The reservation management module will allow guests to book their stay online,
and resort staff will be able to manage reservations and room assignments. The
guest check-in and check-out module will streamline the check-in and check-out
process, reducing wait times and improving the guest experience.
The room and inventory management module will allow staff to manage room
availability, inventory, and maintenance schedules, ensuring that all rooms are
clean, well-maintained, and ready for guest occupancy.
The billing and payment processing module will allow staff to manage guest
billing, payment processing, and refunds, reducing errors and improving
financial management.
Finally, the reporting module will provide resort management with detailed
reports on occupancy rates, revenue, and other key metrics, allowing them to
make informed business decisions.
Overall, our luxury resort management system will improve the guest experience,
streamline operations, and improve financial management. By leveraging the
power of C# .NET framework and Oracle 10g database, we can create a robust
and scalable system that meets the needs of any luxury resort.
3
Activity diagram:
5
Class diagram:
6
Normalization
1. CONSISTS OF: (FNID, FNAME, FEMAIL, FPHONE, NID, NAME, PHONE, EMAIL)
5. MAINTAINED BY: (ROOM_NO, R_SIZE, R_PRICE, STAFF_ID, PHONE, HIREDATE, POSITION, SHIFT,
SALARY, NAME, EMAIL, SADDRESS)
1NF- NO MULTIVALUED ATTRIBUTE
2NF- ROOM_NO, R_SIZE, R_PRICE
STAFF_ID, PHONE, HIREDATE, POSITION, SHIFT, SALARY, NAME, EMAIL, SADDRESS
3NF- TRANSITIVE DEPENDENCY EXISTS FOR SADDRESS
ROOM_NO, R_SIZE, R_PRICE
STAFF_ID, PHONE, HIREDATE, POSITION, SHIFT, SALARY, NAME, EMAIL
SADDRESS_ID, COUNTRY, CITY, ZIPCODE
FINAL TABLE FOR MAINTAINED BY:
15. ROOM_NO, R_SIZE, R_PRICE
16. STAFF_ID, PHONE, HIREDATE, POSITION, SHIFT, SALARY, NAME, EMAIL
17. SADDRESS_ID, COUNTRY, CITY, ZIPCODE
18. RS_ID, ROOM_NO, STAFF_ID
FINAL TABLES:
Schema Diagram
12
Table Creation
1.FOUNDER TABLE
CREATE TABLE FOUNDER
PRIMARY KEY(FNID)
);
2. FOUNDER_CONTACT table
CREATE TABLE FOUNDER_CONTACT (
);
3. OWNERS table
CREATE TABLE OWNERS (
PRIMARY KEY(NID)
);
Alter table OWNERS add constraint fk1 FOREIGN KEY (FNID) REFERENCES FOUNDER (FNID);
Alter table OWNERS add constraint fk2 FOREIGN KEY (TRADE_LICENSE) REFERENCES
LUXURY_RESORT (TRADE_LICENSE);
);
PRIMARY KEY(TRADE_LICENSE)
);
PRIMARY KEY(ROOM_NO)
);
Alter table ROOMS add constraint fk3 FOREIGN KEY (TRADE_LICENSE) REFERENCES LUXURY_RESORT
(TRADE_LICENSE);
15
PRIMARY KEY(TRANSACTION_ID)
);
);
16
PRIMARY KEY(STAFF_ID)
);
);
17
);
PRIMARY KEY(GR_ID)
);
ALTER TABLE BOOKING ADD CONSTRAINT fk4 FOREIGN KEY (ROOM_NO) REFERENCES
ROOMS(ROOM_NO);
18
Alter table BOOKING add constraint fk5 FOREIGN KEY (TRANSACTION_ID) REFERENCES GUESTS
(TRANSACTION_ID);
PRIMARY KEY(RS_ID)
);
Alter table ROOM_MANAGEMENT add constraint fk6 FOREIGN KEY (ROOM_NO) REFERENCES
ROOMS(ROOM_NO);
Alter table ROOM_MANAGEMENT add constraint fk7 FOREIGN KEY (STAFF_ID) REFERENCES
STAFF(STAFF_ID);
PRIMARY KEY(SG_ID)
);
Alter table GUEST_MANAGEMENT add constraint fk8 FOREIGN KEY (TRANSACTION_ID) REFERENCES
GUESTS (TRANSACTION_ID);
Alter table GUEST_MANAGEMENT add constraint fk9 FOREIGN KEY (STAFF_ID) REFERENCES STAFF
(STAFF_ID);
SEQUENCES
FOR FOUNDER
create sequence F_id
increment by 1
start with 202101
nocache
nocycle
FOR FOUNDER_CONTACT
create sequence FC_id
increment by 1
start with 202101
20
nocache
nocycle
FOR OWNERS
create sequence O_id
increment by 1
start with 202101
nocache
nocycle
FOR OWNERS_contact
create sequence Oc_id
increment by 1
start with 202101
nocache
nocycle
FOR ROOMS
create sequence R_id
increment by 1
start with 001
nocache
nocycle
FOR GUESTS
create sequence G_id
increment by 1
start with 1
nocache
nocycle
FOR TRANSACTION_INFO
create sequence tsc_id
increment by 1
start with 1
nocache
nocycle
FOR STAFF
create sequence S_id
increment by 1
start with 1
nocache
21
nocycle
FOR STAFF_ADDRESS_INFO
create sequence SA_id
increment by 1
start with 1
nocache
nocycle
FOR BOOKING
create sequence B_id
increment by 1
start with 1
nocache
nocycle
FOR ROOM_MANAGEMENT
create sequence RM_id
increment by 1
start with 1
nocache
nocycle
FOR GUEST_MANAGEMENT
create sequence GM_id
increment by 1
start with 1
nocache
nocycle
INSERTION
INSERT INTO OWNERS (NID, NAME, EMAIL, FNID, TRADE_LICENSE) VALUES (O_id.NEXTVAL,
'John Doe', '[email protected]', 2, 'ABC123');
INSERT INTO OWNERS (NID, NAME, EMAIL, FNID, TRADE_LICENSE) VALUES (O_id.NEXTVAL,
'Jane Smith', '[email protected]', 1, 'DEF456');
INSERT INTO OWNERS (NID, NAME, EMAIL, FNID, TRADE_LICENSE) VALUES (O_id.NEXTVAL,
'Bob Johnson', '[email protected]', 3, 'GHI789');
INSERT INTO OWNERS (NID, NAME, EMAIL, FNID, TRADE_LICENSE) VALUES (O_id.NEXTVAL,
'Sara Lee', '[email protected]', 2, 'JKL012');
INSERT INTO OWNERS (NID, NAME, EMAIL, FNID, TRADE_LICENSE) VALUES (O_id.NEXTVAL,
'Mike Jones', '[email protected]', 1, 'MNO345');
INSERT INTO STAFF (STAFF_ID, NAME, EMAIL, PHONE, HIREDATE, POSITION, SHIFT, SALARY)
VALUES (S_id.NEXTVAL, 'John Smith', '[email protected]', 1234567890, TO_DATE
('2022-01-01', 'YYYY-MM-DD'), 'Front Desk Receptionist', 'Day', '20000');
INSERT INTO STAFF (STAFF_ID, NAME, EMAIL, PHONE, HIREDATE, POSITION, SHIFT, SALARY)
VALUES (S_id.NEXTVAL, 'Jane Doe', '[email protected]', 2345678901, TO_DATE('2022-
02-01', 'YYYY-MM-DD'), 'Housekeeping', 'Evening', '18000');
INSERT INTO STAFF (STAFF_ID, NAME, EMAIL, PHONE, HIREDATE, POSITION, SHIFT, SALARY)
VALUES (S_id.NEXTVAL, 'David Lee', '[email protected]', 3456789012, TO_DATE('2022-
01-15', 'YYYY-MM-DD'), 'Restaurant Server', 'Morning', '25000');
INSERT INTO STAFF (STAFF_ID, NAME, EMAIL, PHONE, HIREDATE, POSITION, SHIFT, SALARY)
VALUES (S_id.NEXTVAL, 'Emily Chen', '[email protected]', 4567890123,
TO_DATE('2022-03-01', 'YYYY-MM-DD'), 'Spa Therapist', 'Afternoon', '23000');
INSERT INTO STAFF (STAFF_ID, NAME, EMAIL, PHONE, HIREDATE, POSITION, SHIFT, SALARY)
VALUES (S_id.NEXTVAL, 'Michael Kim', '[email protected]', 5678901234,
TO_DATE('2022-02-15', 'YYYY-MM-DD'), 'Pool Attendant', 'Morning', '$21000');
SCREENSHOTS OF TABLES
27
28
INDEX
FOR FOUNDER
CREATE INDEX f_idx
ON FOUNDER (FNAME,FEMAIL );
FOR FOUNDER_CONTACT
create INDEX FC_idx
ON FOUNDER_CONTACT (FPHONE );
FOR OWNERS
29
FOR OWNERS_contact
create INDEX Oc_idX
ON OWNERS_CONTACT (PHONE );
FOR ROOMS
create INDEX R_idX
ON ROOMS(R_SIZE, R_PRICE);
FOR GUESTS
create INDEX G_id
ON GUESTS (EMAIL, PHONE);
FOR TRANSACTION_INFO
create INDEX tsc_idX
ON TRANSACTION_INFO (CARD);
FOR STAFF
create INDEX S_idx
ON STAFF (HIREDATE,POSITION);
FOR STAFF_ADDRESS_INFO
create INDEX SA_idX
ON STAFF_ADDRESS_INFO (COUNTRY, CITY);
FOR BOOKING
create INDEX B_idX
ON BOOKING (ROOM_NO)
FOR ROOM_MANAGEMENT
create INDEX RM_idX
ON ROOM_MANAGEMENT (ROOM_NO)
FOR GUEST_MANAGEMENT
create INDEX GM_idX
ON GUEST_MANAGEMENT (STAFF_ID)
30
QUERY WRITING
single row function
1 . What is the length of the founder's email address for founder with FNID 3?
SELECT LENGTH(FEMAIL)
FROM FOUNDER
WHERE FNID = 3;
2 . What is the uppercase version of the location of the luxury resort with trade license
ABC123?
SELECT UPPER(LOCATION)
FROM LUXURY_RESORT
WHERE TRADE_LICENSE = 'ABC123';
3. What is the concatenation of the founder's name and email address for the founder
with FNID 1?
group function
2. How many guests have made transactions at the luxury resort "DEF456"?
subquery
1. What is the average price of rooms at the luxury resort located in "Miami"?
SELECT AVG(R_PRICE)
FROM ROOMS
WHERE TRADE_LICENSE IN (
SELECT TRADE_LICENSE
FROM LUXURY_RESORT
WHERE LOCATION = 'Miami'
);
2. Find all guests who have booked a room managed by a staff member with a salary
greater than $50,000.
3. Find all guests who have booked a room in a luxury resort that opened before 2022:
Joining
1. Return the name, email, and phone number of all the guests who have made a
transaction using a particular card.
2. Return the name, email, and phone number of all the staff members who work the
evening shift.
FROM STAFF S
WHERE S.SHIFT = 'Evening';
3. Return the name and email of all the guests who have booked a room at the luxury
resort in Hawaii.
view
1. Create a view that shows the names and contact information of all the resort owners
along with the location and trade license of their respective resorts.
2. Create a view that shows the room numbers, sizes, prices, and the location of the
resorts where those rooms are located.
3. Create a view that shows the room numbers, sizes, and prices of all the available
rooms (i.e., those not booked by any guest).
USERS CREATED
GRANT update,select
ON GUEST;
GRANT CREATE SESSION, CREATE TABLE, CREATE SEQUENCE, CREATE VIEW, CREATE
PROCEDURE TO OWNER;
GRANT CREATE TABLE, CREATE SEQUENCE, CREATE VIEW, CREATE PROCEDURE TO STAFF;
RELATIONAL ALGEBRA
1.List the names and email addresses of all the staff members who were hired before
January 1, 2022, and earn a salary greater than 50,000.
2.Find the transaction IDs of all guests who used a credit card for payment.
π TRANSACTION_ID(TRANSACTION_INFO)
3.List the names of all luxury resorts that opened after December 31, 2019.
4.Find the phone numbers of all founders and owners associated with a luxury resort.
π FPHONE(FOUNDER_CONTACT) ⋈ π FPHONE(OWNERS_CONTACT) ⋈ π
TRADE_LICENSE(σ LOCATION = 'luxury resort name'(LUXURY_RESORT))
5.Find the transaction IDs and phone numbers of all guests who stayed in rooms larger
than 500 sq. ft. and paid a price greater than 200 per night.
Conclusion:
The project aims to create a luxury resort management system using C# .NET
framework and Oracle 10g database to streamline operations, improve the guest
experience, and enhance financial management.
The system will consist of modules for reservation management, guest check-in and
check-out, room and inventory management, billing and payment processing, and
reporting. It will also prioritize security and compliance with regulations such as
GDPR and CCPA.
37
To improve the existing project for the final term, the team could focus on further
improving the user experience of the system, such as enhancing the reservation
process, adding more payment options, and integrating with other tools used by the
resort. Additionally, the team could explore adding features such as a loyalty program
or mobile app to further enhance the guest experience.
Another area of improvement could be in the reporting module, where the team could
add more metrics and analytics to provide deeper insights into the resort's operations
and performance.
Overall, the team could prioritize testing and quality assurance to ensure that the
system is reliable and scalable and focus on continuous improvement through user
feedback and data analysis.