【正文】
– 基于數(shù)據(jù)依賴的最高范式 – 分解要求 ? 無損連接 ? 保持依賴 ? 4NF 1983 Return of the Jedi Hollywood 123 maple St. 1980 Empire Strikes Back Hollywood 123 maple St. 1983 Return of the Jedi Mailbu 5 Locust Ln. 1980 Empire Strikes Back Mailbu 5 Locust Ln. 1977 Star Wars Mailbu 5 Locust Ln. 1977 Star Wars Hollywood 123 maple St. year title city street name name→→title,year name→→street,city All Key is BCNF isn’t 4NF R1(name,title,year) R2(name,street,city) All Key is 4NF ? 范式間的聯(lián)系 – 高層范式包含低層范式 – 分解特性 特性 3N F B C N F 4N F消除 FD 引起的冗余 大部分 是 是消除 M V D 引起的冗余 否 否 是保持 FD 是 可能 可能保持 M V D 可能 可能 可能? 作業(yè) –思考所有帶 *的練習(xí),并上網(wǎng)查詢解答 –練習(xí) 。關(guān)系 R(U)中多值依賴 X→→Y 成立,當(dāng)且僅當(dāng)對(duì) R(U)的任一元組 r, 給定一對(duì) (x,z)值,有一組 y的值 ,這組值僅僅取決于 x值,而與 z值無關(guān)。 多值依賴 ? BCNF –仍有異常 name street city title year 123 maple St. Hollywood Star Wars 1977 5 Locust Ln. Mailbu Star Wars 1977 123 maple St. Hollywood Empire Strikes Back 1980 5 Locust Ln. Mailbu Empire Strikes Back 1980 123 maple St. Hollywood Return of the Jedi 1983 5 Locust Ln. Mailbu Return of the Jedi 1983 ? 多值依賴( MVD) —— 按 X Y Zt a1… aiai + 1… ajaj+ 1…anu a1… aibi + 1… bjbj+ 1… bnv a1… aiai + 1… ajbj+ 1… bnw a1… aibi + 1… bjaj+ 1…an? 多值依賴( MVD) –設(shè) R(U)是屬性集 U上的一個(gè)關(guān)系。 –主屬性可以傳遞依賴于碼 student(sno,sname,sdept,dept_manager) sno→sname,sdept sdept→dept_manager 傳遞依賴: sno→dept_manager sno sdept sname dept_manager ? Boyce/Codd范式 (BCNF) –對(duì)于關(guān)系 R,若 R∈ 1NF,且 所有 非平凡的函數(shù)依賴,其決定因素是候選碼,則 R∈ BCNF。 –要求屬性是原子的 ? 第二范式 (2NF) –對(duì)于關(guān)系 R,若 R∈ 1NF,且每