B ntoo hauv SQL yog dab tsi?
B ntoo hauv SQL yog dab tsi?

Video: B ntoo hauv SQL yog dab tsi?

Video: B ntoo hauv SQL yog dab tsi?
Video: Военные тактические часы-Топ-10 самых жестких военных ч... 2024, Kaum ib hlis
Anonim

Hauv computer science, a B - tsob ntoo yog kev ntsuas tus kheej tsob ntoo cov qauv ntaub ntawv uas khaws cov ntaub ntawv txheeb xyuas thiab tso cai rau kev tshawb nrhiav, kev nkag mus ua ntu zus, ntxig, thiab tshem tawm hauv lub sijhawm logarithmic. Cov B - tsob ntoo yog ib tug generalization ntawm ib tug binary nrhiav tsob ntoo nyob rau hauv qhov node muaj peev xwm muaj ntau tshaj ob tug me nyuam.

Xav txog qhov no, tsob ntoo B yog dab tsi hauv database?

O(log n) O(log n) Hauv computer science, a B - tsob ntoo yog kev ntsuas tus kheej tsob ntoo cov ntaub ntawv qauv uas tswj xyuas cov ntaub ntawv txheeb xyuas thiab tso cai rau kev tshawb nrhiav, kev nkag mus ua ntu zus, ntxig, thiab tshem tawm hauv lub sijhawm logarithmic. Cov B - tsob ntoo generalizes binary nrhiav tsob ntoo , tso cai rau cov nodes nrog ntau tshaj ob tug me nyuam.

Kuj Paub, tsob ntoo B yog dab tsi thiab cov khoom? A B - tsob ntoo yog a tsob ntoo cov qauv ntaub ntawv uas khaws cov ntaub ntawv txheeb xyuas thiab tso cai rau kev tshawb nrhiav, ntxig, thiab tshem tawm hauv logarithmic amortized lub sijhawm. Tsis zoo li tus kheej ntsuas binary nrhiav ntoo , nws yog optimized rau cov tshuab uas nyeem thiab sau cov ntaub ntawv loj. Nws yog feem ntau siv nyob rau hauv database thiab cov ntaub ntawv systems.

Kuj tseem paub yog, piv txwv tsob ntoo B yog dab tsi?

B - Tsob ntoo yog kev nrhiav tus kheej sib npaug tsob ntoo nyob rau hauv uas txhua node muaj ntau tus yuam sij thiab muaj ntau tshaj ob tug me nyuam. Ntawm no, tus naj npawb ntawm cov yuam sij nyob rau hauv ib lub node thiab tus naj npawb ntawm cov me nyuam rau ib lub node nyob ntawm qhov kev txiav txim ntawm B - Tsob ntoo . Txhua B - Tsob ntoo muaj kev txiav txim.

B ntoo indexes ua haujlwm li cas?

B + tsob ntoo Index . Index yog khaws cia rau hauv disk nyob rau hauv daim ntawv ntawm cov ntaub ntawv qauv hu ua B + tsob ntoo . B + ntoo muaj tag nrho cov txiaj ntsig tseem ceeb hauv lawv cov nplooj nplooj. Tag nrho cov nplooj ntawm a B + tsob ntoo yog nyob rau tib qhov siab, uas implies tias txhua qhov ntsuas saib yuav coj tib tus lej ntawm B + tsob ntoo nrhiav rau nrhiav tus nqi.

Pom zoo: