Hw1_Sol - Figure 1 COMPANY relational database schema 1....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Figure 1 COMPANY relational database schema 1. (20 points)Suppose each of the following update operations is applied directly to the COMPANY relational database schema. Discuss all integrity constraints violated by each operation, if any, and the different ways of enforcing these constraints: a. Insert < 'Flora', 7, 'Taipei', '3'> into PROJECT Referential integrity constraint: DEPARTMENT 沒有 DNUMBER=3 的 Enforcing : 不能 insert 或是要 insert DNUM 為 1,4,5 的 b. Insert < 'Marketing', null, '333666999', '1988-06-30' > into DEPARTMENT Entity integrity constraint : Key attribute 不得為 null Referential integrity constraint: EMPLOYEE 沒有 SSN=333666999 的 Enforcing : 不能 insert 或是要重新設定 DNUMBER 以及 MGRSSN c. Insert <'Eason', 'E', 'Chan', '777777777', '1974-07-27', '220 New Taipei, TW', M, 53000, '888665555', 1> into EMPLOYEE. No constraint violations d. Delete the DEPENDENT tuple with ESSN= '987654321'. No constraint violations e. Modify the SALARY attribute of the EMPLOYEE tuple with SSN= ‘123456789' to ‘50000’ Semantic integrity constrain: 因為 salary 大於他的 manager Enforcing : 不能修改,將 salary 修改小於 40000 ,或是先將他上司的 salary 修改成大於 50000 2. (15 points)Consider the relation 課程 ( 流水號 , 課 程 名 稱 , 授課老師 , 學期 , 教 室 , 必 / 選 修 , 學 分...
View Full Document

This note was uploaded on 01/05/2012 for the course IM 100 taught by Professor Ccc during the Spring '11 term at National Taipei University.

Page1 / 4

Hw1_Sol - Figure 1 COMPANY relational database schema 1....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online