Relational-databases
Question 1 |
Consider the following three relations in a relational database.
Employee ( eId , Name ), Brand ( bId , bName ), Own ( eId , bId )
Which of the following relational algebra expressions return the set of elds who own all the brands?
Employee ( eId , Name ), Brand ( bId , bName ), Own ( eId , bId )
Which of the following relational algebra expressions return the set of elds who own all the brands?
![]() | |
![]() | |
![]() | |
![]() |
Question 1 Explanation:
Option (A) returns eid’s which owns every brand of the relation Brand.
In relational algebra, divide (/) is not a basic operator and it can be derived from the basic operators. In option (B), the divide operator is derived using basic operators and which is equivalent to option (A)
In relational algebra, divide (/) is not a basic operator and it can be derived from the basic operators. In option (B), the divide operator is derived using basic operators and which is equivalent to option (A)
Question 2 |
Which one of the options given below refers to the degree (or arity) of a relation in relational database systems?
Number of attributes of its relation schema. | |
Number of tuples stored in the relation. | |
Number of entries in the relation. | |
Number of distinct domains of its relation schema. |
Question 3 |
A relation r(A, B) in a relational database has 1200 tuples. The attribute A has integer values ranging from 6 to 20, and the attribute B has integer values ranging from 1 to 20. Assume that the attributes A and B are independently distributed.


820 |
Question 3 Explanation:
Explanation :
Probability of 1st condition being satisfied(say P(A)) = 10/15 = 2/3
Probability of 2nd condition being satisfied(say P(B)) = 1/20
Probability of both conditions being satisfied(say P(A intersection B)) = 2/3*1/20 = 1/30
Probability of any one condition being satisfied = P(A union B) = P(A)+P(B)-P(A intersection B) = 2/3 + 1/20 - 1/30 = 41/60
therefore, expected number of tuples = (41/60)*1200 = 820
Question 4 |
Consider the following table in a relational database


{Last Name} | |
{Room} | |
{Shift} | |
{Room, Shift} |
Question 4 Explanation:
→ Candidate means uniquely identified key.
→ In the above table, Room having duplicate values. So, we can’t say room is candidate key
→ The last name also having duplicates. So, we can’t say the last name is candidate key.
→ Shift also having duplicate keys, so we can’t say shift also a candidate key.
→ Combining Room and Shift we can say that candidate key.
→ In the above table, Room having duplicate values. So, we can’t say room is candidate key
→ The last name also having duplicates. So, we can’t say the last name is candidate key.
→ Shift also having duplicate keys, so we can’t say shift also a candidate key.
→ Combining Room and Shift we can say that candidate key.
Question 5 |
Which commands are used to control access over objects in relational database?
CASCADE & MVD | |
GRANT & REVOKE | |
QUE & QUIST | |
None of these |
Question 5 Explanation:
DCL(Data Control Language) includes commands such as GRANT and REVOKE which mainly deals with the rights, permissions and other controls of the database system.
Examples of DCL commands:
GRANT-gives user’s access privileges to database.
REVOKE-withdraw user’s access privileges given by using the GRANT command.
Examples of DCL commands:
GRANT-gives user’s access privileges to database.
REVOKE-withdraw user’s access privileges given by using the GRANT command.
Question 6 |
What does the data dictionary identify?
Field names | |
Field Formats | |
Field Types | |
All of these |
Question 6 Explanation:
→ A data dictionary(or) metadata repository, as defined in the IBM Dictionary of Computing, is a "centralized repository of information about data such as meaning, relationships to other data, origin, usage, and format".
→ Oracle defines it as a collection of tables with metadata. The term can have one of several closely related meanings pertaining to databases and database management systems (DBMS)
1. A document describing a database or collection of databases
2. An integral component of a DBMS that is required to determine its structure
3. A piece of middleware that extends or supplants the native data dictionary of a DBMS
→ Oracle defines it as a collection of tables with metadata. The term can have one of several closely related meanings pertaining to databases and database management systems (DBMS)
1. A document describing a database or collection of databases
2. An integral component of a DBMS that is required to determine its structure
3. A piece of middleware that extends or supplants the native data dictionary of a DBMS
Question 7 |
Embedded pointer provides
A secondary access path | |
A physical record key | |
An inverted index | |
A primary key |
Question 7 Explanation:
1. To understand how pointers and their associated data elements are allocated in Microsoft RPC, you have to differentiate between top-level pointers and embedded pointers
2. Top-level pointers are those that are specified as the names of parameters in function prototypes. Top-level pointers and their referents are always allocated on the server.
3. Embedded pointers are pointers that are embedded in data structures such as arrays, structures, and unions. When embedded pointers only write output to a buffer and are null on input, the server application can change their values to non-null. In this case, the client stubs allocate new memory for this data.
4. If the embedded pointer is not null on the client before the call, the stubs do not allocate memory on the client on return. Instead, the stubs attempt to write the memory associated with the embedded pointer into the existing memory on the client associated with that pointer, overwriting the data already there.
Question 8 |
In RDBMS, which type of Join returns all rows that satisfy the join condition ?
Inner Join | |
Outer Join
| |
Semi Join | |
Anti Join |
Question 8 Explanation:
Inner Join :
Inner join combines two tables having a common attributes.
While combining it only join the rows of two tables having same value in common attribute.
So, in that way inner join return the records having matching values in both the tables.
Inner join combines two tables having a common attributes.
While combining it only join the rows of two tables having same value in common attribute.
So, in that way inner join return the records having matching values in both the tables.
There are 8 questions to complete.

