A directory of Objective Type Questions covering all the Computer Science subjects. Here you can access and discuss Multiple choice questions and answers for various compitative exams and interviews.

61. 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 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
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).Find all employees who earn more than the average salary of all employees of their company

62. DBMS provides the facility of accessing data from a database through
a. DDL
b. DML
c. DBA
d. Schema
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).DML

63. Relational database schema normalization is NOT for:
a. reducing the number of joins required to satisfy a query
b. eliminating uncontrolled redundancy of data stored in the database
c. eliminating number of anomalies that could otherwise occur with inserts and deletes
d. ensuring that functional dependencies are enforced
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).reducing the number of joins required to satisfy a query

64. 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:
a. (a) and (b) are true
b. (a) and (c) are true
c. (b) and (c) are true
d. (a), (b) and (c) are true
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).(a), (b) and (c) are true

65. Consider the following Entity-Relationship (E-R) diagram and three possible relationship sets (I, II and III) for this E-R diagram.

If different symbols stand for different values (e.g., t1 is definitely not equal to t2), then which of the above could not be the relationship set for the E-R diagram ?
E-R diagram
a. I only
b. I and II only
c. II only
d. I, II and III
View Answer Report Discuss Too Difficult! Search Google
Answer: (a).I only

66. Consider a database table R with attributes A and B. Which of the following SQL queries is illegal ?
a. SELECT A FROM R;
b. SELECT A, COUNT(*) FROM R;
c. SELECT A, COUNT(*) FROM R GROUP BY A;
d. SELECT A, B, COUNT(*) FROM R GROUP BY A, B;
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).SELECT A, COUNT(*) FROM R;

67. 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.
a. II and III only
b. I and IV only
c. I, II, and III only
d. I, III and IV only
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).I and IV only

68. 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 :
a. Disjointness condition
b. Completeness condition
c. Reconstruction condition
d. Aggregation condition
View Answer Report Discuss Too Difficult! Search Google
Answer: (b).Completeness condition

69. Suppose database table T1(P, R) currently has tuples {(10, 5), (15, 8), (25, 6)} and table T2 (A, C) currently has {(10, 6), (25, 3), (10, 5)}. Consider the following three relational algebra queries RA1, RA2 and RA3.

The number of tuples in the resulting table of RA1, RA2 and RA3 are given by:
relational algebra queries
a. 2, 4, 2 respectively
b. 2, 3, 2 respectively
c. 3, 3, 1 respectively
d. 3, 4, 1 respectively
View Answer Report Discuss Too Difficult! Search Google
Answer: (d).3, 4, 1 respectively

70. 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.
a. Only I
b. Only II
c. Both I and II
d. Neither I nor II
View Answer Report Discuss Too Difficult! Search Google
Answer: (c).Both I and II