Question 1 |
Consider the relational database with the following four schemas and their respective instances.

The number of rows returned by the above SQL query is ___

The number of rows returned by the above SQL query is ___
1 | |
2 | |
4 | |
8 |
Question 1 Explanation:
Question 2 |
The relation scheme given below is used to store information about the employees of a company, where empId is the key and deptId indicates the department to which the employee is assigned. Each employee is assigned to exactly one department.
\textsf{emp($\underline{\textsf{empId}}$, name, gender, salary, deptId)}
Consider the following SQL query:
\textsf{emp($\underline{\textsf{empId}}$, name, gender, salary, deptId)}
Consider the following SQL query:
select deptId, count(*)
from emp
where gender = "female" and salary > (select avg(salary)from emp)
group by deptId;
The above query gives, for each department in the company, the number of female employees whose salary is greater than the average salary ofemployees in the department | |
employees in the company | |
female employees in the department | |
female employees in the company |
Question 2 Explanation:
Question 3 |
The SQL query
returns the following:
SELECT columns
FROM TableA
RIGHT OUTER JOIN TableB
ON A.columnName = B.columnName
WHERE A.columnName IS NULL
returns the following:
All rows in Table B, which meets equality condition above and, none from Table A which meets the condition. | |
All rows in Table A, which meets equality condition above and none from Table B, which meets the condition. | |
All rows in Table B, which meets the equality condition | |
All rows in Table A, which meets the equality condition |
Question 3 Explanation:
NOTE: Question is excluded from the evaluation due to ambiguity.
Click here for detail solution by gateoverflow
Click here for detail solution by gateoverflow
Question 4 |
Properties of 'DELETE' and 'TRUNCATE' commands indicate that
After the execution of 'TRUNCATE' operation, COMMIT, and ROLLBACK statements cannot be performed to retrieve the lost data, while 'DELETE' allow it | |
After the execution of 'DELETE' and 'TRUNCATE' operation retrieval is easily possible for the lost data | |
After the execution of 'DELETE' operation, COMMIT and ROLLBACK statements can be performed to retrieve the lost data, while TRUNCATE do not allow it | |
After the execution of 'DELETE' and 'TRUNCATE' operation no retrieval is possible for the lost data |
Question 4 Explanation:
Question 5 |
Consider a relational database containing the following schemas.

The primary key of each table is indicated by underlining the constituent fields.
The number of rows returned by the above SQL query is

The primary key of each table is indicated by underlining the constituent fields.
SELECT s.sno, s.sname
FROM Suppliers s, Catalogue c
WHERE s.sno=c.sno AND
cost > (SELECT AVG (cost)
FROM Catalogue
WHERE pno = 'P4'
GROUP BY pno) ;
The number of rows returned by the above SQL query is
4 | |
5 | |
0 | |
2 |
Question 5 Explanation:
Question 6 |
A relational database contains two tables Student and Performance as shown below:

The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together from the primary key. Consider the SQL query given below:

The primary key of the Student table is Roll_no. For the Performance table, the columns Roll_no. and Subject_code together from the primary key. Consider the SQL query given below:
SELECT S.Student_name, sum(P.Marks)
FROM Student S, Performance P
WHERE P.Marks > 84
GROUP BY S.Student_name;
The number of rows returned by the above SQL query is _________ . 3 | |
6 | |
5 | |
4 |
Question 6 Explanation:
Question 7 |
Consider the set of relations given below and the SQL query that follows:
Students: (Roll_number, Name, Date_of_birth )
Coursed: (Course_number, Course_name, Instructor )
Grades: (Roll_number, Course_number, Grade)
SELECT DISTINCT Name
FROM Students, Courses, Grades
WHERE Students.Roll_number = Grades.Roll_number
AND Courses.Intructor =Sriram
AND Courses.Course_number = Grades.Course_number
AND Grades.Grade = A
Which of the following sets is computed by the above query?Names of Students who have got an A grade in all courses taught by Sriram | |
Names of Students who have got an A grade in all courses | |
Names of Students who have got an A grade in at least one of the courses taught by Sriram | |
None of the above |
Question 7 Explanation:
Question 8 |
Given relations R(w,x) and S(y,z), the result of
SELECT DISTINCT w,x
FROM R,S
is guaranteed to be same as R, if
SELECT DISTINCT w,x
FROM R,S
is guaranteed to be same as R, if
R has no duplicates and S is non-empty | |
R and S have no duplicates | |
S has no duplicates and R is non-empty | |
R and S have the same number of tuples |
Question 8 Explanation:
Question 9 |
Consider the following two tables and four queries in SQL.
Which one of the queries above is certain to have an output that is a superset of the outputs of the other three queries?

Which one of the queries above is certain to have an output that is a superset of the outputs of the other three queries?
Query 1 | |
Query 2 | |
Query 3 | |
Query 4 |
Question 9 Explanation:
Question 10 |
\begin{array}{|l|l|l|l|l|} \hline \textbf{Employee} & \textbf{Department} & \textbf{OT allowance} \\ \hline \text{RAMA} & \text{Mechanical} & \text{5000} \\\hline \text{GOPI} & \text{Electrical} & \text{2000} \\\hline \text{SINDHU} & \text{Computer} & \text{4000} \\\hline \text{MAHESH} & \text{Civil} & \text{1500} \\\hline \end{array}
What is the output of the following SQL query?
What is the output of the following SQL query?
select count(*) from
((select Employee, Department from Overtime_allowance)
natural join
(select Department, OT_allowance from Overtime_allowance)
as T);
16 | |
4 | |
8 | |
None of the above |
Question 10 Explanation:
There are 10 questions to complete.
Ques 15; C should be the answer. Kindly check.
As per the ISRO Answer key option A and C are correct, but None of these are correct. See the detail Solution page now.
In Q-27 answer is option C
Answer Updated.