Question: The tables and relational model shown below are from a sport club program allowing customers to have periodic personal training with a coach for a

The tables and relational model shown below areThe tables and relational model shown below areThe tables and relational model shown below are

The tables and relational model shown below are from a sport club program allowing customers to have periodic personal training with a coach for a specific discipline. Information about coaches include their hired year, specialty discipline and their contract type which can be full or part time. Customers name, age and membership type is recorded in the database. Memberships allow customers to take a variety of classes. Three types of membership are available : 3-Months, 6-Months and Annual. Decide not to have a membership and just pay a class fee for each class session. Those customers are registered as having a Daily membership Information about each class session is recorded in the database, including the class name, its location and its duration. Duration are in minutes. The class name has a standard format which include the level of the class (Beginner, Intermediate or Advanced) followed by the name of the discipline taught. It is possible for customers to have their classes at the sport club facilities, registered as In-house, or at a remote location, registered as Outside. Coach CoachID Specialty HiredYear Contract 100 2016 Full time Gymnastics Swimming 101 2019 Part time 102 Swimming 2015 Full time 103 Tennis 2014 Full time 104 Boxing 2020 Part time Customer CustomerID Age Membership 3-Months 3001 22 CustName Pixie Wiggins Jorgie Sellers Johnnie Forrest 3002 31 6-Months 3003 34 Annual 3004 Taylah Ayers 27 3-Months 3005 Sharna George 26 Annual 3006 Vienna Harrell 30 3-Months 3007 Gurleen Barr 25 Daily 3008 Aria Villalobos 30 6-Months Classes ClassID Coachid Customer ClassName Location Duration SW0451 101 3003 In-house 60 T145 103 3001 Outside 45 T101 103 3003 Outside 60 B145 104 3007 Intermediate Swimming Beginner Tennis Intermediate Tennis Beginner Boxing Beginner Gymnastics Advanced Swimming Advanced Gymnastics In-house 30 GYM145 100 3002 In-house 30 SW0123 102 3002 In-house 60 GYM147 100 3008 Outside 90 Relational Model Coach CoachiD Specialty Hired Year Contract Classes ClassID CoachID CustomerID ClassName Location Duration Customer CustomerID CustName Age Membership Question 1 (10 pts): For each of the table displayed above, write the SQL statements that will create the table. Use the following information to define your data types: (Use the relational model to derive primary and foreign keys) Coachin (integer) Specialty (20 characters) HiredYear (integer) Contract (10 characters, only values Full time and Part time allowed) Customerin (integer) CustName (30 characters) Membership (20 characters) Age (integer) ClassID (10 characters) ClassName (30 characters) Location (10 characters, only values In-house and outside allowed) Duration (integer) The data values in the tables above are for example purpose only. You are not required to enter any values in the tables. Question 2 (6 pts, 2 pts each) : Write the SQL code allowing to perform the following operations : a. How would you add an attribute, Age, to the Coach table? b. How would you remove the Customer table? c. Add a new row of data about a coach with a coach ID of 200, being a specialist in Tennis, hired in 2015 on a full time contract

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!