Relational Schema
Question 1 |
Let R and S be two relations with the following schema
R (P, Q, R1, R2, R3)
S (P, Q, S1, S2)
Where (P, Q) is the key for both schemas. Which of the following queries are equivalent?

R (P, Q, R1, R2, R3)
S (P, Q, S1, S2)
Where (P, Q) is the key for both schemas. Which of the following queries are equivalent?

Only (I) and (II) | |
Only (I) and (III) | |
Only (I), (II) and (III) | |
Only (I), (III) and (IV) |
Question 1 Explanation:
Natural join is based on the common columns of the two tables.
We have two common columns in 'R' and 'S' which are 'P' and 'Q'.
(I) Both P and Q are used while doing the join, i.e., both P and Q are used to filter.
(II) Q is not used here for filtering. Natural join is done on all P's from R and all P's from S. So different from option (I).
(III) Through venn diagram it can be proved that A∩B = A - (A-B).
So through the above formula we can say that (III) and (IV) are equivalent.
So, finally (I), (III) and (IV) are equivalent.
We have two common columns in 'R' and 'S' which are 'P' and 'Q'.
(I) Both P and Q are used while doing the join, i.e., both P and Q are used to filter.
(II) Q is not used here for filtering. Natural join is done on all P's from R and all P's from S. So different from option (I).
(III) Through venn diagram it can be proved that A∩B = A - (A-B).
So through the above formula we can say that (III) and (IV) are equivalent.
So, finally (I), (III) and (IV) are equivalent.
Question 2 |
Anomalies are avoided by splitting the offending relation into multiple relations, also known as ________.
Acupressure | |
Decomposition | |
Precomposition | |
Both decomposition & precomposition |
Question 2 Explanation:
Anomalies are avoided by splitting the offending relation into multiple relations, also known as Decomposition.
Question 3 |
What is meant by the following relational algebra statement : STUDENT × COURSE?
Compute the natural join between the STUDENT and COURSE relations | |
Compute the left outer join between the STUDENT and COURSE relations | |
Compute the cartesian product between the STUDENT and COURSE relations | |
Compute the outer join between the STUDENT and COURSE relations |
Question 3 Explanation:
The Cartesian product of two sets A and B, denoted A×B, is the set of all ordered pairs (a, b) where a is in A and b is in B.
FALSE: Compute the natural join between the STUDENT and COURSE relations
FALSE: Compute the left outer join between the STUDENT and COURSE relations
TRUE: Compute the cartesian product between the STUDENT and COURSE relations
FALSE: Compute the outer join between the STUDENT and COURSE relations
FALSE: Compute the natural join between the STUDENT and COURSE relations
FALSE: Compute the left outer join between the STUDENT and COURSE relations
TRUE: Compute the cartesian product between the STUDENT and COURSE relations
FALSE: Compute the outer join between the STUDENT and COURSE relations
Question 4 |
A____is a pictorial depiction of the schema of a database that shows the relations in the databases, their attributes, and primary keys and foreign keys.
Relational query languages | |
Relational algebra
| |
Flow diagram | |
Schema Diagram |
Question 4 Explanation:
In database terms, a schema is the organisation and structure of a database. Both schemas and schemata can be used as plural forms. A schema contains schema objects, which could be tables, columns, data types, views, stored procedures, relationships, primary keys, foreign keys, etc.
A database schema can be represented in a visual diagram, which shows the database objects and their relationship with each other.
A database schema can be represented in a visual diagram, which shows the database objects and their relationship with each other.
There are 4 questions to complete.
