74. [Total Mark for this Assignment is 5]
Fundamentals of Databases
IT403
College of Computing and Informatics
Question One
1 Mark
Learning Outcome(s): LO1
Describe fundamental data and database concepts
1. Give an example of 3 relations illustrating primary keys and
foreign keys.
Question Two
4 Marks
Learning Outcome(s): LO7
Use Structured Query Language to perform queries and to
perform relational operations.
75. Consider the following relations:
Student(sID, surName, firstName, campus, email)
Course(dept, cNum, name)
Offering(oID, dept, cNum, term, instructor)
Took(sID, oID, grade)
Such as:
Offering[dept, cNum] ⊆ Course[dept, cNum]
Took[sID] ⊆ Student[sID]
Took[oID] ⊆ Offering[oID]
Answer the following query using relational algebra:
1. Give the Student number of all students who have taken the
course number “343” by the department “CS”.
2. Find sID of all students who have earned some grade over 80
and some grade below 50.
3. Find the Terms when the course number “369” by the
department “CS” was not offered.
4. Find the Department and course number of courses that have
never been offered.