Database Questions and Answers – Relational Query Operations and Relational Operators

This set of Database MCQs focuses on “Relational Query Operations and Relational Operators”.

1. Using which language can a user request information from a database?
a) Query
b) Relational
c) Structural
d) Compiler
View Answer

Answer: a
Explanation: Query language is a method through which the database entries can be accessed.

2. Student(ID, name, dept name, tot_cred)
In this query which attributes form the primary key?
a) Name
b) Dept
c) Tot_cred
d) ID
View Answer

Answer: d
Explanation: The attributes name, dept and tot_cred can have same values unlike ID.

3. Which one of the following is a procedural language?
a) Domain relational calculus
b) Tuple relational calculus
c) Relational algebra
d) Query language
View Answer

Answer: c
Explanation: Domain and Tuple relational calculus are non-procedural language. Query language is a method through which database entries can be accessed.
advertisement
advertisement

4. The_____ operation allows the combining of two relations by merging pairs of tuples, one from each relation, into a single tuple.
a) Select
b) Join
c) Union
d) Intersection
View Answer

Answer: b
Explanation: Join finds the common tuple in the relations and combines it.

5. The result which operation contains all pairs of tuples from the two relations, regardless of whether their attribute values match.
a) Join
b) Cartesian product
c) Intersection
d) Set difference
View Answer

Answer: b
Explanation: Cartesian product is the multiplication of all the values in the attributes.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. The _______operation performs a set union of two “similarly structured” tables
a) Union
b) Join
c) Product
d) Intersect
View Answer

Answer: a
Explanation: Union just combines all the values of relations of same attributes.

7. The most commonly used operation in relational algebra for projecting a set of tuple from a relation is
a) Join
b) Projection
c) Select
d) Union
View Answer

Answer: c
Explanation: Select is used to view the tuples of the relation with or without some constraints.
advertisement

8. The _______ operator takes the results of two queries and returns only rows that appear in both result sets.
a) Union
b) Intersect
c) Difference
d) Projection
View Answer

Answer: b
Explanation: The union operator gives the result which is the union of two queries and difference is the one where query which is not a part of second query.

9. A ________ is a pictorial depiction of the schema of a database that shows the relations in the database, their attributes, and primary keys and foreign keys.
a) Schema diagram
b) Relational algebra
c) Database diagram
d) Schema flow
View Answer

Answer: a
Explanation: None.
advertisement

10. The _________ provides a set of operations that take one or more relations as input and return a relation as an output.
a) Schematic representation
b) Relational algebra
c) Scheme diagram
d) Relation flow
View Answer

Answer: b
Explanation: None.

Sanfoundry Global Education & Learning Series – Database Management System.

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.