Question: 1. (20 pts) Write the create table statements for the following ERD. Make sure to have the primary key and foreign key constraints. ssn

1. (20 pts) Write the create table statements for the following ERD. Make sure to have the primary key and 

1. (20 pts) Write the create table statements for the following ERD. Make sure to have the primary key and foreign key constraints. ssn Employees name lot Worksin since did Departments dname a. List all the unique product vendors. b. List all the customer names in the state of California. 2. (10 pts) Insert 5 records into each table of question 1. 3. Download the sample database from http://www.mysqltutorial.org/mysql-sample-database.aspx. An ER diagram is available on this page as well. Load the data into MySQL and write queries for the following questions. 4. (20 pts) Simple Queries: Write the SQL queries on one table budget c. Calculate the average credit limit for all the customer in California. d. For each customer, list the total number of orders in 2005. e. List all the product name who quantityInStock is less than 200.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

1 Create Table Statements sql CREATE TABLE Employees ssn INT PRIMARY KEY name VARCHAR255 NOT NULL CR... View full answer

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!