Theme_Park_Management_Presentation
-
Upload
karthigeyan-sekar -
Category
Documents
-
view
22 -
download
0
Transcript of Theme_Park_Management_Presentation
![Page 1: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/1.jpg)
FUNTASTIC THEME PARK
DATABASE DESIGN AND IMPLEMENTATION TERM PROJECT
INFS 6610
![Page 2: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/2.jpg)
Team Members:
Devi Sivasankar
Janani Narasimhan
Karthigeyan Sekar
Santhosh Kumar Thangarathinam
Team Name: DeJaKaSa
Team number: 3
![Page 3: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/3.jpg)
Introduction
Funtastic Theme Park was established in January 1, 2001.
Started with 30 employees.
Currently there are 222 employees.
( 32 Part-time employees and 190 Full-time employees).
Till few years back, they had been using a manual system for their operations. (ticket
issue, diner orders, etc.)
Ever-increasing expansion plans has necessitated the need for an automated system.
They are in need of an effective software system which would manage their day-to-day
activities.
They have consulted DeJaKaSa team for the database development.
![Page 4: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/4.jpg)
The following are the requirements of the Theme Park system in development:
Requirements Analysis
Ticket Issuing Modules:
Entrance Ticket Issue Module
Video Game Token Issue Module
Parking Lot Ticket Issue Module
Reports and Analytics Modules:
Rides and Shows Usage Module
Video Game Arcade Usage Module
Diner Sales Module
Employee Management Modules:
Employee Salary Module
Employee Information Module
Food Court Modules:
Diners Food Ordering Module
![Page 5: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/5.jpg)
Entities Identified
Some of the entities that were identified initially are as follows:
EmployeesRides and
showsVideo Game
Arcade
Diners Parking Lot Ticket Issue
Token Issue VGA Usage Ride Usage
![Page 6: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/6.jpg)
ER Diagram
![Page 7: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/7.jpg)
Business Rules
The theme park database that we have designed takes the following business
rules into consideration:
For each TransactionID, many ticket numbers are generated (adults + children + seniors
per transaction).
The term “GEMS” refer to the coupons won by the customers in any video game.
![Page 8: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/8.jpg)
Ride categories must be either:
FR - Flat Rides
RC - Roller Coasters
TR - Train Rides
WR - Water Rides
S - Shows
DR - Dark Rides
FW - Ferris Wheels
PR - Pendulum Rides
Business Rules contd.
Attraction Type must be either:
RS - Rides / Shows
VGA - Video Game Arcade
D - Diners
Employee Type must be either:
PT - Part Time
FT - Full Time
Schedule for PT employees
must be either:
MWFS - Mon, Wed, Fri, Sun
TTSS - Tues, Thurs, Sat, Sun
Work Type for FT employees must
be either:
ROP - Ride Operator (Work under
manager Newzee)
R - Receptionist (Work under
manager Devi)
C - Caterer (Work under
manager Dinesh)
![Page 9: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/9.jpg)
Some Ride
Categories
Water Rides (WR)
Roller Coasters (RC)Ferris Wheels (FW)
Train Rides (TR)Pendulum Rides
(WR)
![Page 10: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/10.jpg)
Business Rules contd.
An OrderID may contain multiple Orders. Each caterer is linked to one Diner.
The Diner at which a particular order is made is identified using the EmpID who takes
the order.
If ManagerID is NULL, he / she is in some high post in the organizational hierarchy
(CEO, Vice President, etc.)
PART-TIME EMPLOYEES:
Schedule: MWFS,TTSS (’S’ in both the schedule refers to Sunday, since it is
assumed to be crowded).
Wage / Hour : $10
Max hours / day : 8 hrs
Salary is calculated for 1 month and displayed (instead of weekly wages).
FULL-TIME EMPLOYEES:
Salary / day : $100.00 for ROP, $90.00 for R, $85.00 for C
Full time Employees are only allocated in the following positions in the Theme park:
1.Ride Operators 2. Receptionist 3. Caterer (Dining)
![Page 11: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/11.jpg)
Business Rules contd.
PRICING:
There is no extra charge for the rides and shows (included in the entrance ticket).
Customers can use all the rides, ‘N’ number of times. There is no limit.
VGA Tokens: $0.5 per token
Entrance ticket: Adult: $70.00
Child: $10.00
Senior: $35.00
Senior Citizens should prove their age by showing an ID proof.
![Page 12: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/12.jpg)
TABLES
Employees PartTimeEmployees (PT)FullTimeEmployees (FT)
RideOperator Receptionist
CatererGeneralization (Super class)
Specialization 1 (Sub class 1)
Specialization 2 (Sub class 2)
![Page 13: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/13.jpg)
AttractionsRideShows (RS)
VideoGameArcade (VGA)
Generalization (Super class)
Specialization (Sub class)
Diners (D) RideCategory
DinerMenu DinerOrders RideUsage
TABLES contd.
![Page 14: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/14.jpg)
TABLES contd.
TicketPurchaseTransaction CustomerTicketNumbers
VGATokenIssue VGAUsage
The tables are in 3NF because there is no Partial Dependency
and there is no Transitive Dependency in any of the tables.
![Page 15: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/15.jpg)
Stored Procedure
Name: Generate Attendance
Purpose: To randomly generate number of hours worked, by the Part Time
employees, in order to calculate monthly salary for them, for a random month,
which is also generated by a trigger and given as input to this SP.
Input: Month (generated randomly from a trigger) and Year (=2015).
Output: Hours worked
Working: After this procedure is executed, a trigger to set the values of
HoursWorked and Salary fields in Part Time employee table needs to be
executed.
When a new record is inserted into the PartTimeEmployees table, the
HoursWorked and Salary are set randomly based on this SP and the Trigger
associated with it.
![Page 16: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/16.jpg)
Trigger 1
Name: AttendanceSalaryPTEmps (After Insert Trigger)
Purpose: To use the output of the previous stored procedure to calculate salary for
each PT employees and to update the inserted records with the new values.
Working: After the SP is run, this trigger gets fired for each new record inserted
into PartTimeEmployees table. The default values of HoursWorked and Salary
are NULL in the insert into statements. It is then updated by this trigger.
Before executing the SP and Trigger After executing the SP and Trigger
![Page 17: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/17.jpg)
Trigger 2
Name: InsertTicketNumbersForTransaction (After Insert Trigger)
Purpose: When a family comes into the theme park, only one person in the family
purchases the tickets for the whole family. So, for each transaction, there will be
one transactionID. But we need individual Ticket Numbers to track the activities of
each individual.
Working: For each TransactionID in the TicketPurchaseTransaction table, more
than one TicketID has to be generated in the CustomerTicketNumbers table. This
trigger does that insertion for each entry of TransactionID, thus generating unique
TicketID for each customer.
TicketPurchaseTransaction
CustomerTicketNumbers
![Page 18: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/18.jpg)
Trigger 3
Name: InsertFullTimeEmp (After Insert Trigger)
Purpose: To avoid inserting records manually into the FullTimeEmployees table,
when a new employee is added into the Employees table.
Working: As per the managers assigned to the Employees, they are inserted into the
FullTimeEmployees table with appropriate WorkType after executing this trigger.
Initial set of Employees and FT employeesAfter inserting new Employees into
Employees table alone.
![Page 19: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/19.jpg)
Trigger 4
Name: RideUsageDateChange (After Insert Trigger)
Purpose: To set the Date in RideUsage table to the same Date that the customer
checks-in, using their TicketID.
Working: The trigger updates the Default GetDate() value to the date that the
customer gets the entrance ticket in the theme park.
Before executing the trigger After executing the trigger
![Page 20: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/20.jpg)
Trigger 5
Name: InsertRideShow (INSTEAD OF Trigger)
Purpose: Allows the user to insert new Rides and Shows and automatically
inserting those new records into the Superclass tables. (even though there will be
foreign key clashes)
Working: Attractions and RideOperator tables have foreign keys pointing to
RideShows table. After executing the trigger, new records can be directly inserted
into RideShows table instead of inserting it into Attractions table first, then into
RideOperator table and finally into RideShows table.
Before executing the trigger After executing the trigger
![Page 21: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/21.jpg)
Trigger 5 contd.
Before executing the trigger After executing the trigger
![Page 22: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/22.jpg)
Webpage Screenshots
![Page 23: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/23.jpg)
Webpage Screenshots contd.
![Page 24: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/24.jpg)
Query for Ride Usage Report
CREATE VIEW RideUsageStats AS
SELECT
CASE WHEN Attractions.AttrType='RS' THEN 'Rides and Shows'
END AS AttractionType,
RideCategory.CategoryName,
RideShows.RSName,
RideShows.EmpID AS [RideOperatorID],
COUNT (RideUsage.TicketID) AS Usage ,
DATEPART (yyyy, RideUsage.Date) AS Year,
DATEPART (qq,RideUsage.Date) AS Qtr
FROM Attractions INNER JOIN RideShows
ON Attractions.AttrID=RideShows.RSID
INNER JOIN RideCategory
ON RideShows.RideCategory=RideCategory.RideCategory
INNER JOIN RideUsage
ON RideUsage.RSID=Attractions.AttrID
GROUP BY
Attractions.AttrType,RideCategory.CategoryName,RideShows.RSName,
RideShows.EmpID,
DATEPART (yyyy, RideUsage.Date), DATEPART (qq,RideUsage.Date);
![Page 25: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/25.jpg)
Webpage Screenshots contd.
![Page 26: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/26.jpg)
CREATE VIEW DinerSales AS
(SELECT
CASE WHEN Attractions.AttrType='D' THEN 'Diners'
END AS AttractionType,
Diners.DinerName,
DinerMenu.ItemName,
(DinerOrders.Qty * DinerMenu.Price) AS Sales,
DATEPART (yyyy, DinerOrders.Date) AS Year,
DATEPART (qq,DinerOrders.Date) AS Qtr
FROM Attractions INNER JOIN Diners
ON Attractions.AttrID=Diners.DinerID
INNER JOIN DinerMenu
ON DinerMenu.DinerID=Diners.DinerID
INNER JOIN DinerOrders
ON DinerOrders.ItemID=DinerMenu.ItemID);
Query for Diner Sales Report
![Page 27: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/27.jpg)
Webpage Screenshots contd.
Initial
Display
Inserting
New Record
Edited
Display
New Record
Display
![Page 28: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/28.jpg)
Introduction
Initial
Display
Inserting
New Record
Edited
Display
New Record
Display
Webpage Screenshots contd.
![Page 29: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/29.jpg)
IntroductionWebpage Screenshots contd.
CREATE VIEW VGAUsageStats AS
( SELECT VGName, SUM (GemsWon) GemsWon, SUM (TokensUsed) AS
TokensUsed
FROM VGAUsage vu INNER JOIN VideoGameArcade vga
ON vu.VGID=vga.VGID
GROUP BY VGName);
![Page 30: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/30.jpg)
Inserting
New Record
New Record
Display
Webpage Screenshots contd.
![Page 31: Theme_Park_Management_Presentation](https://reader035.fdocuments.us/reader035/viewer/2022062420/55cc0629bb61eb27288b45df/html5/thumbnails/31.jpg)