1) You are designing a table for employee data of a company. You have a requirem
ID: 3799771 • Letter: 1
Question
1) 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?
2) 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?
3) Which of the following is NOT true about UNIQUE KEY and PRIMARY KEY?
4 )XYZ Company sells their products on the internet. The company is implementing an Order Management System for this purpose. The table CUSTOMER maintains the information related to each customer. The table ORDER maintains the orders for each customer. The primary key for CUSTOMER is CUSTOMER_NUMBER. The primary key for ORDER is ORDER_NUMBER. A customer can have zero, one or more than one orders. The database designer of the project wants to maintain referential integrity between these two tables. What should she do in her design?
QUESTION 1 0.5 points Save Answer 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" n 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 column US CITIZEN INDICATOR to accept only "Y and "N" as the values B. Define a check constraint on all the columns of the table to accept only "Y and "N" as the values C. Design a process that deletes the rows that do not contain valid values for the column US CITIZEN INDICATOR D. Define a check constraint on the primary key column of the table to accept only Y and N" as the values QUESTION 2 0.5 points Save Answer 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 00. What is the outcome of an attempt to insert another row into this table with CUSTOMER NUMBER 100? A new row will be inserted into the table with CUSTOMER NUMBER 100 The system will remove the PRIMARY KEY definition from the CUSTOMER UMBER column and allow insertion of new row with CUSTOMER NUMBER E 100 The existing row with CUSTOMER NUMBER 00 will be replaced with the new row Attempt to insert the new row will fail QUESTION 3 0.5 points Save Answer Which of the following is NOT true about UNIQUE KEY and PRIMARY KEY? A. Every UNIQUE KEY is always a PRIMARY KEY B. A UNIQUE KEY or the PRIMARY KEY can be made of two or more attributes (Concatenated Key) C. The PRIMARY KEY is always a UNIQUE KEY D. A UNIQUE KEY can be NULL in a row. But the PRIMARY KEY cannot be null in any rowExplanation / Answer
Question 1:
A. Define a check constraint on the column US_CITIZEN_INDICATOR to accept only "Y" and "N" as values.
constraints help in imposing conditions on data while insertion and modification of values in tables.
Question 2:
D. Attempt to insert the new row will fail.
Primary key values should be unique.
Question 3:
A. Every unique key is always a primary key.
Another condition for primary key is it should be not null, but one value of unique key can be null in the table
Question 4:
D. Define ORDER_NUMBER from ORDER as a foreign key in CUSTOMER table.
for Customer , ORDER_NUMBER can be NULL but for ORDER, CUSTOMER_NUMBER cannot be NULL.
Question 5:
D. Domain for the field PROBABILITY_OF_RAIN
Domain is the set of values allowed for an attribute.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.