NEW
Font size
WorksheetsDCIT24 Mock Test
Total questions: 70
Worksheet time: 35mins
Choose the BEST answer. Charlotte initiates a bank transfer that deducts money from her Account A, but the system crashes before the money is added to David's Account B. Which ACID property was violated?
Atomicity
Consistency
Isolation
Durability
Choose the BEST answer. Michael is in the process of updating his financial records. He is currently reading and writing data to ensure everything is accurate. What state is he in?
Active
Partially committed
Committed
Failed
Choose the BEST answer. Ethan is working on a project and has completed all the necessary tasks, but he has not yet permanently saved his work. This transaction is:
Active
Partially committed
Committed
Failed
Choose the BEST answer. After William successfully transfers funds to Aria, the power suddenly goes out but the changes remain saved. Which property protected the data?
Atomicity
Consistency
Isolation
Durability
Choose the BEST answer. Emma tries to store a grade of 105 for her exam in the school database. The DBMS rejects it. Which property enforced this rule?
Atomicity
Consistency
Isolation
Durability
Choose the BEST answer. While transferring money, Nora's internet disconnects and the transaction cannot continue. What state does it enter?
Active
Failed
Aborted
Committed
Choose the BEST answer. Arjun accidentally made several changes to the database while working on a project. After realizing the mistakes, he decided to undo all changes and restore the database to its original state. The transaction is now:
Active
Partially committed
Committed
Aborted
Choose the BEST answer. Elijah and Maya are both working on their respective projects at the same time in a shared workspace. However, neither can see the other’s unfinished results while they are working. Which property is applied?
Atomicity
Consistency
Isolation
Durability
Choose the BEST answer. Rohan is trying to find a specific book in the library's database. Which operation does he need to execute to retrieve the book's information?
Read
Write
Commit
Abort
Choose the BEST answer. Anika has just completed a financial transaction at the bank, and all effects of the transaction are now permanent. What is this state?
Active
Partially committed
Committed
Failed
Choose the BEST answer. True or False: Once a transaction is committed, it can be undone anytime.
True
False
Choose the BEST answer. A transaction is killed and all its changes are undone. Which operation caused this?
Commit
Abort
Read
Write
Choose the BEST answer. Mia is trying to complete a financial transaction online, but she encounters an error that prevents her from proceeding. This situation is referred to as:
Active transaction
Committed transaction
Failed transaction
Aborted transaction
Choose the BEST answer. Anika is planning to transfer money from her savings account to her checking account. She wants to ensure that the transfer either happens completely or not at all, without any partial transactions. Which ACID property guarantees this all-or-nothing execution?
Atomicity
Consistency
Isolation
Durability
Choose the BEST answer. In a bank, every time Maya makes a transaction, the account balances remain accurate before and after her transaction. This describes:
Atomicity
Consistency
Isolation
Durability
Choose the BEST answer. Anika is planning a surprise birthday party for William. She wants to ensure that all the arrangements, like booking the venue, ordering the cake, and sending invitations, are completed as one whole task without any interruptions. This describes:
Atomicity
Consistency
Isolation
Durability
Choose the BEST answer. Lily is working on a critical software update for her company. Just before she commits the changes, the system crashes. What happens to the transaction changes?
Changes are permanently saved
Changes remain visible to others
Changes are undone during recovery
Changes become partially committed
Choose the BEST answer. Sophia was in the middle of a financial transaction when she encountered an error, causing the transaction to be aborted. After resolving the issue, she decided to restart the transaction. A transaction that is restarted after being aborted goes back to which state?
Active
Failed
Committed
Partially committed
Choose the BEST answer. In a project management scenario, Rohan's task has just Failed. Which state comes immediately after Failed?
Active
Aborted
Committed
Partially committed
In a busy restaurant, two chefs are preparing dishes at the same time. If Chef A is making a salad while Chef B is cooking a steak, can their actions interfere with each other? Choose the BEST answer. True or False: Isolation allows transactions to interfere with each other.
True
False
Choose the BEST answer. Noah is managing a database for a library. He reads the information about a book, updates its availability status, and then writes the updated information back to the database. What type of operations are these?
Read-only
Read-Modify-Write
Commit-Rollback
Scan-Insert
Choose the BEST answer. In a software development project, which phase is NOT a transaction state?
Active
Partially committed
Prepared
Aborted
Choose the BEST answer. Ava and Hannah both update the same record in their project management tool, but when they save their changes, Hannah's update overwrites Ava's. What problem occurred?
Dirty read
Lost update
Unrepeatable read
Phantom read
Choose the BEST answer. James is working on a project and reads some data that Aria has not yet committed to the database. This is:
Dirty read
Lost update
Unrepeatable read
Phantom read
Choose the BEST answer. Maya is working on a financial report and reads the same data from the database twice. However, she notices that the first time she reads the data, it shows a profit of $10,000, but the second time it shows a profit of $8,000. This is called:
Dirty read
Lost update
Unrepeatable read
Phantom read
Choose the BEST answer. In a library, which type of lock allows multiple readers to access the same book at the same time?
Exclusive lock
Shared lock
Intention lock
Write lock
Choose the BEST answer. Liam wants to write data to a shared database. Which lock must he acquire?
Shared lock
Exclusive lock
Read lock
Intent shared lock
Choose the BEST answer. Ethan and Aria are both trying to access a shared resource in their project. Ethan is holding a resource that Aria needs, while Aria is holding a resource that Ethan needs. They are both waiting indefinitely for each other’s resources. This is:
Starvation
Deadlock
Blocking
Livelock
In a busy restaurant, Daniel is preparing a special dish that requires the kitchen to be closed for a short period. Choose the BEST answer. True or False: Exclusive locks block all other transactions.
True
False
Choose the BEST answer. In a busy restaurant, the manager needs to ensure that orders are processed efficiently without causing delays. Which method should the manager use that avoids locks and relies on timestamps to manage the order processing?
Two-phase locking
Timestamp ordering
Optimistic concurrency control
Multiversion concurrency control
Choose the BEST answer. In a busy restaurant, the manager assumes that:
Conflicts are frequent
Conflicts are rare
All transactions must lock early
Reads are forbidden
Choose the BEST answer. In a busy restaurant, the manager uses Optimistic Concurrency Control to manage table reservations. Conflicts are checked during which phase of the reservation process?
Read phase
Write phase
Validation phase
Commit phase
In a busy restaurant, the kitchen staff is preparing meals while the waitstaff is taking orders from customers. To ensure that customers can place their orders without waiting for the kitchen to finish, the restaurant implements a system that allows the waitstaff to see the current menu and available dishes without interrupting the kitchen's work. This system improves performance by:
Forcing single-version writes
Allowing readers to see a snapshot without blocking writers
Using only exclusive locks
Preventing all conflicts via timestamps
Choose the BEST answer. Elijah is working on a financial report and opens a document that is being updated by another team member. He notices that some figures are updated while others are still showing old data. This is:
Inconsistent read
Phantom read
Lost update
Blind write
In a busy restaurant, the manager implements a lock-based system to ensure that only one chef can prepare a specific dish at a time. This is done to prevent any mix-ups in orders and to maintain the quality of the food. Choose the BEST answer. Lock-based protocols are mainly used to ensure:
Durability
Serializability
Availability
Redundancy
Choose the BEST answer. In a busy restaurant, which technique allows the kitchen staff to prepare meals without blocking the waitstaff from taking orders?
Strict two-phase locking
Multiversion concurrency control (MVCC)
Deadlock detection
Timestamp ordering
In a library, there are two types of access to books: shared and exclusive. Choose the BEST answer. True or False: Shared locks allow writing.
True
False
William is trying to complete a project that requires two different resources. He holds onto one resource while waiting for the second one to become available. This situation is called:
Deadlock
Starvation
Livelock
Blocking
In a busy restaurant, the kitchen staff is preparing multiple orders at the same time. However, due to a lack of coordination, the chefs end up waiting for each other to finish their tasks, causing the entire kitchen to come to a standstill. Which concurrency problem causes this system stall?
Deadlock
Starvation
Livelock
Contention
Noah is managing a large library database that uses hashing to speed up record searches. What is hashing mainly for?
Fast equality lookups
Sorting records
Encrypting data
Compressing data
In a small town, two different people, Ethan and Mason, both have keys that unlock the same community garden shed. This situation is called:
Collision
Distribution
Overflow
Segmentation
In a small library, Nora is organizing books on a fixed-size shelf. She decides to use:
Static hashing
Dynamic hashing
Perfect hashing
Open addressing
Aria runs a small online bookstore that grows as more customers place orders. To manage her inventory efficiently, she decides to implement a system that allows her to expand her storage as needed. This uses:
Dynamic hashing
Static hashing
Linear probing
Double hashing
In a library, books are organized on shelves, but sometimes multiple books end up in the same spot. To manage this, the librarian uses linked lists to keep track of the books that share the same location. This is:
Separate chaining
Open addressing
Linear probing
Quadratic probing
In a busy parking lot, when a car arrives and finds its designated parking spot occupied, it looks for another empty slot nearby. This is:
Open addressing
Separate chaining
Hashing
Bucketing
True or False: In a library, when books are organized using a hashing system, does it guarantee that the books will be sorted on the shelves?
True
False
In a library, a good system for organizing books should:
Distribute books uniformly across shelves
Produce sequential shelf numbers
Map similar genres to the same shelf
Depend on the order of book arrivals
In a busy library, a librarian is trying to organize books on a shelf. When a book's designated spot is already occupied, the librarian uses a method to find the next available spot by checking each subsequent position until an empty one is found. Which collision method does the librarian use?
Linear probing
Separate chaining
Rehashing into a new table
Bucket sorting
In a library, books are organized based on:
Computed hash of the key
Insertion order
Natural sort order
Physical disk sector
Lily is managing a library's book catalog using a static hashing system. She realizes that the main disadvantage of this system is:
Cannot expand dynamically
Guarantees uniform distribution
Automatically resizes
Ensures sorted output
True or False: Collision always means an error.
True
False
In a library, a cataloging system uses a hash function to map book titles into:
Table indices
Query results
SQL clauses
User privileges
In a busy restaurant, the chef uses a special method to organize the ingredients in the kitchen. This method allows the chef to automatically adjust the storage space as new ingredients arrive, ensuring everything is always in the right place. Which hashing type is the chef using?
Dynamic hashing
Static hashing
Manual rehashing
Separate chaining
In a busy restaurant, the chef uses a special method to quickly find the right ingredients for each dish. This method is known for:
Fast equality lookups
Range queries
Transaction logging
Data compression
Sophia wants to retrieve all records from a table in her database. Which command should she use?
SELECT
INSERT
UPDATE
DELETE
Grace is setting up a new database for her project. She needs to create a new table to store user information. Creating a new table belongs to which SQL category?
DDL
DML
DCL
TCL
Grace needs to update her contact information in a database. Which command should she use?
UPDATE
INSERT
CREATE
DROP
In a bakery, which clause would the baker use to filter the ingredients before grouping them into different types of bread?
WHERE
HAVING
ORDER BY
GROUP BY
Benjamin is analyzing a list of products in an online store and wants to sort the results based on their prices. Which clause should he use?
ORDER BY
GROUP BY
WHERE
DISTINCT
In a local bakery, the manager wants to analyze the sales of different types of bread. To filter the results of the sales report for only those types of bread that sold more than 50 loaves, which SQL clause should the manager use?
HAVING
WHERE
GROUP BY
LIMIT
In a company, the manager needs to allow certain employees to access confidential files. Granting permission to users uses:
GRANT
REVOKE
ALTER
COMMIT
In a company, the IT manager needs to ensure that certain employees no longer have access to sensitive data. To achieve this, the manager decides to take action by removing user privileges. What command should the IT manager use?
REVOKE
GRANT
ALTER
ROLLBACK
True or False: Hannah decided to clean up her digital workspace by using the DELETE function on her project files. She believes that this action will remove the entire structure of her project, including all the folders and files. Is she correct?
True
False
Anika is managing a database for her online store. She decides that a certain table containing outdated product information is no longer needed and wants to remove it completely. Which command should she use?
DROP TABLE
DELETE FROM
TRUNCATE TABLE
ALTER TABLE
In a database management class, the instructor asked the students to identify the main components of DQL. During the discussion, they focused on the key operations that allow users to retrieve data. The instructor emphasized one operation in particular that is essential for querying data. What is that operation?
SELECT
INSERT
UPDATE
GRANT
In a company, James is responsible for managing the database. He needs to ensure that only authorized personnel can access sensitive data. Which SQL category should he use to control access to this data?
DCL
DML
DDL
TCL
True or False: In a recent team meeting, Isla mentioned that the HAVING clause works with aggregate functions when analyzing the sales data for the last quarter.
True
False
In a bustling city, a data analyst named Sophia is tasked with managing a large amount of information for a new project. She needs to ensure that all the data is organized and easily accessible. To achieve this, she decides to use SQL. SQL is mainly used for managing:
Data in relational databases
Operating system processes
Network routing tables
File compression
In a database management system, Mia wants to clear all the data from her 'Employees' table while keeping the table structure intact for future use. Which command should she use?
TRUNCATE TABLE
DROP TABLE
DELETE DATABASE
REMOVE ALL
During a tech workshop, Benjamin explained that SQL stands for:
Structured Query Language
Simple Query Language
Standard Queue Logic
Sequential Query Language
