RDBMS MCQ (Multiple Choice Questions)

Here are 1000 MCQs on RDBMS (Chapterwise).

1. Which of the following is the full form of RDBMS?
a) Relational Data Management System
b) Relational Database Management System
c) Relative Database Management System
d) Regional Data Management System
View Answer

Answer: b
Explanation: A relational database management system (RDBMS) is a set of applications and features that allow IT professionals and others to develop, edit, administer, and interact with relational databases.

2. What is an RDBMS?
a) Database that stores data elements that are not linked
b) Database that accesses data elements that are not linked
c) Database that stores and allows access to data elements that are linked
d) None of the mentioned
View Answer

Answer: c
Explanation: A relational database is a form of database that stores and allows access to data elements that are linked. The relational model, a simple and obvious means of representing data in tables, is the foundation of relational databases.

3. Does RDBMS have ACID properties?
a) Follows ACID properties
b) Doesn’t follow ACID properties
c) Depends on the data stored in the database
d) Can’t say
View Answer

Answer: c
Explanation: Relational database transactions are defined by four key properties: atomicity, consistency, isolation, and durability (also known as ACID).
i) All of the elements that make up a full database transaction are defined by atomicity.
ii) The principles for keeping data points in a valid condition following a transaction are defined by consistency.
iii) To minimize confusion, isolation makes the consequence of a transaction invisible to others until it is committed.
iv) Once a transaction is committed, durability ensures that data changes are permanent.

4. What is a relation in RDBMS?
a) Key
b) Table
c) Row
d) Data Types
View Answer

Answer: b
Explanation: In a relational database, each table, also known as a relation, includes one or more data types in the form of columns or attributes. Each row, also known as a record or tuple, includes a single instance of data — or key — for each of the columns categories.

5. Which of the following systems use RDMS?
a) Oracle
b) Microsoft SQLServer
c) IBM
d) All of the mentioned
View Answer

Answer: d
Explanation: Manufacturing, human resources, and banking are all industries that use relational database management systems. IBM, Oracle, MySQL, Microsoft SQLServer, and PostgreSQL are some examples of RDBMS-based systems.
advertisement
advertisement

6. Dynamic hashing allows us to?
a) Accommodate the growth of the database
b) Accommodate the shrinkage of the database
c) Allows modification of hash function
d) All of the mentioned
View Answer

Answer: d
Explanation: Dynamic hashing allows us to accommodate the growth of the database and the shrinkage of the database by allowing us to change the hash function dynamically.

7. Which of the following constraints RDBS doesn’t check before creating the tables?
a) Not null
b) Primary keys
c) Data Structure
d) Data integrity
View Answer

Answer: c
Explanation: Before creating the tables, the RDBMS will check the following constraints:

  1. Primary keys
  2. Foreign keys
  3. Not null
  4. Check
  5. Data integrity

8. Which of the following is the correct option for the given query?

SELECT DISTINCT name 
FROM RDBMS
WHERE ID IS NOT NULL;

a) The query gives all the possible RDBMS names where a finite value exists for ID
b) The query gives the RDBMS names where a finite value exists for ID and it excludes identical names
c) The query gives the names of the RDBMS that have a null ID and it also excludes identical names
d) The query is syntactically wrong
View Answer

Answer: b
Explanation: The distinct keyword is used to remove tuples that have identical values. The is not null clause checks only for ID’s that are not null values.

9. Which of the following is the correct output for the given query?

(SELECT databaseid
FROM RDBMS 
WHERE SECTION = 'c')
EXCEPT
(SELECT databaseid
FROM RDBMS
WHERE id < 10);

a) All the values of the databaseid for which section is c and id > 10
b) All the values of the databaseid for which section not c and id > 10
c) All the values of the databaseid for which section is c and id < 10
d) All the values of the databaseid for which section not c and id < 10
View Answer

Answer: a
Explanation: The except operation excludes all the tuples that are present in the result of the second query from the result of the first query. It also excludes all duplicates from the relation.

10. Which of the following commands do we use to delete a relation (RDBMS) from a database?
a) delete table RDBMS
b) drop table RDBMS
c) delete from RDBMS
d) drop relation RDBMS
View Answer

