0% found this document useful (0 votes)
21 views13 pages

SQL Final Project Database Design

The document outlines the structure and details of a database for a sports and recreation facility, including tables for locations, staff, members, reservations, and various reports. It specifies the fields, data types, constraints, and rules governing the relationships between these tables. Additionally, it includes views for tracking active members, expired memberships, revenue, and equipment usage.

Uploaded by

tterblloyd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views13 pages

SQL Final Project Database Design

The document outlines the structure and details of a database for a sports and recreation facility, including tables for locations, staff, members, reservations, and various reports. It specifies the fields, data types, constraints, and rules governing the relationships between these tables. Additionally, it includes views for tracking active members, expired memberships, revenue, and equipment usage.

Uploaded by

tterblloyd
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Table Name Type

Location Data

Staff Data

Team Data

Member Data

Reservation Data

MembershipTier Validation

Payment Linking

Equipment Data

Tournament Data

IncidentReport Subset

MaintenanceCost Data

MembershipHistory Data
Description

Stores information about SCI locations, including address, hours of


operation, phone number, and general manager.

Contains details about SCI staff members, such as name, contact


information, hourly rate, team, and location.
Stores information about the different teams at SCI, including team
name and team leader.

Stores information about SCI members, including name, contact


information, birth date, membership details, and location.

Stores information about court and equipment reservations made by


members, including date, time, court type, and fee. This includes
information about group and private lessons.
Stores detailed information about each membership tier, such as the
number of included court reservations, additional fees, and any other
benefits.
Tracks individual payments made by members, including the location,
amount, date, and payment method.
Tracks the equipment available at each location, such as tennis rackets,
pickleball paddles, basketballs, etc.

Tracks tournaments hosted by SCI, including details like the type of


tournament, date, participants, and prize money.

Tracks incidents or accidents that occur at the facility, including details


like the date, time, location, and description of the incident.
Stores details like the location, date of the cost, the
amount spent, and a brief description of the
maintenance work performed.
Tracks changes in a member's membership status
over time. Records the start and end dates of each
membership period, along with the corresponding
membership tier.
Table Field Key Type Data Type
Location LocationID PK Numeric
Address Alphanumeric
HoursOfOperation Datetime
PhoneNumber Alphanumeric
GeneralManagerID FK Numeric
Staff StaffID PK Numeric
FirstName Alphanumeric
LastName Alphanumeric
Email Alphanumeric
PhoneNumber Alphanumeric
Salary Numeric
HourlyRate Numeric
TeamID FK Numeric
LocationID FK Numeric
Team TeamID PK Numeric
TeamName Alphanumeric
TeamLeaderID FK Numeric
LocationID FK Numeric
Description Text
CreatedDate Datetime
ModifiedDate Datetime
Member MemberID PK Numeric
FirstName Alphanumeric
LastName Alphanumeric
Address Alphanumeric
Email Alphanumeric
PhoneNumber Alphanumeric
BirthDate Datetime
MembershipStartDate Datetime
MembershipEndDate Datetime
MembershipTierID FK Numeric
LocationID FK Numeric
Reservation ReservationID PK Numeric
MemberID FK Numeric
LocationID FK Numeric
StartTime Datetime
EndTime Datetime
CourtType Alphanumeric
Fee Numeric
MembershipTier MembershipTierID PK Numeric
TierName Alphanumeric
MonthlyFee Numeric
IncludedCourtReservations Numeric
AdditionalReservationFee Numeric
Payment PaymentID PK Numeric
MemberID FK Numeric
PaymentDate Datetime
Amount Numeric
PaymentMethod Alphanumeric
Equipment EquipmentID PK Numeric
EquipmentType Alphanumeric
Quantity Numeric
LocationID FK Numeric
Tournament TournamentID PK Numeric
TournamentName Alphanumeric
TournamentDate Datetime
LocationID FK Numeric
IncidentReport IncidentReportID PK Numeric
IncidentDate Datetime
LocationID FK Numeric
Description Text
InvolvedParties Text
InjuryReport Text
ActionsTaken Text
MaintenanceCost MaintenanceCostID PK Numeric
LocationID FK Numeric
CostDate Datetime
CostAmount Numeric
Description Text
MembershipHistory HistoryID PK Numeric
MemberID Numeric
MembershipTierID FK Numeric
StartDate Datetime
EndDate Datetime
LocationID Numeric
Nullability
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Null
Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Null
Not Null
Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Null
Null
Null
Not Null
Not Null
Not Null
Not Null
Null
Not Null
Not Null
Not Null
Not Null
Not Null
Not Null
Rule Description

