set theory, selection, relational algebra, database - all the exercise sildes i have downloaded or referred from websites. i just orgainsed as topicwise for readers, www.youtube.com - video is available (search as "dr.girija narasimhan")
1. selection
R1 := σC (R2)
C is a condition (as in “if” statements) that
refers to attributes of R2.
R1 is all those tuples of R2 that satisfy C.
Sells
milk
Al-marai
Al-marai
Lancor
Lancor
Display only the milk
Al-marai
Prices :=
milk_type
Full_Fat
Refresh
Full_Fat
Refresh
price
2.50
2.75
2.50
3.00
σ milk=‘Al-marai’(Sells):
milk
Al-marai
Al-marai
DR.GIRIJA NARASIMHAN
milk_type
Full_Fat
Refresh
price
2.50
2.75
1
3. Exercise 1- selection
For example, the operation SID=101
selects all tuples in the input relation
which have the value 101 in column
SID.
DR.GIRIJA NARASIMHAN
Exercise 2- selection
Select only A which
has value one
3
4. Selection – exercise 1 & 2 Result
For example, the operation SID=101 selects all tuples in the
input relation which have the value 101 in column SID.
DR.GIRIJA NARASIMHAN
4
5. Selection – exercise 3
Select the employee whose age is less
than 30 or salary is greater than 4000
DR.GIRIJA NARASIMHAN
5
9. Selection – exercise 5
Select where person whose age is greater than or
equal to 34
Select the person whose age and weight should
be same
DR.GIRIJA NARASIMHAN
9