Vim li cas kev sib raug zoo algebra siv nyob rau hauv kev sib raug zoo database tswj?
Vim li cas kev sib raug zoo algebra siv nyob rau hauv kev sib raug zoo database tswj?

Video: Vim li cas kev sib raug zoo algebra siv nyob rau hauv kev sib raug zoo database tswj?

Video: Vim li cas kev sib raug zoo algebra siv nyob rau hauv kev sib raug zoo database tswj?
Video: Vim li cas tus ntseeg hos yuav tsum raug kev sim siab 2024, Kaum ib hlis
Anonim

RELATIONAL ALGEBRA yog dav siv txheej txheem lus nug. Nws sau cov xwm txheej ntawm kev sib raug zoo raws li kev tawm tswv yim thiab muab qhov tshwm sim ntawm kev sib raug zoo raws li cov zis. Nws siv ntau yam haujlwm los ua qhov haujlwm no. Relational algebra kev khiav hauj lwm yog ua recursively ntawm a kev sib raug zoo.

Ntxiv mus, vim li cas kev sib raug zoo algebra tseem ceeb?

Cov kev sib raug zoo algebra yog heev tseem ceeb rau ob peb lub laj thawj: 1. nws muab lub hauv paus tsim nyog rau kev sib raug zoo qauv kev ua haujlwm. Raws li qhov algebra txhais cov txheej txheem kev ua haujlwm rau cov kev sib raug zoo model, ua kev sib raug zoo calculus muab cov lus tshaj tawm qib siab dua rau kev qhia meej kev sib raug zoo lus nug.

Qhov thib ob, dab tsi yog qhov kev ua haujlwm ntawm kev sib raug zoo algebra? Tsib txoj haujlwm yooj yim hauv kev sib raug zoo algebra: Kev Xaiv, Kev Tshaj Tawm, Cartesian khoom , Union , thiab Teeb qhov txawv.

Ib yam li ntawd, nws tau nug, qhov twg yog kev sib raug zoo algebra siv?

Relational Algebra yog cov lus nug txheej txheem, uas yuav siv Kev Sib Raug Zoo li kev tawm tswv yim thiab tsim kom muaj kev sib raug zoo raws li cov zis. Relational algebra mas muab theoretical foundation rau kev sib raug zoo databases thiab SQL. Projection yog siv rau qhov project xav tau kab ntawv los ntawm kev sib raug zoo.

Relational algebra piav nrog piv txwv yog dab tsi?

Cov ntsiab lus

Kev ua haujlwm Lub hom phiaj
Kev sib tshuam (∩) Kev sib tshuam txhais ib qho kev sib raug zoo uas muaj cov txheej txheem ntawm tag nrho cov tuple uas nyob hauv ob qho tib si A thiab B.
Cartesian khoom (X) Cartesian kev ua haujlwm yog pab tau rau kev sib koom ua ke ntawm ob qho kev sib raug zoo.
Sab hauv koom Kev koom nrog sab hauv, suav nrog cov tuples uas ua tau raws li cov qauv sib xws.

Pom zoo: