Question: Consider the following database schema for student organizations. Students ( ID , fName, lName, phone, dateOFBirth ) Clubs ( ID , title, establishedDate ) Note

Consider the following database schema for student organizations.
Students(ID, fName, lName, phone, dateOFBirth)
Clubs(ID, title, establishedDate)
Note that table Clubs has two candidate keys: ID and title. One is
implemented as the PRIMARY KEY, and the other is a UNIQUE KEY.
MemberOf(studentID, clubID, joinedDate)
Your task is to write SQL statements to define tables for the corresponding relations. Make sure
that the data type and size for each attribute are appropriate. For example, DATE data type is a
better choice than a string data type for the attribute joinedDate. In addition, you have to write
SQL statements to load data into each table based on the given records. Put your SQL
statements into a text editor (i.e., Notepad++) and save it as a SQL script file.
Tasks:
1. Write a SQL statement to select the database with your last name to store the
data. If it does not exist in your MySQL server, use CREATE DATABASE
command to create one.
2. WRITE SQL statements to remove the tables from the database.
3. Write SQL statements to define the above three tables in the database.
4. Write SQL statements to display the structure of the newly-built tables.
5. Write SQL statements to load records into the tables. Add one more record
with your own data.
 Consider the following database schema for student organizations. Students(ID, fName, lName,

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 Databases Questions!