databases question and need an explanation and answer to help me learn.
You are in charge of creating a small database for a store that sells goods so that it can keep track of its customers and their orders.
Write an SQL statement to create a customer table containing the following information:
Every customer has a unique ID, that should not be empty and set as the primary key
The customer’s first and last name that shouldn’t be empty
The phone number that shouldn’t be empty
The email, which could be empty.
The address, which could be empty.
Write a SQL statement to create the table Orders, which will keep track of customer orders, using the following information:
Each order has a unique ID, which shouldn’t be empty and should be set as the primary key.
The customer’s ID and should not be empty and assign it as the foreign key of the customer ID in table customer.
The Items purchased by the customer and shouldn’t be left empty.
The amount of each item, and should not be empty
The price of the items, and should not be empty
Answer the following questions by referring to the tables below.
Retrieve a list of all the courses under the “CS” department, listed alphabetically by course name.
Retrieve the section ID, course name, course number, semester, year, and Instructor of the courses taught by Instructor “Anderson”.
Insert a tuple for a new COURSE with the following information:
The course name is Computer networks, and the course number is CS3480. It belongs to the CS department and has a 4-hours credit.
Convert each ER into a relational schema mapping