Certified Database Administrator (CDBA) Practice Exam
Questions And Correct Answers|Already Graded A+|Brand
New Version.
1. Which SQL command is used to remove all records from a table
but keep the table structure?
A) DELETE
B) TRUNCATE
C) DROP
D) REMOVE
Truncate removes all rows from a table quickly without logging
individual row deletions, but the table structure remains.
2. What is the primary purpose of an index in a database?
A) Increase storage
B) Improve query performance
C) Backup the database
D) Prevent data duplication
Indexes allow the database to locate data faster, improving SELECT
query performance.
3. Which database object enforces a unique constraint on a
column?
A) Trigger
B) View
C) Unique Constraint
D) Index
A unique constraint ensures that no two rows have the same value in
the specified column.
4. In relational databases, which key uniquely identifies a record in
a table?
,A) Foreign Key
B) Candidate Key
C) Alternate Key
D) Primary Key
The primary key uniquely identifies each row in a table and cannot
contain NULL values.
5. Which SQL clause is used to filter records after a GROUP BY
operation?
A) WHERE
B) ORDER BY
C) HAVING
D) DISTINCT
HAVING filters aggregated results after grouping, whereas WHERE
filters before aggregation.
6. What type of join returns all records from the left table and the
matched records from the right table?
A) INNER JOIN
B) FULL OUTER JOIN
C) LEFT JOIN
D) RIGHT JOIN
A LEFT JOIN returns all rows from the left table and matches from the
right, filling unmatched columns with NULL.
7. What is the ACID property in databases?
A) Asynchronous, Consistent, Immediate, Durable
B) Atomicity, Concurrency, Integrity, Durability
C) Atomicity, Consistency, Isolation, Durability
D) Atomicity, Consistency, Isolation, Durability
ACID ensures database transactions are processed reliably and
maintain data integrity.
8. What is the main purpose of a foreign key?
, A) Increase query speed
B) Maintain referential integrity
C) Create a primary key
D) Store large data
A foreign key enforces a relationship between two tables, ensuring
valid references.
9. Which command is used to remove a table and its structure
permanently?
A) DELETE
B) REMOVE
C) DROP TABLE
D) TRUNCATE
DROP TABLE deletes the table, all rows, and the structure
permanently.
10. Which database object stores precompiled SQL statements for
reuse?
A) Table
B) View
C) Stored Procedure
D) Index
Stored procedures improve performance and security by precompiling
SQL statements.
11. Which SQL statement is used to modify existing data in a table?
A) INSERT
B) UPDATE
C) DELETE
D) MERGE
UPDATE modifies existing records based on a WHERE condition.
12. Which type of index automatically sorts data and avoids
duplicate entries?
Questions And Correct Answers|Already Graded A+|Brand
New Version.
1. Which SQL command is used to remove all records from a table
but keep the table structure?
A) DELETE
B) TRUNCATE
C) DROP
D) REMOVE
Truncate removes all rows from a table quickly without logging
individual row deletions, but the table structure remains.
2. What is the primary purpose of an index in a database?
A) Increase storage
B) Improve query performance
C) Backup the database
D) Prevent data duplication
Indexes allow the database to locate data faster, improving SELECT
query performance.
3. Which database object enforces a unique constraint on a
column?
A) Trigger
B) View
C) Unique Constraint
D) Index
A unique constraint ensures that no two rows have the same value in
the specified column.
4. In relational databases, which key uniquely identifies a record in
a table?
,A) Foreign Key
B) Candidate Key
C) Alternate Key
D) Primary Key
The primary key uniquely identifies each row in a table and cannot
contain NULL values.
5. Which SQL clause is used to filter records after a GROUP BY
operation?
A) WHERE
B) ORDER BY
C) HAVING
D) DISTINCT
HAVING filters aggregated results after grouping, whereas WHERE
filters before aggregation.
6. What type of join returns all records from the left table and the
matched records from the right table?
A) INNER JOIN
B) FULL OUTER JOIN
C) LEFT JOIN
D) RIGHT JOIN
A LEFT JOIN returns all rows from the left table and matches from the
right, filling unmatched columns with NULL.
7. What is the ACID property in databases?
A) Asynchronous, Consistent, Immediate, Durable
B) Atomicity, Concurrency, Integrity, Durability
C) Atomicity, Consistency, Isolation, Durability
D) Atomicity, Consistency, Isolation, Durability
ACID ensures database transactions are processed reliably and
maintain data integrity.
8. What is the main purpose of a foreign key?
, A) Increase query speed
B) Maintain referential integrity
C) Create a primary key
D) Store large data
A foreign key enforces a relationship between two tables, ensuring
valid references.
9. Which command is used to remove a table and its structure
permanently?
A) DELETE
B) REMOVE
C) DROP TABLE
D) TRUNCATE
DROP TABLE deletes the table, all rows, and the structure
permanently.
10. Which database object stores precompiled SQL statements for
reuse?
A) Table
B) View
C) Stored Procedure
D) Index
Stored procedures improve performance and security by precompiling
SQL statements.
11. Which SQL statement is used to modify existing data in a table?
A) INSERT
B) UPDATE
C) DELETE
D) MERGE
UPDATE modifies existing records based on a WHERE condition.
12. Which type of index automatically sorts data and avoids
duplicate entries?