Answer: b
Explanation: The drop table command is used to delete a relation from a database whereas the delete table removes all the tuples from a relation
advertisement

11. If RDBMS1, RDBMS2, RDBMS3 are attributes in a relation and S is another relation, which of the following is an incorrect specification of an integrity constraint?
a) foreign key(RDBMS1, RDBMS2)
b) foreign key(RDBMS1, RDBMS2) references S
c) primary key(RDBMS1, RDBMS2, RDBMS3)
d) primary key(RDBMS1)
View Answer

Answer: a
Explanation: Whenever the integrity constraint foreign key is mentioned, the attributes that are the foreign keys should always be referenced from the relation in which they are primary keys.

12. Which of the following is the time of temporal data that record when a fact was recorded in a database?
a) Enter time
b) Exit time
c) Valid time
d) Transaction time
View Answer

Answer: d
Explanation: The transaction time is the time of temporal data that records when a fact was recorded in a database.

13. ________ deletes a data item from a database.
a) Insert(RDBMS)
b) Drop(RDBMS)
c) Delete(RDBMS)
d) None of the mentioned
View Answer

Answer: c
Explanation: Delete(RDBMS) deletes a data item from a database. Insert(RDBMS) inserts a new data item RDBMS into the database and assigns RDBMS an initial value.

14. What is the result of the following query?

SELECT studentdatabasename
FROM RDBMS
WHERE marks > SOME (SELECT marks
                                        FROM student
                     WHERE SECTION = 'c');

a) The query gives all the studentdatabasename for which marks are greater than all the students in section c
b) The query gives all the studentdatabasename for which the marks are greater than at least on student in section c
c) The query gives all the studentdatabasename for which the marks are less than all the students in section c
d) The query is syntactically incorrect
View Answer

Answer: b
Explanation: The “some” comparison is used to check for at least one condition. The > symbol is used to test whether the marks are greater than the right-hand side or not.
advertisement

15. ________ is a predicate that we expect the database to always satisfy
a) Reason
b) Mandate
c) Assertion
d) Verify
View Answer

Answer: c
Explanation: An assertion is a predicate that we expect the database to always satisfy. Domain constraints and referential integrity constraints are special forms of assertions.

16. Which of the following is a good database management practice?
a) Adding redundant attributes
b) Not specifying primary keys
c) Removing redundant attributes
d) None of the mentioned
View Answer

Answer: c
Explanation: Removing redundant attributes from a relation makes data extraction more efficient and faster. Thus, it is a good database management technique.

17. What is an Instance of a Database?
a) The state of the database system at any given point of time
b) The entire set of attributes of the Database put together in a single relation
c) The initial values inserted into the Database immediately after its creation
d) The logical design of the database system
View Answer

Answer: a
Explanation: The state of the database system at any given point of time is called as an Instance of the database.

18. The schema for the relationship set linking a weak entity set to its corresponding strong entity set is redundant.
a) False
b) True
View Answer

Answer: b
Explanation: The schema for the relationship set linking a weak entity set to its corresponding strong entity set is redundant and it need not be present in the relational database design derived from an ER diagram.

19. Which of the following information does the database system catalog store?
a) Number of blocks
b) Size of a tuple of a relation
c) Number of tuples
d) All of the mentioned
View Answer

Answer: d
Explanation: The database system catalog stores the number of tuples, number of blocks, size of a tuple in a relation, and the blocking factor in it as statistical data.

20. If the database modifications occur while the transaction is still active, the transaction is said to use the __________ modification technique
a) Immediate
b) Deferred
c) More than one of the mentioned
d) None of the mentioned
View Answer

Answer: a
Explanation: If the database modifications occur while the transaction is still active, the transaction is said to use the immediate modification technique. Deferred modification has overhead whereas immediate modification doesn’t have any overhead.

21. If a transaction does not modify the database until it has committed it is said to use a _______ modification technique
a) Immediate
b) Deferred
c) More than one of the mentioned
d) None of the mentioned
View Answer

Answer: b
Explanation: If a transaction does not modify the database until it has committed it is said to use a deferred modification technique. Deferred modification has the overhead that transactions need to make local copies of all updated data items.

22. The dependency rules specified by the database designer are known as _______
a) Functional dependencies
b) Designer dependencies
c) Database rules
d) None of the mentioned
View Answer

Answer: a
Explanation: The dependency rules specified by the database designer are known as functional dependencies. The normal forms are based on functional dependencies.

23. During the _______ phase, the local variables that hold the write operations are copied to the database
a) Validation phase
b) Write phase
c) Read phase
d) None of the mentioned
View Answer

Answer: b
Explanation: During the write phase, the local variables that hold the write operations are copied to the database. Read only operations omit this phase.

24. What is the format of entering date into a database while inserting data into it?
a) “YYYY-MM-DD”
b) YYYY-MM-DD
c) “DD-MM-YYYY”
d) ‘YYYY-MM-DD’
View Answer

Answer: d
Explanation: The correct format for entering date into the database while inserting data is
‘YYYY-MM-DD’.

25. What does the following query do?

UPDATE student 
SET marks = marks*1.10;

a) It decreases the marks of all the students by 90%
b) It increases the marks of all the students by 10%
c) It is syntactically wrong
d) It increases the marks of all the students by 110%
View Answer

Answer: b
Explanation: The updated clause is used to edit a specific value in the tuple. The set command is used to set the value of an attribute in a tuple.

26. Which of the following cannot be used to modify the data in a database?
a) delete
b) update
c) drop
d) insert
View Answer

Answer: c
Explanation: The drop keyword is used to delete the entire relation leaving no trace of it in the memory. Thus it cannot be used to edit the data in the relation.

27. Observe the given SQL query and choose the correct option.

SELECT database_name, RDBMS (DISTINCT bankuser_name) 
FROM depositor, account 
WHERE depositor.account_number = account.account_number 
GROUP BY branch_id

a) The query is syntactically correct and gives the correct answer
b) The query is syntactically wrong
c) The query is syntactically correct but gives the wrong answer
d) The query contains one or more wrongly named clauses
View Answer

Answer: b
Explanation: The query is syntactically wrong. The attribute in the group by clause must be one of the attributes specified in the select clause.

28. for each tuple tr in r do begin

FOR each tuple ts IN s do BEGIN
test pair (tr , ts ) TO see IF they satisfy the JOIN condition _
IF they do, ADD tr • ts TO the RESULT;
END
END

What type of join is this?
a) Block nested loop join
b) Nested loop join
c) Hash join
d) Equi join
View Answer

Answer: b
Explanation: The given algorithm is called as a nested loop join because it basically consists of two nested for loops in it i.e. one for loop is inside another for loop.

29. Choose the correct option regarding the query

SELECT branch_name, COUNT (DISTINCT customer_name) 
FROM depositor, account 
WHERE depositor.account_number = account.account_number 
       GROUP BY branch_id
       HAVING avg(balance) = 10000;

a) The having clause allows only those tuples that have an average balance of 10000
b) The having clause checks whether the query result is true or not
c) The having clause does not check for any condition
d) None of the mentioned
View Answer

Answer: a
Explanation: The having clause is used to check for conditions that need to be set on aggregate functions.


Chapterwise Multiple Choice Questions on RDBMS

RDBMS MCQ - Multiple Choice Questions and Answers

Our 1000+ MCQs focus on all topics of the RDBMS subject, covering 100+ topics. This will help you to prepare for exams, contests, online tests, quizzes, viva-voce, interviews, and certifications. You can practice these MCQs chapter by chapter starting from the 1st chapter or you can jump to any chapter of your choice.
  1. Introduction to Relational Model and Sql
  2. Intermediate and Advanced Sql
  3. Database Design and the ER Model
  4. Relational Database Design
  5. Application Design and Development
  6. Storage and File Structure
  7. Indexing and Hashing
  8. Query Processing and Optimization
  9. Transactions
  10. Concurrency Control
  11. Recovery System
  12. Practical Questions

1. MCQ on Introduction to Relational Model and Sql

