Assessment Practice Exam Comprehensive Final Review
2026 | 100% Accurate Answers
1. If a database administrator wants to remove all records of customers who
have not made a purchase in the last year, which SQL command would they
use?
REMOVE FROM customers WHERE last_purchase <
DATE_SUB(CURDATE(), INTERVAL 1 YEAR);
DROP FROM customers WHERE last_purchase <
DATE_SUB(CURDATE(), INTERVAL 1 YEAR);
DELETE FROM customers WHERE last_purchase <
DATE_SUB(CURDATE(), INTERVAL 1 YEAR);
DELETE ALL FROM customers WHERE last_purchase <
DATE_SUB(CURDATE(), INTERVAL 1 YEAR);
2. What term describes a connection between two or more entities in a
database?
A type of query.
A link between entities.
A database schema.
A collection of data.
3. Describe the significance of cardinality in database design and how it affects
entity relationships.
Cardinality defines how many instances of one entity relate to
another, which is crucial for establishing accurate relationships in a
database.
, Cardinality is used to measure the performance of a database system.
Cardinality indicates the speed of data retrieval in a database.
Cardinality determines the physical storage of data in a database.
4. What are examples of identifiers in a database?
Primary Key and Foreign Key
Database and Table
City, Name, and Population
SELECT, INSERT, and UPDATE
5. In a database for a library system, if 'Book Title' and 'Author' are considered
attributes, how would you describe their significance in relation to the entity
'Book'?
They are used to manage the borrowing process of books.
They serve as unique identifiers for each book in the library.
They provide essential descriptive properties that help to identify
and categorize each book in the library.
They represent the relationships between different entities in the
library system.
6. What is the purpose of a hash function in a hash table?
To map a key to an index in the hash table.
To sort the keys in the hash table.
To determine the size of the hash table.
To remove duplicates from the hash table.
7. The IN operator in SQL is used to:
Include all records
, Perform calculations
Check if a value matches any value in a list
Specify the order of rows
8. What does the IN operator check for in a SQL query?
If a value is less than a specified value
If a value matches one of several specified values
If a value is equal to a specified value
If a value is greater than a specified value
9. If a database table contains duplicate entries for customer information, which
normalization step should be taken to resolve this issue?
Decompose the table into multiple tables to eliminate redundancy.
Add a new column to track duplicate entries.
Merge the duplicate entries into a single record.
Create an index on the customer information column.
10. In the context of an entity-relationship model, what is an attribute?
A type of entity
The primary key of a database table
A descriptive property of an entity
A method of organizing entities
11. Describe how the RESTRICT option contributes to maintaining data integrity
in a relational database.
The RESTRICT option is used to create new foreign key constraints.
The RESTRICT option allows all operations on foreign keys, promoting
, flexibility.
The RESTRICT option ensures that any operation that would break
referential integrity is not allowed, thus maintaining the consistency
of related data.
The RESTRICT option automatically corrects any integrity violations in
the database.
12. Describe how a JOIN operation functions in SQL and its significance in
database queries.
A JOIN operation functions by linking rows from two or more tables
based on a related column, allowing for comprehensive data
retrieval.
A JOIN operation retrieves data from a single table without any
relationships.
A JOIN operation is used to delete records from a table based on
conditions.
A JOIN operation creates a new table that contains only unique
values from both tables.
13. Describe how the modulo function contributes to the process of hashing in
database management.
The modulo function generates unique hash keys for each data entry.
The modulo function encrypts the data for secure storage.
The modulo function helps in assigning a hash key to a specific
bucket by calculating the remainder when the hash key integer is
divided by the number of buckets.
The modulo function sorts the data entries into ascending order.
14. Describe the purpose of the SQL DELETE command in the context of
database management.