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?
A
Only (I) and (II)
B
Only (I) and (III)
C
Only (I), (II) and (III)
D
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.
Question 2
Anomalies are avoided by splitting the offending relation into multiple relations, also known as ________.
A
Acupressure
B
Decomposition
C
Precomposition
D
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?
A
Compute the natural join between the STUDENT and COURSE relations
B
Compute the left outer join between the STUDENT and COURSE relations
C
Compute the cartesian product between the STUDENT and COURSE relations
D
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
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.

A
Relational query languages
B
Relational algebra
C
Flow diagram
D
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.
There are 4 questions to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access