Question: Lab 2 Relational Database defining tables, viewing the structure of the defined tables, and adding records into tables. The outline of the script file lists

Lab 2 Relational Database defining tables, viewing the structure of the defined tables, and adding records into
tables. The outline of the script file lists as follows:
Task 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.
Put your response below: ******/
/*****
Task 2: WRITE SQL statements to remove the tables from the database.
Put your response below:
??********
Task 3: Write SQL statements to define the above three tables in the database.
Put your response below:
**********?
??**********
Task 4: Write SQL statements to display the structure of the newly-built tables.
Put your response below:
************
??**********
Task 5: Write SQL statements to load records into the tables. Add one more
record with your own data.
Put your response below:
******/
Objectives: Write SQL statements to define a database, to define tables, to view the
table structures, to upload data into the tables
This is an individual lab. Each student has to complete all work required in the lab, and submit
all required materials exactly as specified in this assignment.
This lab is designed to let you have hands-on experience writing SQL statements. It includes
creating relations and loading data into each table. You have to use MySQL and a
text editor (i.e., notepad++, notepad) to complete this assignment. The Lab 2 manual provides a
good introduction to the basic features of SQL. After following the manual, you should be able
to complete this assignment. You may also wish to refer to Chapter 5 of the textbook.
You should use a text editor to type your SQL statements and save the file as a SQL script
file. An SQL script file is a text file that contains a sequence of SQL statements. "Lab2Ex.sql"
is an example of the SQL script file. The file extension of a SQL script file is typically with a
"sql" xtension. You may use the SOURCE command to run the whole script file (all SQL
commands) or copy and paste each SQL statement from the text editor to the MySQL
client. You will be required to prepare and submit a number of SQL scripts for this and future
labs.
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)Lab 2 Relational Database
Objectives: Write SQL statements to define a database, to define tables, to view the
table structures, to upload data into the tables
This is an individual lab. Each student has to complete all work required in the lab, and submit
all required materials exactly as specified in this assignment.
This lab is designed to let you have hands-on experience writing SQL statements. It includes
creating relations and loading data into each table. You have to use MySQL and a
text editor (i.e., notepad++, notepad) to complete this assignment. The Lab 2 manual provides a
good introduction to the basic features of SQL. After following the manual, you should be able
to complete this assignment. You may also wish to refer to Chapter 5 of the textbook.
You should use a text editor to type your SQL statements and save the file as a SQL script
file. An SQL script file is a text file that contains a sequence of SQL statements. "Lab2Ex.sql"
is an example of the SQL script file. The file extension of a SQL script file is typically with a
"sql" xtension. You may use the SOURCE command to run the whole script file (all SQL
commands) or copy and paste each SQL statement from the text editor to the MySQL
client. You will be required to prepare and submit a number of SQL scripts for this and future
labs.
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)
 Lab 2 Relational Database defining tables, viewing the structure of the

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!