Question: Given the relational schema:

ENROL (S#, C#, Class) - S# represents student number
TEACH (Prof, C#, Class) - C# represents course number
ADVISE (Prof, S#) - Prof is project guide of S#
PRE_REQ (C#, Pre_C#) - Pre_C# is prerequisite course
GRADES (S#, C#, Grade, Year)
STUDENT (S#, Sname) - Sname is student name

Give queries expressed in relational algebra, tuple calculus and domain calculus for the following:
(i) List all students taking courses with Prof Ashok.
(ii) List all student names who have selected Prof Rahul as project Guide.
(iii) List those professors who teach more than one class.
(iv) List all the student names who got Grade A in the year 2012 in C# P202.
(v) List all the students who has taken the pre-requisite course Pre_C# P304.

Problem: Can anyone explain me what a relational algebra, tuple calculus or domain calculus actually refers to in simple words? I can write queries like for the first case it would be something like:

SELECT s#, Sname FROM student inner join advise on advise.s#=student.s# where advise.prof LIKE '%Ashok%'

But what is tuple calculus or domain calculus?

Member Avatar for LastMitch

Problem: Can anyone explain me what a relational algebra, tuple calculus or domain calculus actually refers to in simple words? I can write queries like for the first case it would be something like:

@abhig

Regardless, whether you know how to write a query or not what is this? I'm not familiar the schema that you provided and I never seem a relational schema.

It would be helpful what other language is involved with that code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.