3)
Get the name of the employee who works on GPU project.
TRC:
{E.name | E in Employees and (exists W in Workon, P in Projects)(P.name = 'GPU' and E.E# = W.E#
and W.P# = P.P#)};
DRC:
{N | (exists E, P)(Employees(E,N,_,_) and Workon(E,P,_) and (Projects(P, 'GPU',_)};
4)
Get the name of the employee who does not work on any project.
TRC:
{E.name | E in Employees and not (exists W in Workon)(E.E# = W.E#)};
DRC:
{N | (exists E)(Employees(E,N,_,_) and not Workon(E,_,_))};
5)
Get the pair of employee name and project name such that the employee works on the project less than 300
hours.
TRC:
{E.name, P.name | E in Employees and P in Projects and (exists W in Workon)
(E.E# = W.E#
and W.P# = P.P# and W.Hours < 300)};
DRC:
{EN,PN |(exists E, P, H)(Employees(E,EN,_,_) and Workon(E,P,H) and Projects(P, PN,_) and H<300)};
6)
Get the name of the employee who works on every project
TRC:
{E.name | E in Employee and
(forall P in Projects) ((exists W in Workson)(W.E# = E.E# and W.P# = P.P#))};
DRC:
{N | (exists E)(Employees(E,N,_,_) and (forall P)(not Projects(P,_,_) or Workon(E,P,_)))};
7)
Get the name of the employee who works on every project except SSD.
TRC:
{E.name | E in Employees and (forall P in Projects)
(P.Name = 'SSD' and not (exists W in Workon)(E.E# = W.E# and W.P# = P.P#))
or
(P.name <> 'SSD' (exists W in Workon)(E.E# = W.E# and W.P# = P.P#))};
DRC:
{N | (exists E)(Employee(E,N,_,_) and (forall P)
(not (exists M)(Projects(P,M,_) and (M <> 'SSD' or Workson(E,P,_)))
or
(not (exists M)(Projects(P,M,_) and M = 'SSD' or not Workson(E,P,_))))};
8)
Get the name of the employee who works on every project that Clark works on.
TRC:
{E1.name | E1 in Employees and E1.name != 'Clark' and (exists E in Employee)(E.name = 'Clark' and
(forall P in Projects)(exists W in Workon, W1 in Workon)
(E.E# = W.E# and W.E# = P.E# and E1.E# = W1.E# and W1.P# = P.P#)))}:
DRC:
{N | (exists E1,E)(Employee(E1,N,_,_) and N <> ‘Clark’ and (Employee(E,’Clark’,_,_) and (forall P)(not
Workson(E,P,_)) or Workson(E1,P,_)))};
9)
Get the name of the employee who works on the same projects that Clark works on.
TRC:
{E1.name | E1 in Employees and E1.name != 'Clark' and (exists E in Employees)(E.name = 'Clark' and