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

7.7 Write and run an SQL CREATE TABLE statement to create the CUSTOMER_01 table.

ID: 3576687 • Letter: 7

Question

7.7 Write and run an SQL CREATE TABLE statement to create the CUSTOMER_01 table.

7.8 Write and run an SQL CREATE TABLE statement to create the CUSTOMER_02 table.

7.9 Are there any significant differences between the CUSTOMER_01 and CUSTOMER_02 tables? If so, what are they?

7.10 Write and run an SQL CREATE TABLE statement to create the CUSTOMER_03 table.

7.11 Are there any significant differences between the CUSTOMER_02 and CUSTOMER_03 tables? If so, what are they?

Column Characteristic for Customer 01 Column Name Type Ky Required Remarks Email Address Varchar (100) Primary Key Yes LastName Varchar (25) No Varchar (25) No FirstName Column Characteristic For Customer 02, Customer 03 Column Name Type Required Remarks Customer ID Integer Surrogate Key: Primary Key Yes Initial Value -1 Increment -1 Ys EmailAddress Varchar (1000 No Ys Varchar (25) No LastName Ys Varchar (25) No FirstName Data for Customer 01 LastName FirstName Email Address Robert Shire@somewhere.com Shire Robert Katherine Goodyear asomewhere.com Goodyear Katherine Chris Chris Bancroft@somewhere.com Bancroft

Explanation / Answer

7.7 Write and run an SQL CREATE TABLE statement to create the CUSTOMER_01 table.

CREATE TABLE CUSTOMER_01(
EmailAddress VARCHAR (100) NOT NULL,
LastName VARCHAR (25) NOT NULL,
FirstName VARCHAR (25) NOT NULL,
PRIMARY KEY (EmailAddress)
);


7.8 Write and run an SQL CREATE TABLE statement to create the CUSTOMER_02 table.

CREATE TABLE CUSTOMER_02(
CustomerID INT NOT NULL,
EmailAddress VARCHAR (100) NOT NULL,
LastName VARCHAR (25) NOT NULL,
FirstName VARCHAR (25) NOT NULL,
PRIMARY KEY (CustomerID)
);

7.9 Are there any significant differences between the CUSTOMER_01 and CUSTOMER_02 tables? If so, what are they?

CUSTOMER_02 has one more column named CustomerID with type as Integer and for this table, primary key is CustomerID whereas for CUSTOMER_01 table the primary key is EmailAddress.

7.10 Write and run an SQL CREATE TABLE statement to create the CUSTOMER_03 table.

CREATE TABLE CUSTOMER_03(
CustomerID INT NOT NULL,
EmailAddress VARCHAR (100) NOT NULL,
LastName VARCHAR (25) NOT NULL,
FirstName VARCHAR (25) NOT NULL,
PRIMARY KEY (CustomerID)
);

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