Professional Documents
Culture Documents
DBMS MCQs - Finals Prep
DBMS MCQs - Finals Prep
2. What issue is associated with the table entries having data inconsistencies, such as
variations in the representation of job classes?
A) Update anomalies
B) Insertion anomalies
C) Deletion anomalies
D) Data redundancies
5. During the conversion to 2NF, what is the purpose of writing each key component on a
separate line?
8. In database normalization, what is the term for a dependency where one non-prime attribute
depends on another non-prime attribute?
A) Partial dependency
B) Transitive dependency
C) Composite dependency
D) Multivalued dependency
9. What is the key requirement for a table to be in Fourth Normal Form (4NF)?
10. According to the rules for 4NF, what is the limitation on attributes in a row?
1. When using the GROUP BY clause in SQL, what is the purpose of the HAVING clause?
2. Which of the following is true about the ORDER BY clause when used with GROUP BY in
SQL?
4. In SQL, which clause is specifically designed to evaluate conditions based on group functions
such as SUM and COUNT?
A) WHERE clause
B) HAVING clause
C) GROUP BY clause
D) ORDER BY clause
5. When using GROUP BY and WHERE together, what is the order of execution in Oracle?
A) WHERE, GROUP BY
B) GROUP BY, WHERE
C) WHERE, HAVING
D) GROUP BY, HAVING
7. Which group function in SQL is used to find the total number of rows in a group?
A) SUM
B) AVG
C) COUNT
D) MIN
8. What does the DISTINCT clause do when used with the COUNT function in SQL?
A) Data retrieval
B) Data storage
C) Ensuring data consistency
D) Database optimization
2. Which of the following properties of transactions ensures that all operations of a transaction
are completed or none at all?
A) Atomicity
B) Consistency
C) Isolation
D) Durability
A) Database recovery
B) Data retrieval
C) Query optimization
D) Transaction isolation
5. Which concurrency control problem occurs when two transactions are updating the same
data element, and one update is lost?
A) Inconsistent retrievals
B) Lost updates
C) Uncommitted data
D) Data isolation
A) Database optimization
B) Query execution
C) Ensuring serializability and isolation
D) Data recovery
8. Which lock granularity allows concurrent transactions to access the same row if they require
different fields within that row?
A) Table-level lock
B) Page-level lock
C) Row-level lock
D) Field-level lock
A) Exclusive access
B) Read access
C) Write access
D) Lock escalation
10. What type of lock has only two states: locked or unlocked?
A) Shared lock
B) Exclusive lock
C) Binary lock
D) Field-level lock
Lecture 18: Sub-Queries
A) HAVING
B) WHERE
C) JOIN
D) ON
4. Which clause of the INSERT command allows the use of a subquery in Oracle 8i and later
versions?
A) SELECT
B) VALUES
C) FROM
D) INTO
5. What is the main purpose of the NOT EXISTS operator in a correlated subquery?
3. When a view is created, the ORDER BY clause cannot be used in the query. What is the
reason for this limitation?
4. How can a view be used to isolate an application from changes in the definition of tables?
5. In the context of views, what does the term "stored query" refer to?
8. What is the purpose of the "WITH CHECK OPTION" clause when creating a view?
9. Which of the following SQL statements is used to modify the definition of an existing view?
A) ALTER VIEW
B) UPDATE VIEW
C) MODIFY VIEW
D) CHANGE VIEW
10. Which SQL statement is used to remove a view from the database?
A) DELETE VIEW
B) REMOVE VIEW
C) DROP VIEW
D) ERASE VIEW
A) Improved syntax
B) Enhanced data retrieval
C) Support for procedural statements
D) Increased network traffic
2. Which PL/SQL unit is stored in the database with a name and can be executed using that
name?
A) Anonymous block
B) Constant
C) Stored procedure
D) Control structure
A) = operator
B) => operator
C) <- operator
D) := operator
A) Increased complexity
B) Business logic duplication
C) Automatic client updates
D) Easy modification of concerned procedures
7. What is the main difference between a stored procedure and a function in PL/SQL?
A) 500
B) 5000
C) 50000
D) 5
10. In PL/SQL, what will happen if an exception is raised but not handled in the current block or
its enclosing blocks?
12. What does the FETCH statement do in PL/SQL with respect to cursors?
5. What is the default correlation name for accessing new values in a row-level trigger?
A) CURRENT
B) NEXT
C) NEW
D) LATEST
6. How can you determine which DML command fired a trigger in SQL?
A) DELETE TRIGGER
B) REMOVE TRIGGER
C) DROP TRIGGER
D) ERASE TRIGGER
Lecture: NoSQL
A) Relational
B) Key-Value
C) Document-Oriented
D) Graph
5. Which theorem is often considered when discussing the trade-offs in distributed systems,
including NoSQL databases?
A) Pythagorean Theorem
B) CAP Theorem
C) Fermat's Last Theorem
D) Gödel's Incompleteness Theorems
7. Which NoSQL database is known for its support of key-value pairs and in-memory caching?
A) Cassandra
B) MongoDB
C) Redis
D) Couchbase
A) Document-Oriented
B) Key-Value
C) Column-Family
D) Graph
A) Vertical scalability
B) Horizontal scalability
C) Linear scalability
D) Static scalability
10. In NoSQL databases, which term refers to the process of distributing data across multiple
servers to improve performance and reliability?
A) Fragmentation
B) Sharding
C) Replication
D) Normalization
Lecture: MongoDB
A) Relational Database
B) Document-Oriented Database
C) Key-Value Database
D) Graph Database
A) $gt
B) $lt
C) $gte
D) $lte
8. Which MongoDB operator is used to perform a query for values within a specified range?
A) $in
B) $exists
C) $between
D) $range
9. Which MongoDB method is used to count the number of documents returned by a query?
A) count()
B) total()
C) size()
D) length()
Answers
1. C
2. A
3. B
4. A
5. B
6. C
7. A
8. D
9. B
10. C
Lecture: NoSQL
1. C
2. C
3. C
4. C
5. B
6. C
7. C
8. C
9. B
10. B
Lecture: MongoDB
1. B
2. D
3. C
4. A
5. A
6. C
7. B
8. A
9. A