Consider the relation "enrolled (student, course)" in which (student, course) is the primary key, and the relation "paid (student, amount)" where student is the primary key. Assume no null values and no foreign keys or integrity constraints. Given the following four queries:
Query 1:
Select student
from enrolled
where student in (select student from paid)
Query 2:
Select student
from paid
where student in (select student from enrolled)
Query 3:
Select E.student
from enrolled E, paid P
where E.student = P.student
Query 4:
Select student
from paid
where exists (Select *
from enrolled
where enrolled.student = paid.student)
Which one of the following statements is correct?
Query1:
Select A.customer, count(B.customer)
From account A, account B
Where A.balance <=B.balance
Group by A.customer
Query2:
Select A.customer, 1+count(B.customer)
From account A, account B
Where A.balance < B.balance
Group by A.customer
Consider these statements about Query1 and Query2.
1. Query1 will produce the same row set as Query2 for some but not all databases.
2. Both Query1 and Query2 are correct implementation of the specification
3. Query1 is a correct implementation of the specification but Query2 is not
4. Neither Query1 nor Query2 is a correct implementation of the specification
5. Assigning rank with a pure relational query takes less time than scanning in decreasing balance order assigning ranks using ODBC.
Which two of the above statements are correct?$$\eqalign{ & AB \to CD,\,AF \to D,\,\,DE \to F, \cr & C \to G.\,\,\,\,\,\,\,\,\,\,F \to E.\,\,\,\,\,\,\,\,\,G \to A. \cr} $$
Which one of the following options is false?
A disk seek takes $$4ms$$, disk data transfer bandwidth is $$300MB/s$$ and checking a tuple to see if amount is greater than $$x$$ takes $$10\mu s.$$ Which of the following statements is correct?