Database Reference
In-Depth Information
4.15.1 Queries on Relation Scheme
Retrieve the list of male PhD students
σ
degree = 'PhD'^ sex = 'F'
(student)
Obtain the name and regID of all male BA students
π
regID, name
(σ
degree = 'BA'^ gender = 'M'
(student))
Obtain the regID of students who got more than 800 marks π
regID
(student) - π
regID
(σ
mark-
sObt > 800
(admission))
Obtain the department Ids for departments with no lady teacher π
deptID
(department) - π
deptID
(σ
gender = 'F'
(teacher))
Obtain the regID of male students who have obtained at least 800 marks π
regID
(σ
gender =
'M'
(student)) )” π
regID
(σ
marksObt
>= 800(admission))