Question: Your job now is to test and validate your data model with test data Muscles Gym has contacted you about creating a database and mobile
Your job now is to test and validate your data model with test data
Muscles Gym has contacted you about creating a database and mobile application to enable guests of their Gym to create appointments with their personal trainers. During your interview the following information came up. Personal trainers are available to the gym on certain days of the week. It could be just a few days or it could be every day. Each trainer has their own schedule that they make available to the Gym this schedule should not change week over week. Trainers can take an appointment from customers with a duration of 30 minutes or 60 minutes. Customers of the Gym should be allowed to book any personal trainer as long as the trainer doesnt have a previous appointment and the trainer is available on the scheduled day and time. Once a customer books an appointment an email and text message should be delivered to the personal trainer. Prior to the personal training appointment, a text message and email should be delivered to the customer. One last consideration the Gym manager asked us to allow for is a vacation schedule for the instructors. Instructors routinely take vacation or personal time and during this time they should not be allowed to book the trainer.
Create sql insert statements to put 5 trainers in the system
Give each trainer a week schedule, make sure one trainer works one day a week, one trainer three days a week and one trainer 5 days a week. You can assign the other two trainers as you see fit
Give 2 of the trainers a vacation schedule 1 for 1 week and another for 2 days
Put 5 customers in the customer table
Give your five customers appointments with the trainers. Be sure to make sure two of the customers have at least 4 appointments in the database
Create a query to show all the trainers in the system. That query should include their name, cell phone and email
Create a query to show all the customers in the system. That query should include their name, cell phone and email
Create a join query that will show the trainer name and weekly schedule include day of week, start time and length of time available in hours
Create a join query that will show the customers name, appointment day and time, trainer and length of session.
Create a join query that will show the trainers with open appointment. Include trainer name, appointment day of week and available time.
Submit your written data model and hand written SQL to this folder.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
