You are a database developer. You plan to design a database solution byusing SQL Server 2008. You are creating adataba seto 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, thetask is deleted. When a task is deleted, the associated assignment is deleted. When an employee is nolonger available tocomple tea task, theemployee link to the assignment is replaced with a NULL value. You need to implement the business requirements to maintain data integrity. What should you do?()
- A、Create DDL INSERT triggers on the Employee. Task and Assignment entities.
- B、Create CHECK constraints on the Task ID and Employee ID attributes in the Assignment entity.
- C、Create Foreign Keys constraints on the Task ID 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 Task ID and Employee ID attributes in theTask and Employeeentities respectively. Reference the Assignment entity, and specify the appropriate On Delete action.
正确答案:C
答案解析:有
微信扫一扫手机做题