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

(2 marks) Question2: Convert the Previous ER diagram into tables. write Question

ID: 3595836 • Letter: #

Question

(2 marks) Question2: Convert the Previous ER diagram into tables. write Question3: (2 marks) Use SQL Commands to create the customer table in the previous questions (Add the primary and foreign keys if any, cust not be NULL) pace to write and think (if (1 mark) Question 4: Add a new column to table "customer" named " SEX " with type CHAR, and 1 digit allowed. Question 5 (1 mark) Create a new table name "customerGender" using table "customer" in which it will contain columns customer number and SEX. if

Explanation / Answer

3.  

      CREATE TABLE CUSTOMERS(

            ID INT NOT NULL,

           FNAME VARCHAR (20) NOT NULL,

           LNAME VARCHAR (20) NOT NULL,

           AGE INT NOT NULL,

           ADDRESS CHAR (25) ,

           PRIMARY KEY (ID)

4.

        ALTER TABLE CUSTOMERS ADD SEX char(1);

5.

       CREATE TABLE customerGender AS

       SELECT ID, SEX FROM CUSTOMERS;