Question: * * * * Please write an sql script with the table provide * * * Objectives: Write SQL statements to define a database, to

****Please write an sql script with the table provide***
Objectives: Write SQL statements to define a database, to define tables, to view the table structures, to upload data into the tables
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" extension. 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.
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 and submit it to Blackboard by May 30 at 7:00 PM.Make sure your SQL file can be run successfully in MySQL before submitting it because I will run and grade it. If it cant be run, your grade of this assignment will be a ZERO.
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.
/*****
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: ******/
 ****Please write an sql script with the table provide*** Objectives: Write

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!