Reputation: 1
I have database of University like below:
Student (SID, name, family, mean, age, city, street, CID)
Instructor (IID, name, family, salary, city, street, CID)
College (CID, name, city)
How can i answer the following query in Domain Relational Calculus (DRC) ?
"Find instructors who are in all colleges located in London"
Upvotes: -1
Views: 406
Reputation: 536
When you have to solve this kind of jobs, you have to follow these steps:
Anyway, since your DB links through an external key (CID in Instructor) Instructors to Colleges, you can have at most ONE Instructor for College.
To be able to link more instructors to more college you have to insert one additional table to design an N:M relationship, like in here
Upvotes: 0
Reputation: 18408
Find all the instructors such that there does not exist any college located in London such that the instructor is not in that college.
But the question is a bit questionable given that your db structure seems to allow any instructor to "be in" at most one single college, at any time.
Upvotes: 1