You are designing a table for employee data of a company You

You are designing a table for employee data of a company. You have a requirement to identify if an employee is a United States citizen or not. You have designed a table called EMPLOYEE to store information related to each employee and you have a column called US CITIZEN INDICATOR to store if an employee is a US citizen or not. You only want to store values \"Y\" or \"N\" in this column. From the following options, what is the best way to accomplish this in your database design? A) Define a check constraint on the primary key column of the table to accept only \"Y\" and \"N\" as the values B) Define a check constraint on the column US CITIZEN INDICATOR to accept only \"Y\" and \"N\" as the values C) Define a check constraint on all the columns of the table to accept only \"Y\"and \"N\"as the values D) Design a process that deletes the rows that do not contain valid values for the column US CITIZEN INDICATOR. E) None of the above In your database, you have the CUSTOMER table to record and maintain information related to your customers. The CUSTOMER NUMBER column is the primary key for this table. There is already a row in this table with CUSTOMER NUMBER 100. What is the outcome of an attempt to insert another row into this table with CUSTOMER NUMBER 100? A) The system will remove the PRIMARY KEY definition from the CUSTOMER NUMBER column and allow insertion of new row with CUSTOMER NUMBER 100 B) A new row will be inserted into the table with CUSTOMER NUMBER 100 C) The existing row with CUSTOMER NUMBER 100 will be replaced with the new row D) All the rows with CUSTOMER NUMBER 100 will be deleted E) Attempt to insert the new row will fail Which of the following is NOT true about UNIQUE KEY and PRIMARY KEY? A) A UNIQUE KEY can be NULL inarow. But the PRIMARY KEY cannot be null in any roW B) The PRIMARY KEY is always a UNIQUE KEY C) Every UNIQUE KEY is always a PRIMARY KEY D) A table can have more than one UNIQUE KEY and the PRIMARY KEY is one of the UNIQUE KEYs E) A UNIQUE KEY or the PRIMARY KEY can be made of two or more attributes (Concatenated Key)

Solution

Answer to Ques 1

B) Define a check constraint on the column US_CITIZEN_INDICATOR to accept only \'Y\' and \'N\' as the values.

Answer to Ques 2

E) Attempt to insert the new row with fail

Answer to Ques 3

C) Every Unique key is a Primary key.

Answer to Ques 4

C) Define CUSTOMER_NUMBER from CUSTOMER table as a foreign key in ORDER table

Answer to Ques 5

A) Domain for the field PROBABILITY_OF_RAIN

 You are designing a table for employee data of a company. You have a requirement to identify if an employee is a United States citizen or not. You have designe

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site