BCNF vs 4NF (4th Normalization)
Database normalization yog txheej txheem, uas yog cuam tshuam nrog kev sib raug zoo database tswj systems. Cov ntaub ntawv yuam kev tuaj yeem zam tau hauv cov ntaub ntawv zoo li qub. Normalization yog siv los txo cov ntaub ntawv redundancy ntawm database. Qhov ntawd txhais tau hais tias kev siv cov ntaub ntawv database thiab lawv cov kev sib raug zoo, tshem tawm kev rov ua dua thiab tsis sib haum xeeb. Muaj ib co kev cai predefined teem rau normalization. Cov kev cai no hu ua cov qauv qub.
- First Normal Form (1NF)
- Second Normal Form (2NF)
- Daim Ntawv Thib Peb (3NF)
- Boyce-Codd Ib txwm Form (BCNF lossis 3.5NF)
- Fourth Normal Form (4NF)
Thawj Daim Ntawv Sau Npe yog hu ua atomicity ntawm lub rooj. Rooj atomicity tuaj yeem ncav cuag los ntawm ob kauj ruam.
- Tshem tawm cov kab sib npaug ntawm tib lub rooj.
- Tsim cais cov rooj rau cov kab sib npaug. (yuav tsum muaj cov yuam sij tseem ceeb txhawm rau txheeb xyuas txhua kab ntawm cov lus no)
Nyob rau hauv daim ntawv thib ob, qhov kev sim yog txo cov ntaub ntawv rov ua dua hauv lub rooj los ntawm kev rho tawm lawv thiab muab tso rau hauv ib lub rooj sib cais. Qhov no tuaj yeem ua tiav los ntawm kev ua cov kauj ruam hauv qab no.
- Xaiv cov ntaub ntawv teeb tsa, uas siv rau ntau kab, thiab muab tso rau hauv cov rooj sib cais.
- Tsim kev sib raug zoo ntawm cov rooj tshiab no thiab cov rooj niam txiv uas siv cov yuam sij txawv teb chaws.
Txhawm rau nqa cov ntaub ntawv mus rau daim ntawv thib peb, twb tau ua tiav cov ntaub ntawv thawj zaug thiab thib ob. Thaum cov ntaub ntawv nyob rau hauv 1NF thiab 2NF, tsis muaj cov kab sib tshooj thiab tsis muaj ib qho subsets ntawm cov ntaub ntawv uas siv rau ntau kab. Daim ntawv thib peb tuaj yeem ua tiav los ntawm kev tshem cov kab ntawm cov ntxhuav, uas tsis tag nrho, nyob ntawm qhov tseem ceeb.
Boyce-Codd Ib txwm Form (BCNF lossis 3.5NF)
BCNF sawv cev rau "Boyce-Codd Normal Form". Daim ntawv ib txwm no tseem hu ua 3.5 Ib txwm daim ntawv ntawm database normalization. Txhawm rau ua tiav BCNF, cov ntaub ntawv yuav tsum tau ua tiav rau peb daim ntawv ib txwm. Tom qab ntawd cov kauj ruam hauv qab no yuav tsum ua kom tiav BCNF.
- Qhia txhua tus neeg sib tw tus yuam sij hauv kev sib raug zoo
- Qhia tag nrho cov kev ua haujlwm nyob hauv kev sib raug zoo.
- Yog tias muaj kev ua haujlwm tau zoo hauv kev sib raug zoo, qhov twg lawv qhov kev txiav txim tsis yog tus neeg sib tw tus yuam sij rau kev sib raug zoo, tshem tawm cov kev ua haujlwm ntawm kev ua haujlwm los ntawm kev tso lawv rau hauv kev sib raug zoo nrog rau daim qauv ntawm lawv qhov kev txiav txim.
Fourth Normal Form
Database yuav tsum nyob hauv daim ntawv thib peb, ua ntej normalizing nws mus rau plaub daim ntawv ib txwm. Yog tias cov ntaub ntawv twb tau nyob hauv daim ntawv thib peb, cov kauj ruam tom ntej yuav tsum yog tshem tawm cov kev muaj txiaj ntsig ntau. (Yog tias ib lossis ntau kab qhia tias muaj ib lossis ntau lwm kab hauv tib lub rooj, nws yog hu ua multi-valued dependency.)
Qhov txawv ntawm BCNF thiab 4NF (Fourth Normal Form) yog dab tsi?
• Database yuav tsum tau ua tiav rau 3NF coj mus rau BCNF, tab sis database yuav tsum nyob hauv 3NF thiab BCNF, kom ncav cuag 4NF.
• Hauv daim ntawv thib plaub, tsis muaj qhov muaj txiaj ntsig ntau ntawm cov ntxhuav, tab sis hauv BCNF, tuaj yeem muaj cov ntaub ntawv muaj txiaj ntsig ntau nyob hauv cov ntxhuav.