What is Relational algebra ?
Relational algebra, operations เคा เคเค เคธเคฎूเคน เคนोเคคा เคนै เคिเคธเคा เคช्เคฐเคฏोเค relations เคธे data เคो manipulate เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै। Relational algebra เคเค procedural language เคนै। เคเคธเคฎें operators เคा เคช्เคฐเคฏोเค queries เคो perform เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै เคเคฐ เคฏเคน DBMS เคฎें เคช्เคฐเคฏुเค्เคค เคนोเคจे เคตाเคฒी intermediate language เคนै।Relational Algebra เคฎें เคจिเคฎ्เคจเคฒिเคिเคค operators เคนोเคคे เคนै:-
1. Union(U)
2. Difference(–)
3. Selection (ฯ)
4. Projection (∏)
5. Cartesian Product(X)
6. Intersection(∩)
7.Rename(ฯ)
8.Join
1. Union(U):-union operator เคो U symbol เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคाเคคा เคนै।เคเคธเคा syntax เคจिเคฎ्เคจเคฒिเคिเคค เคนै।[R=P U Q]เคเคนां P เคเคฐ Q เคฆो เคเคจเคชुเค เคฐिเคฒेเคถเคจ เคนै เคเคฐ R เคเคเคเคชुเค เคฐिเคฒेเคถเคจ เคนै।เคฏूเคจिเคฏเคจ เคเคชเคฐेเคถเคจ เคฎें เคฆो input relation เคนोเคคे เคนै เคो เคि union compatible เคนों। เคเคธ operation เคा output relation เคเคจ tuples(rows) เคो contain เคเคฐเคคे เคนै เคो เคि relation 1 เคเคฐ relation 2 เคฎें เคนो เค
เคฅเคตाเคฆोเคจों เคฎें เคนो เคเคฐ เคो duplicate tuples เคนोเคคे เคนै เคเคจ tuples เคो eliminate เคเคฐ เคฆिเคฏा เคाเคคा เคนै।
2. Difference(–):-Difference operator เคो – symbol เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏाเคाเคคा เคนै। เคเคธเคा syntax เคจिเคฎ्เคจเคฒिเคिเคค เคนै:-[ R=P–Q]Difference operation, relation 1 เคฎें เคธ्เคฅिเคค common tuples เคो เคนเคा เคฆेเคคा เคนै। เคนเคฎाเคฐे เคो output เคเคเคा เคตเคน relation 1 เคฎें เคธ्เคฅिเคค tuples เคนोंเคे เคो เคि relation 2 เคฎें เคจ เคนो। เคนเคฎ เคเคธे เคจिเคฎ्เคจ เคिเคค्เคฐ เคे เคฆ्เคตाเคฐा เคเคธाเคจी เคธे เคธเคฎเค เคธเคเคคे เคนैं।
3. Selection (ฯ):-เคเคธ operator เคो ฯ(เคธिเค्เคฎा) symbol เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคाเคคा เคนै। เคเคธ operator เคा เคช्เคฐเคฏोเค tuplesเคो select เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै เคो เคि เคฆी เคนुเค condition เคो satisfy เคเคฐเคคी เคนै। เคฏเคน operation เคเค unary operationเคนैं เคो เคธिเคฐ्เคซ เคเค เคนी relation เคฏा table เคฎें define เคนोเคคा เคนै।
4. Projection (∏):-เคเคธ operation เคो ∏(pi) เคिเคจ्เคน् เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคाเคคा เคนै। เคฏเคน เคเค unary เคเคชเคฐेเคถเคจ เคนै เค
เคฐ्เคฅाเคค เคเคธเคฎें เคธिเคฐ्เคซ เคเค relation เคนोเคคा เคนै।Projection operator เคा เคช्เคฐเคฏोเค เคเค relation เคฎें เคธे attributes เคे subset(เคเคชเคธเคฎुเค्เคเคฏ) เคो select เคเคฐเคจे เคे เคฒिเคฏा เคाเคคा เคนै เคเคฐ เคिเคจ attributes เคो เคธेเคฒेเค्เค เคจเคนी เคिเคฏा เคाเคคा เคนै เคเคจเคो eliminate เคเคฐ เคฆिเคฏा เคाเคคा เคนै।
5.Cartesian Product(X):-เคเคธ เคเคชเคฐेเคเคฐ เคो X เคिเคจ्เคน् เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคाเคคा เคนै। เคเคธเคा syntax เคจिเคฎ्เคจ เคนै:-[R=P X Q].เคเคธ เคเคชเคฐेเคเคฐ เคा เคช्เคฐเคฏोเค เคฆो เคตिเคญिเคจ्เคจ relations เคी เคธूเคเคจाเคं เคो เคเค relation เคฎें เคธเคฎ्เคฎिเคฒिเคค เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै।
6. Intersection(∩):-เคเคธ เคเคชเคฐेเคเคฐ เคो ∩ เคिเคจ्เคน् เคฆ्เคตाเคฐा เคฆเคฐ्เคถाเคฏा เคाเคคा เคนै। เคเคธ เคเคชเคฐेเคเคฐ เคा เคช्เคฐเคฏोเค เคฆो relations เคฎें เคธे common tuples เคो select เคเคฐเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै। เคเคธเคा syntax เคจिเคฎ्เคจ เคนै:-[R=P∩Q].
7.Rename(ฯ):-Rename operator เคो ฯ(rho) เคिเคจ्เคน् เคธे เคฆเคฐ्เคถाเคฏा เคाเคคा เคนै। เคเคธ เคเคชเคฐेเคเคฐ เคा เคช्เคฐเคฏोเค relation เคो เคฆुเคฌाเคฐा เคจाเคฎ เคฆेเคจे เคे เคฒिเค เคिเคฏा เคाเคคा เคนै।
8. join:-เคฏเคน เคเคชเคฐेเคเคฐ เคฆो relations เคो เคเค เคจเค relations เคฎें combine เคเคฐเคคा เคนै।join operator เคจिเคฎ्เคจเคฒिเคिเคค เคช्เคฐเคाเคฐ เคे เคนोเคคे เคนै:-
1. Theta(ฮธ) Join
2. Left Outer Join
3. Right Outer Join
4. Full Outer Join
5. Natural Join ( )








No comments:
Post a Comment