Computer-Science

FD and Normalization


๋ฆด๋ ˆ์ด์…˜ ์Šคํ‚ค๋งˆ๋ฅผ ์„ค๊ณ„ํ•˜๋Š” ๋ช‡ ๊ฐ€์ง€ ๊ฐœ๋žต์ ์ธ ์ง€์นจ

๋จผ์ € ์ข‹์€ ๋ฆด๋ ˆ์ด์…˜ ์„ค๊ณ„์— ๊ด€ํ•œ ๊ฐœ๊ด„์ ์ธ ์ง€์นจ์„ ๋…ผ์˜ํ•œ ํ›„, ํ•จ์ˆ˜์  ์ข…์†์„ฑ๊ณผ ์ •๊ทœํ˜• ๊ฐœ๋…์— ๊ด€ํ•ด ๋…ผ ์˜ํ•จ

๋ฆด๋ ˆ์ด์…˜ ์• ํŠธ๋ฆฌ๋ทฐํŠธ๋“ค์˜ ์˜๋ฏธ

Anomaly์˜ ์˜ˆ

๊ฒฐ๋ก  :

์• ํŠธ๋ฆฌ๋ทฐํŠธ๋“ค ๊ฐ„์˜ ์ข…์†๊ด€๊ณ„๋ฅผ ๋ถ„์„ํ•˜์—ฌ ์—ฌ๋Ÿฌ๊ฐœ์˜ ๋ฆด๋ ˆ์ด์…˜์œผ๋กœ ๋ถ„ํ•ด(decomposition) โ‡’ ์ •๊ทœํ™”(normalization)

ํŠœํ”Œ์˜ NULL ๊ฐ’

์ •๋ณด์˜ ๋ณ€ํ˜•์œผ๋กœ ์ธํ•œ ๊ฐ€์งœ ํˆฌํ”Œ (Spurious Tuple)

ํ•จ์ˆ˜์  ์ข…์†์„ฑ(FD)

ํ•จ์ˆ˜์  ์ข…์†์„ฑ์˜ ์ •์˜ (1/2)

์™„์ „ ํ•จ์ˆ˜ ์ข…์†๊ณผ ๋ถ€๋ถ„ ํ•จ์ˆ˜ ์ข…์†

๋ณตํ•ฉ ์• ํŠธ๋ฆฌ๋ทฐํŠธ X์— ๋Œ€ํ•˜์—ฌ X ยฎY๊ฐ€ ์„ฑ๋ฆฝํ•  ๋•Œ

ํ•จ์ˆ˜ ์ข…์†์— ๋Œ€ํ•œ ์ถ”๋ก  ๊ทœ์น™

Note

์ •๊ทœํ™”(normalization)

์ œ1์ •๊ทœํ˜• (1NF)

1NF์˜ ์ด์ƒ(anomaly)

์ œ2์ •๊ทœํ˜• (2NF)

๋ฌด์†์‹ค ๋ถ„ํ•ด(nonloss decomposition)

2NF์˜ ์ด์ƒ(anomaly)

์ œ3์ •๊ทœํ˜• (3NF)

3NF์˜ ์•ฝ์ 

ERD์˜ ์ •๊ทœํ™” ๋ถ„์„

BCNF (Boyce-Codd Normal Form)

๋” ๋งŽ์€ ์ข…์†์„ฑ๊ณผ ์ •๊ทœํ˜•

๋‹ค์น˜ ์ข…์†์„ฑ๊ณผ ์ œ4์ •๊ทœํ˜•(4NF)

์กฐ์ธ ์ข…์†์„ฑ๊ณผ ์ œ5์ •๊ทœํ˜•(5NF)


Source

  1. Fundamentals of Database Systems 7th Edition by Ramez Elmasri, Shamkant B. Navathe.