1. It is possible that a foreign key column of a table can be NULL. ATrue BFalse
ID: 3807715 • Letter: 1
Question
1. It is possible that a foreign key column of a table can be NULL.
ATrue
BFalse
2.From the list below, identify ALL the options to implement data integrity in the Database design.(option)
Using the correct data types for the columns
Identification of actors for Use Cases
Foreign Keys
CHECK Constraints
NOT NULL constraints
3. Provide an example where foreign key column value of a table can be null.
4. In your own words, explain how Referential integrity can be enforced between two tables. You may use examples if it makes easy for you to explain.
5. The dataset below shows list of employees of an organization and the departments that the employees are working in. The EMPLOYEE_ID column of the dataset uniquely identifies an employee of the organization. The DEAPARTMENT_ID column of the dataset uniquely identifies a department of the organization. An employee of this organization can work only in one department of the organization.
Based on the information provided, please normalize the given dataset. Your response should clearly indicate resultant tables after the normalization along with their colums. Also please indicate all the primary keys and applicable foreign keys.
Note: The first row of the above table indicates the names of the columns of the dataset.
a.Using the correct data types for the columns
b.Identification of actors for Use Cases
c.Foreign Keys
d.CHECK Constraints
e.NOT NULL constraints
Explanation / Answer
1. It is true that The foreign key coumn of a table can be NULL .
2. Data integrity in a database can be implemented the following options are used , they are , Using correct data types for columns, Identification of actors for use case, Foreign Keys, Check constraints , and Not NULL constraints.
3. Foreign key column value of a table can be null or it can also be duplicate. If there are no other constraints on the foreign key , Many number of rows in child table can refer to the same parent key value hence the foreign key can be NULL in this situation. For example consider the database of sales , if one sales person assigned to one client , there are two foreign keys in the dataset . At the initial time of database creation when a sales person is not yet assigned to any client then its foreign Key can be NULL.
4. Referential integrity is defined as the foreign key in the referencing table always refers to a valid row in the referenced table. By this two tables are synchronized on their updated or deletes.
For example consider the tables of titles and publishers,
The database application cannot just delete the p_id row from the Publishers table because that would leave the p_id in the Titles table without a reference.
5. If the given table is not normalized it may update anamoly, delete anamoly, Insert anamoly because to employess belong to same department of HR , Hence to normalize we split the table into two tables,
Titles Publishers t_id(key) p_id(key) t_title p_name t_year p_address p_id(foreign Key) p_phoneRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.