A member must have a valid membership tier assigned.


A reservation must be associated with an active
member.

A reservation must be associated with a valid location.

A staff member must be assigned to a team.

A staff member must be assigned to a location.

A member's membership cannot be renewed before the


current membership expires.
A member can only have one active membership at a
time.
Membership fees must be paid on time to avoid
suspension or cancellation.
A reservation cannot be made for a time slot that is
already booked.

A reservation can only be canceled within a certain


timeframe before the scheduled time.

Members with higher-tier memberships may have priority


access to court reservations.

Staff members must clock in and out for each shift.


Staff members must complete mandatory training and
certifications.
Staff members cannot work more than a certain number
of hours per week.
All financial transactions must be recorded accurately
and timely.
Payments must be processed within a specified
timeframe.
Discounts and promotions must be applied according to
the established guidelines.

Equipment must be regularly inspected and maintained.


Lost or damaged equipment must be reported
immediately.
Equipment inventory must be updated regularly to
ensure accurate records.
Type: Type:
Constraint Description
Application Database
Every member must have an active MembershipTierID referencing a X
valid row in the MembershipTier table.
Every reservation must have a valid MemberID referencing an active X
row in the Member table.
Every reservation must have a valid LocationID referencing an active X
row in the Location table.
Every staff member must have a valid TeamID referencing an active X
row in the Team table.
Every staff member must have a valid LocationID referencing an X
active row in the Location table.

A new membership start date for a member cannot be earlier than the X
end date of their current membership.
A member cannot have multiple memberships with overlapping start X
and end dates.
Payment records should indicate timely payments for each X
membership.
No two reservations can have overlapping start and end times for the X
same court and location.

A cancellation policy can be enforced through business logic or X


database triggers.
Priority can be implemented through business logic or database
triggers, considering the member's membership tier and available X
court slots.
Time and attendance records should be maintained for each staff X
member.
Training and certification records should be maintained for each staff X
member.
Time and attendance records should be monitored to enforce X
maximum weekly hours.

X
Payment records should be accurate and up-to-date.
Payment processing deadlines can be enforced through business logic X
or database triggers.
Discount and promotion rules can be implemented through business X
logic or database triggers.
Equipment maintenance records should be maintained, including X
inspection dates and maintenance details.

X
Incident reports should be filed for lost or damaged equipment.

X
Regular inventory checks should be performed and recorded.
Database: Database:
Tables/Fields Affected
Field Relationship
X
Member, MembershipTier

X
Reservation, Member

X
Reservation, Location

X
Staff, Team

X
Staff, Location

Member

X
Member

Payment, Member

X
Reservation

Reservation

Reservation, Member, MembershipTier

Staff

Staff

Staff

X
Payment

Payment

Payment, Member, MembershipTier

Equipment

IncidentReport

Equipment
View Name Type

ActiveMembers Data

ExpiredMemberships Data
PopularCourtTimes Aggregate
LowUtilizationTimes Aggregate

StaffSchedule Data

RevenueByMembershipTier Aggregate

RevenueByService Aggregate

IncidentReportSummary Aggregate

EquipmentUsage Aggregate

MemberUsage Aggregate
Description
Displays a list of all active members with their contact information and
membership details.

Displays a list of members whose memberships have expired.


Displays the most popular times for court reservations.
Displays time slots with low court utilization.
Displays the schedule of all staff members, including their assigned
shifts and tasks.

Displays the total revenue generated by each membership tier.

Displays the total revenue generated by different services (e.g., court


rentals, training sessions, merchandise sales).
Displays a summary of incident reports, including the number of
incidents by location and type.
Displays the usage of different equipment items, including rental
frequency and maintenance history.

Displays the usage patterns of members, including their frequency of


visits, preferred activities, and spending habits.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy