Question
Works (emp_name, company_name, salary)
Here, emp_name is primary key.
Consider the following SQL query:
Select emp_name
From Works T
where salary>(select avg (salary)
from Works S
where T.company_name=
S. Company_name)
The above query is for following:
a.
Find the highest paid employee who earns more than the average salary of all employees of his company
b.
Find the highest paid employee who earns more than the average salary of all the employees of all the companiesFind the highest paid employee who earns more than the average salary of all the employees of all the companiesFind the highest paid employee who earns more than the average salary of all the employees of all the companies
c.
Find all employees who earn more than the average salary of all employees of all the companies
d.
Find all employees who earn more than the average salary of all employees of their company
Posted under UGC NET computer science question paper DBMS
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Consider the following relation: Works (emp_name, company_name, salary) Here, emp_name is primary key. Consider the following SQL query: Select emp_name From Works...
Similar Questions
Discover Related MCQs
Q. DBMS provides the facility of accessing data from a database through
View solution
Q. Relational database schema normalization is NOT for:
View solution
Q. Consider the following statements regarding relational database model:
(a) NULL values can be used to opt a tuple out of enforcement of a foreign key.
(b) Suppose that table T has only one candidate key. If Q is in 3NF, then it is also in BCNF.
(c) The difference between the project operator (P) in relational algebra and the SELECT keyword in SQL is that if the resulting table/set has more than one occurrences of the same tuple, then P will return only one of them, while SQL SELECT will return all.
One can determine that:
View solution
Q. Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ?
View solution
Q. Which of the following statements is/are True regarding some advantages that an object-oriented DBMS (OODBMS) offers over a relational database?
I. An OODBMS avoids the “impedance mismatch” problem.
II. An OODBMS avoids the “phantom” problem.
III. An OODBMS provides higher performance concurrency control than most relational databases.
IV. An OODBMS provides faster access to individual data objects once they have been read from disk.
View solution
Q. The Global conceptual Schema in a distributed database contains information about global relations. The condition that all the data of the global relation must be mapped into the fragments, that is, it must not happen that a data item which belongs to a global relation does not belong to any fragment, is called :
View solution
Q. Consider the table R with attributes A, B and C. The functional dependencies that hold on R are : A → B, C → AB. Which of the following statements is/are True?
I. The decomposition of R into R1(C, A) and R2(A, B) is lossless.
II. The decomposition of R into R1(A, B) and R2(B, C) is lossy.
View solution
Q. Consider the following ORACLE relations:
One (x, y) = {<2, 5>, <1, 6>, <1, 6>, <1, 6>, <4, 8>, <4, 8>}
Two (x, y) = {<2, 55>, <1, 1>, <4, 4>, <1, 6>, <4, 8>, <4, 8>, <9, 9>, <1, 6>}
Consider the following two SQL queries SQ1 and SQ2:
SQ1 : SELECT * FROM One)
EXCEPT
(SELECT * FROM Two);
SQ2 : SELECT * FROM One)
EXCEPT ALL
(SELECT * FROM Two);
For each of the SQL queries, what is the cardinality (number of rows) of the result obtained when applied to the instances above?
View solution
Q. Which one of the following pairs is correctly matched in the context of database design?
List – I List – II
(Database term) (Definition)
I. Specialization A. Result of taking the union of two or more
disjoint (lower-level) entity sets to produce
a higher-level entity set.
II. Generalization B. Express the number of entities to which another
entity can be associated via a relationship set.
III. Aggregation C. Result of taking a subset of a higher-level
entity set to form a lower-level entity set.
IV. Mapping cardinalities D. An abstraction in which relationship sets (along
with their associated entity sets) are treated as
higher-level entity sets, and can participate in
relationships.
Codes :
I II III IV
View solution
Q. Consider a hash table of size m = 10000, and the hash function h(K)=floor(m(KAmod1)) for A = (√5 – 1)/2. The key 123456 is mapped to location ...............
View solution
Q. Which of the following statements concerning Object-Oriented databases is FALSE?
View solution
Q. In distributed databases, location transparency allows for database users, programmers and administrators to treat the data as if it is at one location. A SQL query with location transparency needs to specify:
View solution
Q. Consider the relations R(A,B) and S(B,C) and the following four relational algebra queries over R and S:
I. πA,B(R⋈S)
II. R⋈πB(S)
III. R∩(πA(R) Χ πB(S))
IV. πA,R.B(R Χ S) where R.B refers to the column B in table R.
One can determine that:
View solution
Q. Which of the following statements is TRUE?
D1: The decomposition of the schema R(A,B,C) into R1(A,B) and R2(A,C) is always lossless.
D2: The decomposition of the schema R(A,B,C,D,E) having AD→B, C→DE, B→AE, AE→C into R1(A,B,D) and R2(A,C,D,E) is lossless.
View solution
Q. Consider the following ORACLE relations:
R(A,B,C) = {<1,2,3>, <1,2,0>, <1,3,1>, <6,2,3>, <1,4,2>, <3,1,4>}
S(B,C,D) = {<2,3,7>, <1,4,5>, <1,2,3>, <2,3,4>, <3,1,4>}
Consider the following two SQL queries SQ1 and SQ2:
SQ1: SELECT R.B, AVG(S.B)
FROM R, S
WHERE R.A = S.C AND S.D < 7
GROUP BY R.B;
SQ2: SELECT DISTINCT S.B, MIN (S.C)
FROM S
GROUP BY S.B
HAVING COUNT (DISTINCT S.D) > 1;
If M is the number of tuples returned by SQ1 and N is the number of tuples returned by SQ2 then
View solution
Q. Semi-join strategies are techniques for query processing in distributed database system. Which of the following is a semi-join technique?
View solution
Q. Consider a “CUSTOMERS” database table having a column “CITY” filled with all the names of Indian cities (in capital letters). The SQL statement that finds all cities that have “GAR” somewhere in its name, is:
View solution
Q. Match the following database terms to their functions:
List-I List-II
(a) Normalization (i) Enforces match of primary key to foreign key
(b) Data Dictionary (ii) Reduces data redundancy in a database
(c) Referential Integrity (iii) Define view(s) of the database for particular user(s).
(d) External Schema (iv) Contains metadata describing database structure.
Codes:
(a) (b) (c) (d)
View solution
Q. Which of the following provides the best description of an entity type?
View solution
Q. Data which improves the performance and accessibility of the database are called:
View solution
Suggested Topics
Are you eager to expand your knowledge beyond DBMS? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!