The Gateway to Computer Science Excellence
+1 vote
128 views

Class(name, meets_at, room, fid)

Faculty(fid, fname, deptid)

Find the names of faculty members who teach in every room in which some class is taught

in Databases by Loyal (5.2k points)
edited by | 128 views
0
This could be done by division operation in RA
0
im trying division operation only
0
In RA it will be

$\prod _{fname}\left ( Class\bowtie Faculty \right )\div \prod _{name}\left ( Class \right )$
0

found a good resource

https://www.geeksforgeeks.org/sql-division/

implementation 2 has been used in most of the solution manuals of standard textbooks

implementation 1 is a bit confusing so I tried to modify it a bit. please correct me if I'm wrong

R(x, y) ÷ S(y)

select * from R where x NOT IN        

            (select x from

                       (select x, y from 

                            (select distinct x from R CROSS JOIN select y from S)

                             EXCEPT

                             (select x, y from R)

                        )

            )

0
taking table , we need to verify it

2 Answers

0 votes
by (261 points)
0
where is table??
0 votes
by (261 points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,382 answers
198,530 comments
105,323 users