ago
56 views
0 0 votes

Consider

$\mathrm{Course}(\mathrm{cid},\mathrm{name},\mathrm{year},\mathrm{duration})$

$\mathrm{Student}(\mathrm{sid},\mathrm{name},\mathrm{univ})$

$\mathrm{Instructor}(\mathrm{tid},\mathrm{name},\mathrm{univ})$

$\mathrm{Enrollment}(\mathrm{sid},\mathrm{cid})$

$\mathrm{Teaches}(\mathrm{tid},\mathrm{cid})$.

We want the names of students who, in $2012$, took only courses taught by instructors from UW. Students who took no courses in $\mathbf{2012}$ must also be included.

Which logical structure is correct?

  1. $\exists s(\mathrm{Student}(s,n,v)\land\exists c,t,m,u,d(\mathrm{Enrollment}(s,c)\land \mathrm{Teaches}(t,c)\land$
    $\mathrm{Instructor}(t,m,u)\land \mathrm{Course}(c,x,2012,d)\land u=\mathrm{'UW'}))$
     
  2. $\exists s(\mathrm{Student}(s,n,v)\land\forall c,t,m,u,d((\mathrm{Enrollment}(s,c)\land \mathrm{Course}(c,x,2012,d))\Rightarrow u=\mathrm{'UW'}))$
    with no connection between $u$ and an instructor.
     
  3. $\exists s(\mathrm{Student}(s,n,v)\land\exists c(\mathrm{Course}(c,x,2012,d)\land u=\mathrm{'UW'}))$
     
  4. $\exists s(\mathrm{Student}(s,n,v)\land\forall c,t,m,u,d((\mathrm{Enrollment}(s,c)\land \mathrm{Teaches}(t,c)\land$
    $\mathrm{Instructor}(t,m,u)\land \mathrm{Course}(c,x,2012,d))\Rightarrow u=\mathrm{'UW'}))$

1 Answer

0 0 votes

For every relevant $2012$ enrollment/instructor combination of student $s$, if

$\mathrm{Enrollment}(s,c)$, $\mathrm{Teaches}(t,c)$, $\mathrm{Instructor}(t,m,u)$, and the course is in 2012, then $u=\mathrm{'UW'}$.

Why is universal implication necessary?

Because the query means:

there must not be any $\mathbf{2012}$ course taken by the student that is taught by a non-UW instructor.

The other important requirement is that students taking no courses in $2012$ are included.

With D, if no qualifying $2012$ course tuple exists for the student, the antecedent of the implication is always false. 

Therefore, the universal statement is true.

A requires at least one UW-taught course and therefore wrongly excludes students who took no courses in $2012$.

B leaves the instructor university disconnected from the actual teacher.

C does not connect the course to the student.

Therefore,

Answer : $\boxed{\mathrm{D}}$

ago
Answer:
Position:
Show:

Related questions

0 0 votes
1 1 answer
78
78 views
GO Classes asked 5 days ago
78 views
Consider the relation $\mathrm{Sailors}(\mathrm{sid},\mathrm{sname},\mathrm{rating},\mathrm{age})$ and the following TRC expression: $$\{S\mid \neg(S\in \mathrm{Sailors})...
0 0 votes
1 1 answer
58
58 views
GO Classes asked 5 days ago
58 views
Consider $\mathrm{Student}(\mathrm{sid},\mathrm{name},\mathrm{univ}),\mathrm{Enrollment}(\mathrm{sid},\mathrm{cid}).$Using the above schema, which condition correctly cha...
1 1 vote
1 1 answer
58
58 views
GO Classes asked 5 days ago
58 views
Using the same $\mathrm{Manager}$, $\mathrm{Stores}$, $\mathrm{Sales}$, and $\mathrm{Products}$ schema from the exam, define:$\mathrm{NailSale}(S)$ = store $S$ sold more ...
1 1 vote
1 1 answer
70
70 views
GO Classes asked 5 days ago
70 views
Consider $\mathrm{Manager}(\mathrm{NAME})$ and $\mathrm{Stores}(\mathrm{STORE\_ID},\mathrm{ADDRESS},\mathrm{REGION},\mathrm{MANAGER})$.Which TRC expression correctly retu...