adplus-dvertising
frame-decoration

Question

Consider the table:

Student (stuid, name, course, marks)
Which one of the following two queries is correct to find the highest marks student in course 5 ?

Q.1. Select S.stuid From student S Where not exists  (select * from student e where e.course = '5' and e.marks ≥s.marks)

Q.2. Select s.stuid From student S Where s.marks >any (select distinct marks from student S where s.course =5)

a.

Q.1

b.

Q.2

c.

Both Q.1 and Q.2

d.

Neither Q. 1 nor Q. 2

Answer: (d).Neither Q. 1 nor Q. 2

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Consider the table: Student (stuid, name, course, marks) Which one of the following two queries is correct to find the highest marks student in course 5 ? Q.1. Select...

Similar Questions

Discover Related MCQs

Q. Armstrong (1974) proposed systematic approach to derive functional dependencies. Match the following w.r.t. functional dependencies:

a.Decomposition Rule (i)   If X →Y and Z →W then {X, Z} → {Y, W}

b. Union Rule (ii)  If X →Y an  {Y,W} → Z then {X, W} → Z

c. Composition Rule (iii) If X →Y and X →Z then X → {Y, Z}
 
d. Pseudo transitivity Rule (iv) If X →{Y,Z} and  {Y,W} → Z then X → Y and  X →Z

Q. Match the following:
List - I                                         List - II

a. Secondary                          i.    Functional Dependency
Index

b. Nonprocedural                  ii.  B-Tree
Query
Language

c. Closure of                           iii. Relational Algebraic
set of                                                Operation
Attributes

d.  Natural                              iv. Domain Calculus
JOIN

Q. The best normal form of relation scheme R(A. B, C, D) along with the set of functional dependencies F = {AB → C, AB → D, C → A, D → B} is

Q. Identify the minimal key for relational scheme R(A, B, C, D, E) with functional dependencies F = {A → B, B → C, AC → D}

Q. Division operation is ideally suited to handle queries of the type :

Q. What kind of mechanism is to be taken into account for converting a weak entity set into strong entity set in entity-relationship diagram?

Q. Which of the following is true?

I.  Implementation of self-join is possible in SQL with table alias.

II. Outer-join operation is basic operation in relational algebra.

III. Natural join and outer join operations are equivalent.

Q. Which of the following is correct?

I. Two phase locking is an optimistic protocol.
II. Two phase locking is pessimistic protocol
III. Time stamping is an optimistic protocol.
IV. Time stamping is pessimistic protocol.

Q. ________________rules used to limit the volume of log information that has to be handled and processed in the event of system failure involving the loss of volatile information.

Q. Let R = ABCDE is a relational scheme with functional dependency set F = {A -> B, B ->C,AC -> D}. The attribute closures of A and E are

Q. Consider the following statements:

I. Re-construction operation used in mixed fragmentation satisfies commutative rule.
II. Re-construction operation used in vertical fragmentation satisfies commutative rule
Which of the following is correct?

Q. Which of the following is false?

Q. An Assertion is a predicate expressing a condition we wish database to always satisfy. The correct syntax for Assertion is :

Q. Which of the following concurrency protocol ensures both conflict serializability and freedom from deadlock ?

(a) 2-phase Locking
(b) Time stamp - ordering

Q. Drop Table cannot be used to drop a Table referenced by ________________ constraint.

(a) Primary key (b) Sub key (c) Super key (d) Foreign key

Q. Database applications were built directly on top of file system to overcome the following drawbacks of using file systems.
(a) Data redundancy and inconsistency
(b) Difficulty in accessing Data
(c) Data isolation
(d) Integrity problems

Q. For a weak entity set to be meaningful, it must be associated with another entity set in combination with some of their attribute values, is called as :

Q. Which of the following statements is FALSE about weak entity set ?

Q. Let E1 and E2 be two entities in E-R diagram with simple single valued attributes. R1 and R2 are two relationships between E1 and E2 where R1 is one - many and R2 is many - many. R1 and R2 do not have any attribute of their own. How many minimum number of tables are required to represent this situation in the Relational Model?

Q. The STUDENT information in a university stored in the relation STUDENT (Name, SEX, Marks, DEPT_Name)
Consider the following SQL Query SELECT DEPT_Name from STUDENT where SEX = 'M' group by DEPT_Name having avg (Marks)>SELECT avg (Marks) from STUDENT. It returns the Name of the Department for which: