Specify this query in Relational Algebra using the given database schema: Find the sid's of sailors who made at least 3 reservations.
Saliors(sid, sname, rating, age)
Boats (bid, name,color)
Reserves(sid, bid, date)
Is this correct:
∏sname((OCOUNT(sid)>=3Reserves))⋈Sailors)
Answer :
sid (count(sid)>=3 (Sailors Reserves) ) is the specification for the given query.
Explanation :
We can also write it as sid ((count(sid)>=3 (Reserves)) Sailors )
Explanation for why your answer is wrong :
∏sname((OCOUNT(sid)>=3Reserves))⋈Sailors) is wrong because it prints all the snames rather than sids.
Get Answers For Free
Most questions answered within 1 hours.