RELATIONAL LANGUAGES:
RELATIONAL ALGEBRA:
It’s a theoratical langauge which wth operations work on one or more relations to define another
relation without changing thte original relation…
FACILITIES: (operations) of relational algebra:
- Selection(restriction). Selection of rows E,g salary>100(staff).those employ who have
- salary more than 1000in salary table ..O condition (R) e.g O salary>100 (Staff)
- Projection: select columns from a relation. ∏ col1,…….coln (R)…… ∏ sno,fname,address
- (Student)
- Cartesian Product: concatinate rows of one relation to other relation’s record. R * S.. (Sid,name)(strudent)*(cid)(courses)..sid , name are the record of student relations &
- cid is the record of course table
- Union: to join two relations…..R ⋃S
union compatible..>data type must be same .
No duplication: no duplicate rows.
- Difference: tuples which are in R but not n S . R – S ..wat r the members which are
- in one society but not n another society.
- Joins Operators: joining of two relations. Join operators are
- Theta Join :matching of two field in two relation. It include =,<,><=,=!…..R ⋈condition S
- Equi join: Teta is general form so for equal it s equal join, for the greater it s greater
- join.
- Natural join: if there are two columns that will become one.
- Outer join: those which are matching & those which are not matching that is complete
- relation. ⊳⊲
- Semi join: DDB(distributd DB) take relations from one side & then relations from other
- side. R ⊳f S…where f s condition or predicate. protocol
- Intersection: tuples that r n both R & S & must be union-compatible. R ⋂S
- Division : R ∻S