Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Install MySQL in your computer. Give the CREATE TABLE statements to create the CLYSTMS Database. The CREATE TABLE statements for the tables Coach and LevelHistory

Install MySQL in your computer. Give the CREATE TABLE statements to create the CLYSTMS Database. The CREATE TABLE statements for the tables Coach and LevelHistory are provided below for you. We need all of the tables. You can use MySQL from oracle or XAMPP. So far I already have this:

DROP TABLE IF EXISTS Coach;

CREATE TABLE Coach( CoachId INT UNSIGNED AUTO_INCREMENT, LName VARCHAR(30) NOT NULL, FName VARCHAR(30) NOT NULL, Phone VARCHAR(12) NOT NULL, EMail VARCHAR(60) NOT NULL, CONSTRAINT Coach_pk PRIMARY KEY(CoachId) ); CREATE TABLE LevelHistory( LH_Id INT UNSIGNED AUTO_INCREMENT, SwimmerId INT UNSIGNED NOT NULL, LevelId INT UNSIGNED NOT NULL, StartDate DATE NOT NULL, Comment VARCHAR(250), CONSTRAINT levelhistory_pk PRIMARY KEY(LH_Id), CONSTRAINT levelhistory_ck_1 UNIQUE(SwimmerId, LevelId), CONSTRAINT levelhistory_swimmer_fk FOREIGN KEY(SwimmerId) REFERENCES Swimmer(SwimmerId), CONSTRAINT levelhistory_level_fk FOREIGN KEY(LevelId) REFERENCES Level(LevelId) );

image text in transcribed

image text in transcribed

1 Swimmer (Swimmerld. FName. LName. Phone. Email. JoinTime. CurrentLevelld. Main CT ld Main CT Since Candidate Keys [1]Swimmerld [1] Ma CT Id references CareTaker(CT ld). [21 Current d references Foreign Keys Level(Levelld) Nullable Attributes [1] The relationship "Main Caretaker" is implemented as two attributes Notes Main CT Id and Main CT Since. It is also acceptable to use a separate relation to implement the relationship. [2] CurrentLevelld is a derived column that can be obtained from the table LevelHistory 2 Caretaker(CT ld. FName, LName, Phone, Emai CT Candidate Keys Foreign Keys Nullable Attributes Notes 3 OtherCaretakerCOC ld. Swimmerld. CT ld. Since) Candidate Keys 1l OC ld. 121 iswimmerld. CT ldh Foreign Keys Nullable Attributes Notes [1] A surrogate key, OC ld, is created as the primary key. This is optional. Level Leveld, Level, Description [1] Levelld, [2] Level Candidate Keys Foreign Keys Nullable Attributes Possibly Description, depending on assumptions made Notes 5 Leve Hist dd, Swimmerld. Levelld. StartDate. Comment Candidate Keys TETLH ld, [2] Swimmerid Leveld [1] Swimmerld references Swimmer (Swimmerld), 2 Level ld references Foreign Keys Level(Levelld) Nullable Attributes Comment Notes 1) Asurrogate key. LH ld is created as the primary key. This is optional 6 Coach Coachld FName, LName, Phone, Email) Candidate Keys (1) Coachld Foreign Keys Nullable Attributes Notes 7 Meet (MeetID, Title. Date, StartTime. EndTIme, Venueld, Coachld)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started