Database Questions 1 You are designing a table for employee
Database Questions
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? 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 aboveSolution
1) (C)Define a check constraint on all the columns of the table to accept only \"y\" and \"N\" as the values.
If you define a CHECK constraint on a table it can limit the values in certain columns based on values in other columns in the row.
2)(b)The primary Key is always a Unique key
Because primary key cannot be NULL but UNique allows null values.
3(C) Define CUSTOMER_NUMBER from CUSTOMERS table as a foreign key in ORDER table.
4(A) Domain for the field PROBABALITY_OF_RAIN