The section contains RDBMS multiple choice questions and answers on relational model basics, sql data definition, basic and set operations, aggregrate functions, nested subqueries and database modifications.

  • Introduction to the Relational Model
  • Sql Data Definition
  • Basic Operations
  • Set Operations
  • Aggregate Functions
  • Nested Subqueries
  • Modification of Database
  • 2. RDBMS Multiple Choice Questions on Intermediate and Advanced Sql

    The section contains RDBMS questions and answers on join expressions, views and transactions, integrity constraints, sql data types, olap and relational algebra.

  • Join Expressions
  • Views and Transactions
  • Integrity Constraints
  • Sql Data Types and Schemas
  • Accessing Sql from a Programming Language
  • Olap
  • The Relational Algebra
  • 3. RDBMS MCQ on Database Design and the ER Model

    The section contains RDBMS MCQs on entity relationship model and diagrams, relational schema and e-r features.

  • Entity Relationship Model
  • Entity Relationship Diagrams
  • Reduction to Relational Schema
  • Extended E – R Features
  • 4. Multiple Choice Questions on Relational Database Design

    The section contains RDBMS multiple choice questions and answers on relational design features, functional dependency theory and decomposition, decomposition algorithms and normal forms.

  • Features of Good Relational Design
  • Decomposition Using Functional Dependencies
  • Functional – Dependency Theory
  • Decomposition Algorithms
  • Normal Forms
  • 5. RDBMS MCQ on Application Design and Development

    The section contains RDBMS questions and answers on web fundamentals, servlets and jsp, application architectures and security.

  • Web Fundamentals
  • Servlets and Jsp
  • Application Architectures
  • Application Security
  • 6. RDBMS Multiple Choice Questions on Storage and File Structure

    The section contains RDBMS MCQs on magnetic disk, raid, file and record organization.

  • Magnetic Disk and Flash Storage
  • Raid
  • File Organization
  • Organization of Records in Files
  • 7. RDBMS MCQ on Indexing and Hashing

    The section contains RDBMS multiple choice questions and answers on ordered indices, b+ trees, bitmap indices, static and dynamic hashing.

  • Ordered Indices
  • B+ Trees
  • Static Hashing
  • Dynamic Hashing
  • Bitmap Indices
  • 8. RDBMS Multiple Choice Questions on Query Processing and Optimization

    The section contains RDBMS questions and answers on query processing, join operations, expressions evaluation, relational expressions, evaluation plans and materialized views.

  • Query Processing – Selection Operation & Sorting
  • Join and Other Operations
  • Evaluation of Expressions
  • Transformation of Relational Expressions
  • Estimating Statistics of Expression Results
  • Choice of Evaluation Plans
  • Materialized Views and Advanced Topics in Query Optimization
  • 9. RDBMS MCQ on Transactions

    The section contains RDBMS MCQs on transaction concept, serializability, transaction isolation and its levels.

  • Transaction Concept and Model
  • Serializability
  • Transaction Isolation
  • Transaction Isolation Levels
  • 10. RDBMS Multiple Choice Questions on Concurrency Control

    The section contains RDBMS multiple choice questions and answers on lock and timestamp based protocols, deadlock handling, multiversion schemes, validation based protocols, insert and delete operations.

  • Lock Based Protocols
  • Deadlock Handling
  • Timestamp Based Protocols
  • Validation Based Protocols
  • Multiversion Schemes, Snapshot Isolation
  • Insert, Delete Operations and Predicate Reads
  • 11. RDBMS MCQ on Recovery System

    The section contains RDBMS questions and answers on failure classification and storage, recovery and atomicity.

  • Failure Classification and Storage
  • Recovery and Atomicity
  • 12. RDBMS Practical Questions

    The section contains RDBMS MCQs on sql data definition and sql queries.

  • Sql Data Definition
  • Sql Queries – I
  • Sql Queries – II
  • Sql Queries – III
  • Sql Queries – IV
  • If you would like to learn "RDBMS" thoroughly, you should attempt to work on the complete set of 1000+ MCQs - multiple choice questions and answers mentioned above. It will immensely help anyone trying to crack an exam or an interview.

    Wish you the best in your endeavor to learn and master RDBMS!

    advertisement
    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.