Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create two tables named Customers (havingfields / columns Customer_No, First_Nam

ID: 3616529 • Letter: C

Question

Create two tables named Customers (havingfields / columns Customer_No, First_Name, Last_Name, and Address)and Order (having fields / `columns Order_No, Customer_No,OrderDate and PromisedDate). The relationship between thesetwo tables is one-to-many (i.e. a single Customer may have manyOrders; a single Order belongs to one and only one Customer). The code you use to create the tables must enforce uniquenessintegrity and referential integrity. Show the SQL code usedto create the tables.

Visit this link for particular data types you will use: http://msdn.microsoft.com/en-us/library/ms187752.aspx

Explanation / Answer

Create table Customers
======================
create table customers
(Customer_no integer PRIMARY KEY,
First_Name varchar(20),
Last_Name varchar(20),
Address varchar(50));

Create table Order
======================
create table Order
(Order_No integer PRIMARY KEY,
Customer_no references CUSTOMERS(Customer_no),
Order_Date date,
Promise_Date date);
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote