What shou ld you do?

You area database developer. You plan to design a database solution by using SQL Server 2008.
You are creating a database to support the office manager. Your database model has the following structure.

The database design has the following business requirements:
An employee can be assigned more than one task.
Upon completion, thet ask is deleted.
When a task is deleted, the associated assignment is deleted.
When an employeeis no longer available to complete a task, the employee link to the assignment is replaced with a NULL value.
You need to implement the business requirements to maintain data integrity.
What shou ld you do?

You area database developer. You plan to design a database solution by using SQL Server 2008.
You are creating a database to support the office manager. Your database model has the following structure.

The database design has the following business requirements:
An employee can be assigned more than one task.
Upon completion, thet ask is deleted.
When a task is deleted, the associated assignment is deleted.
When an employeeis no longer available to complete a task, the employee link to the assignment is replaced with a NULL value.
You need to implement the business requirements to maintain data integrity.
What shou ld you do?

A.
Create DDL INSERT triggers on the Employee, Task, and Assignment entities.

B.
Create CHECK constraints on the TaskID and EmployeeID attributes in the Assignment entity.

C.
Create Foreign Keys constraints on the TaskID and EmployeeID attributes in the Assignment entity. Reference the Task and Employee entities respectively. Specify the appropriate On Delete action.

D.
Create Foreign Keys constraints on the TaskID and EmployeeID attributes in theTask and Employee entities respectively. Reference the Assignment entity, and specify the appropriate On Delete action.



Leave a Reply 0

Your email address will not be published. Required fields are marked *