Database Modeling and Design MCQs with Answers
Practice important Database Modeling and Design MCQs with answers and explanations.
Chapter: 21
Q301:
Which SQL statement retrieves the next value from a sequence named `customers_seq`?
A. SELECT customers_seq.nextval FROM dual;
B. SELECT customers_seq.currval FROM dual;
C. SELECT * FROM user_sequences WHERE sequence_name = 'customers_seq';
D. SELECT nextval FROM customers_seq;
Correct Answer:
A
Chapter: 21
Q302:
How do you drop a sequence named `mySeq` in Oracle?
A. DROP SEQUENCE mySeq;
B. DELETE SEQUENCE mySeq;
C. REMOVE SEQUENCE mySeq;
D. CLEAR SEQUENCE mySeq;
Correct Answer:
A
Chapter: 21
Q303:
Fill in the blank: A sequence in Oracle generates unique numbers _______. Independently of tables
A. Based on table data
B. From user input
C. By manually setting values
Correct Answer:
A
Chapter: 21
Q304:
Fill in the blank: The `INCREMENT BY` clause in a sequence determines _______. The interval between sequence numbers
A. The maximum value of the sequence
B. The starting value of the sequence
C. The caching of sequence values
Correct Answer:
A
Chapter: 22
Q305:
What is the primary purpose of an index in a database?
A. Finding records quickly
B. Sorting data alphabetically
C. Updating records efficiently
D. Deleting records safely
Correct Answer:
A
Chapter: 22
Q306:
Which of the following statements is true about indexes in databases?
A. Indexes are built on the entire table.
B. Indexes are used to find records quickly.
C. Indexes increase the size of the database file.
D. Indexes slow down query performance.
Correct Answer:
B
Chapter: 22
Q307:
Indexes are created on one or more columns of a table to:
A. Increase storage space
B. Speed up data retrieval
C. Sort records in descending order
D. Remove duplicates
Correct Answer:
B
Chapter: 22
Q308:
In the index table structure, which of the following is maintained?
A. Only the key values
B. Only the row ID
C. The key values and row ID
D. The actual data and row ID
Correct Answer:
C
Chapter: 22
Q309:
To search for a record in a table without an index, the system must:
A. Sort the data alphabetically
B. Search every row in the table
C. Use a pre-sorted index
D. Table all rows in the table
Correct Answer:
B
Chapter: 22
Q310:
What is the purpose of the CREATE INDEX statement in Oracle?
A. To delete an existing index
B. To modify a table structure
C. To create a new index on a table
D. To retrieve data from a table
Correct Answer:
C
Chapter: 22
Q311:
Which SQL statement shows all indexes created by the currently logged in user schema?
A. SELECT * FROM user_indexes;
B. SELECT * FROM indexes;
C. SELECT * FROM user_IND_COLUMNS;
D. SELECT * FROM all_indexes;
Correct Answer:
A
Chapter: 22
Q312:
What will be displayed by the SQL statement "SELECT * FROM user_IND_COLUMNS"?
A. All indexes created by the user
B. All columns of indexes created by the user
C. All rows in the index table
D. All data entries in the index table
Correct Answer:
B
Chapter: 22
Q313:
The index table or structure in a database contains which of the following columns?
A. Key values and row ID
B. Only the key values
C. Only the row ID
D. The actual data and row ID
Correct Answer:
A
Chapter: 22
Q314:
Fill in the blank: The basic syntax for creating an index in Oracle is CREATE INDEX index_name ________ (column_name).
A. ON
B. OFF
C. ALONG
D. ACROSS
Correct Answer:
A
Chapter: 22
Q315:
Fill in the blank: The data in the index table is sorted ________ in alphabetical order.
A. ascending
B. descending
C. by ID
D. randomly
Correct Answer:
A
Chapter: 23
Q316:
What is a transaction in the context of a database?
A. A sequence of unrelated operations
B. A single logical unit of work
C. A single operation executed manually
D. An automatic database backup
Correct Answer:
B
Chapter: 23
Q317:
Which property of a transaction ensures that either all operations are completed or none are?
A. Consistency
B. Isolation
C. Atomicity
D. Durability
Correct Answer:
C
Chapter: 23
Q318:
If a transaction fails midway, which property ensures that previous operations are rolled back?
A. Consistency
B. Atomicity
C. Isolation
D. Durability
Correct Answer:
B
Chapter: 23
Q319:
Which property ensures that the database remains in a consistent state before and after a transaction?
A. Atomicity
B. Isolation
C. Consistency
D. Durability
Correct Answer:
C
Chapter: 23
Q320:
During a transaction, which property ensures that no other transaction can interfere with its operations?
A. Isolation
B. Consistency
C. Durability
D. Atomicity
Correct Answer:
A