Dab tsi yog referential integrity txwv hauv SQL?
Dab tsi yog referential integrity txwv hauv SQL?

Video: Dab tsi yog referential integrity txwv hauv SQL?

Video: Dab tsi yog referential integrity txwv hauv SQL?
Video: Lec 4: Functional dependency in DBMS | What is functional dependency | Database Management System 2024, Hlis ntuj nqeg
Anonim

Referential Integrity yog set kev txwv thov rau txawv teb chaws tus yuam sij uas txwv tsis pub nkag mus rau ib kab hauv lub rooj me nyuam (qhov twg koj muaj tus yuam sij txawv teb chaws) uas koj tsis muaj cov kab sib txuas hauv niam txiv lub rooj piv txwv li nkag mus rau NULL lossis cov yuam sij txawv teb chaws tsis raug.

Ntawm no, dab tsi yog kev ncaj ncees txwv hauv database?

Kev ncaj ncees txwv yog ib txoj cai. Nws yog siv los tswj cov ntaub ntawv zoo. Kev ncaj ncees txwv xyuas kom meej tias cov ntaub ntawv ntxig, hloov kho, thiab lwm yam txheej txheem yuav tsum tau ua raws li cov ntaub ntawv ntawd kev ncaj ncees tsis cuam tshuam.

Dab tsi yog qhov txwv hauv DBMS? Kev txwv yog cov cai tswj hwm ntawm cov kab ntawv ntawm cov lus. Cov no yog siv los txwv hom ntaub ntawv uas tuaj yeem nkag mus rau hauv lub rooj. UNIQUE Kev txwv - Xyuas kom meej tias tag nrho cov txiaj ntsig hauv kab sib txawv. PRIMARY Key - Tshwj xeeb txheeb xyuas txhua kab / cov ntaub ntawv nyob rau hauv ib lub rooj database.

referential integrity nyob rau hauv cov nqe lus ntawm ib tug database yog dab tsi?

Referential kev ncaj ncees (RI) yog kev sib raug zoo database lub tswv yim, uas hais tias kev sib raug zoo ntawm rooj yuav tsum yog ib txwm zoo ib yam. Hauv lwm lo lus, txhua qhov tseem ceeb txawv teb chaws yuav tsum pom zoo nrog tus yuam sij tseem ceeb uas tau hais los ntawm tus yuam sij txawv teb chaws.

Koj txhais li cas los ntawm normalization?

normalization yog ib txoj hauv kev zoo ntawm decomposing ntxhuav los tshem tawm cov ntaub ntawv redundancy (repetition) thiab undesirable yam ntxwv zoo li Insertion, hloov tshiab thiab deletion anomalies. Nws yog txheej txheem ntau kauj ruam uas tso cov ntaub ntawv rau hauv daim ntawv tabular, tshem tawm cov ntaub ntawv duplicated los ntawm cov rooj sib txheeb.

Pom zoo: