Video: Dab tsi yog tus yuam sij tshwj xeeb hauv SQL?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
A tus yuam sij tshwj xeeb yog ib txheej ntawm ib lossis ntau tshaj ib daim teb/kem ntawm ib lub rooj uas tshwj xeeb txheeb xyuas cov ntaub ntawv nyob rau hauv ib lub rooj database. Cov tus yuam sij tshwj xeeb thiab thawj tus yuam sij ob qho tib si muab kev lees paub rau qhov tshwj xeeb rau ib kem lossis ib pawg kab. Muaj ib qho kev txiav txim siab tus yuam sij tshwj xeeb kev txwv nyob rau hauv lub hauv paus tus yuam sij txwv.
Xav txog qhov no, qhov txawv ntawm qhov tseem ceeb thiab tus yuam sij tshwj xeeb yog dab tsi?
Qhov txawv ntawm qhov tseem ceeb ntawm tus yuam sij tseem ceeb thiab tus yuam sij tshwj xeeb : Thawj tus yuam sij yuav tsis lees txais NULL qhov tseem ceeb whereas Qhov tseem ceeb tshwj xeeb tuaj yeem txais ib tus nqi NULL. Lub Clustered index tau tsim thaum a thawj tus yuam sij txhais tau tias Qhov tseem ceeb tshwj xeeb generates qhov non-clustered index.
Ib tug kuj yuav nug, qhov piv txwv tseem ceeb yog dab tsi? Cov UNIQUE Kev txwv txwv tsis pub ob cov ntaub ntawv los ntawm qhov muaj txiaj ntsig zoo ib yam hauv ib kab. Nyob rau hauv cov neeg siv lub rooj, rau piv txwv , tej zaum koj yuav xav tiv thaiv ob lossis ntau tus neeg kom muaj hnub nyoog zoo ib yam. Piv txwv : Rau piv txwv , cov nram qab no SQL tsim ib lub rooj tshiab hu ua CUSTOMERS thiab ntxiv tsib kab.
Ib yam li ib tug yuav nug, vim li cas peb thiaj siv cov yuam sij tshwj xeeb?
Qhov tseem ceeb tshwj xeeb kev txwv yog siv los xyuas kom meej tias cov ntaub ntawv tsis duplicated nyob rau hauv ob kab nyob rau hauv lub database. Ib kab hauv cov ntaub ntawv tau tso cai kom muaj null rau tus nqi ntawm qhov tus yuam sij tshwj xeeb txwv. Qhov no txhais tau hais tias nrhiav cov txiaj ntsig los ntawm lawv cov PK sai dua li siv lwm cov txiaj ntsig hauv kab.
Dab tsi yog qhov tshwj xeeb txwv hauv SQL?
SQL UNIQUE Constraint . Cov UNIQUE kev txwv xyuas kom meej tias tag nrho cov txiaj ntsig hauv ib kab sib txawv. Ob tus UNIQUE thiab PRIMARY KEY kev txwv muab ib tug guarantee rau tshwj xeeb rau ib kab los yog kab ke. Txawm li cas los xij, koj tuaj yeem muaj ntau yam UNIQUE kev txwv ib lub rooj, tab sis tsuas yog ib qho PRIMARY KEY txwv rau lub rooj.
Pom zoo:
Ib tus yuam sij tseem ceeb puas tuaj yeem muaj ob tus yuam sij txawv teb chaws?
Nws yog qhov zoo kawg nkaus kom muaj ob kab ntawv tseem ceeb txawv teb chaws xa mus rau tib lub ntsiab lus tseem ceeb hauv ib lub rooj sib txawv vim tias txhua tus nqi tseem ceeb txawv teb chaws yuav siv cov ntaub ntawv sib txawv hauv cov lus hais
Dab tsi yog tus yuam sij ntiag tug thiab pej xeem tus yuam sij hauv Blockchain?
Thaum ib tug neeg xa koj cryptocoins hla Blockchain, lawv tau xa lawv mus rau qhov hashed version ntawm qhov hu ua "Public Key". Muaj lwm tus yuam sij uas zais ntawm lawv, uas yog hu ua "Private Key." Qhov Private Key no yog siv los muab Public Key
Koj txhais li cas los ntawm tus yuam sij ntiag tug thiab pej xeem tus yuam sij cryptography?
Nyob rau hauv pej xeem tus yuam sij cryptography, ob tus yuam sij yog siv, ib tug yuam sij yog siv rau encryption thiab thaum lwm yam yog siv rau decryption. 3. Nyob rau hauv private keycryptography, tus yuam sij yog khaws cia tsis pub leejtwg paub. Nyob rau hauv pej xeem tus yuam sij cryptography, ib qho ntawm ob tus yuam sij yog khaws cia tsis pub leejtwg paub
Puas yog tus yuam sij tseem ceeb kuj yog tus yuam sij txawv teb chaws?
Cov yuam sij tseem ceeb ib txwm yuav tsum muaj qhov tshwj xeeb, cov yuam sij txawv teb chaws yuav tsum tso cai rau qhov tsis muaj txiaj ntsig yog tias lub rooj yog ib qho kev sib raug zoo. Nws yog qhov zoo kawg nkaus siv tus yuam sij txawv teb chaws los ua tus yuam sij tseem ceeb yog tias lub rooj sib txuas los ntawm kev sib raug zoo ib leeg, tsis yog ib qho kev sib raug zoo
Tus yuam sij tseem ceeb thib ob thiab tus yuam sij txawv teb chaws yog dab tsi?
Txawv Teb Chaws Tseem Ceeb: Yog Lub Ntsiab Tseem Ceeb ib lub rooj tshwm (hloov-hais) hauv lwm lub rooj. Secondary (los yog lwm txoj kev) Key: Puas yog ib qho chaw hauv lub rooj uas tsis raug xaiv los ua ib qho ntawm ob hom saum toj no