in Databases
325 views
0 votes
0 votes
relation

parts(pid, pname, color)

catalog(sid, pid, cost)

find the sids of suppliers who supply every red part.
can someone give the TRC and DRC expression for this?
in Databases
by
325 views

1 Answer

0 votes
0 votes
For TRC -

{c.sid | catalog(c) AND (∃p)(parts(p) AND c.pid = p.pid AND p.color = "red")}

For DRC -

we will give each attribute a name parts(a,b,c) and catalog(d,e,f)

{d | (∃a)(∃e)(∃c)(catalog(def) AND parts(abc) AND e=a AND c="red")}

Related questions