1) Why would you want to sometimes de-normalize data?
A. Prevent data from becoming inconsistent
B. Improve query response
C. Eliminate redundant data
D. All of the above
2) Given two tables, each with one column X of type number which is the primary key. Table A has 100 rows, Table B has 50 rows. When doing an Inner Join between A and B on X, which option would be correct?
The maximum possible number of rows is 100, the minimum possible number of rows 50
The maximum possible number of rows is 5000, the minimum possible number of rows 0
The maximum possible number of rows is 50, the minimum possible number of rows 0
The maximum possible number of rows is 100, the minimum possible number of rows 100
It is not possible to estimate a maximum and minimum. More information is needed.
3) Given two tables, each with one column X of type number which is the primary key. Table A has 100 rows, Table B has 50 rows. When doing a Left Outer join from A to B on X, which option would be correct?
The maximum possible number of rows is 100, the minimum possible number of rows 50
The maximum possible number of rows is 5000, the minimum possible number of rows 0
The maximum possible number of rows is 50, the minimum possible number of rows 0
The maximum possible number of rows is 100, the minimum possible number of rows 100
It is not possible to estimate a maximum and minimum. More information is needed.
4)Two tables A and B are given:
A B
X Y Y Z
1 1 2 1
2 2 2 2
3 1 3 3
4 2 4 5
How many rows will be in the result set of the following query?
SELECT B.Z
FROM A LEFT OUTER JOIN B
ON A.X = B.Y
6 Rows
5 Rows
4 Rows
2 Rows
1 Row
5)Two tables A and B are given:
A B
X Y
1 1
2 2
3 5
7
How many rows will be in the result set of the following query?
SELECT A.X, B.Y
FROM A, B
WHERE A.X < 3 AND B.Y > = 2
5 Rows
6 Rows
7 Rows
10 Rows
12 Rows
6) The following EMPLOYEE table is given:
ID NAME DEPT SALARY
1 JOHN HR 100
2 SAM IT 200
3 TOM QA 150
4 NICOLE