wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DCIT24 Mock Test

Total questions: 70

Worksheet time: 35mins

Name
Class
Date
1.

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?

a)

Atomicity

b)

Consistency

c)

Isolation

d)

Durability

2.

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?

a)

Active

b)

Partially committed

c)

Committed

d)

Failed

3.

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:

a)

Active

b)

Partially committed

c)

Committed

d)

Failed

4.

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?

a)

Atomicity

b)

Consistency

c)

Isolation

d)

Durability

5.

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?

a)

Atomicity

b)

Consistency

c)

Isolation

d)

Durability

6.

Choose the BEST answer. While transferring money, Nora's internet disconnects and the transaction cannot continue. What state does it enter?

a)

Active

b)

Failed

c)

Aborted

d)

Committed

7.

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:

a)

Active

b)

Partially committed

c)

Committed

d)

Aborted

8.

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?

a)

Atomicity

b)

Consistency

c)

Isolation

d)

Durability

9.

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?

a)

Read

b)

Write

c)

Commit

d)

Abort

10.

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?

a)

Active

b)

Partially committed

c)

Committed

d)

Failed

11.

Choose the BEST answer. True or False: Once a transaction is committed, it can be undone anytime.

a)

True

b)

False

12.

Choose the BEST answer. A transaction is killed and all its changes are undone. Which operation caused this?

a)

Commit

b)

Abort

c)

Read

d)

Write

13.

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:

a)

Active transaction

b)

Committed transaction

c)

Failed transaction

d)

Aborted transaction

14.

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?

a)

Atomicity

b)

Consistency

c)

Isolation

d)

Durability

15.

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:

a)

Atomicity

b)

Consistency

c)

Isolation

d)

Durability

16.

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:

a)

Atomicity

b)

Consistency

c)

Isolation

d)

Durability

17.

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?

a)

Changes are permanently saved

b)

Changes remain visible to others

c)

Changes are undone during recovery

d)

Changes become partially committed

18.

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?

a)

Active

b)

Failed

c)

Committed

d)

Partially committed

19.

Choose the BEST answer. In a project management scenario, Rohan's task has just Failed. Which state comes immediately after Failed?

a)

Active

b)

Aborted

c)

Committed

d)

Partially committed

20.

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.

a)

True

b)

False

21.

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?

a)

Read-only

b)

Read-Modify-Write

c)

Commit-Rollback

d)

Scan-Insert

22.

Choose the BEST answer. In a software development project, which phase is NOT a transaction state?

a)

Active

b)

Partially committed

c)

Prepared

d)

Aborted

23.

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?

a)

Dirty read

b)

Lost update

c)

Unrepeatable read

d)

Phantom read

24.

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:

a)

Dirty read

b)

Lost update

c)

Unrepeatable read

d)

Phantom read

25.

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:

a)

Dirty read

b)

Lost update

c)

Unrepeatable read

d)

Phantom read

26.

Choose the BEST answer. In a library, which type of lock allows multiple readers to access the same book at the same time?

a)

Exclusive lock

b)

Shared lock

c)

Intention lock

d)

Write lock

27.

Choose the BEST answer. Liam wants to write data to a shared database. Which lock must he acquire?

a)

Shared lock

b)

Exclusive lock

c)

Read lock

d)

Intent shared lock

28.

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:

a)

Starvation

b)

Deadlock

c)

Blocking

d)

Livelock

29.

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.

a)

True

b)

False

30.

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?

a)

Two-phase locking

b)

Timestamp ordering

c)

Optimistic concurrency control

d)

Multiversion concurrency control

31.

Choose the BEST answer. In a busy restaurant, the manager assumes that:

a)

Conflicts are frequent

b)

Conflicts are rare

c)

All transactions must lock early

d)

Reads are forbidden

32.

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?

a)

Read phase

b)

Write phase

c)

Validation phase

d)

Commit phase

33.

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:

a)

Forcing single-version writes

b)

Allowing readers to see a snapshot without blocking writers

c)

Using only exclusive locks

d)

Preventing all conflicts via timestamps

34.

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:

a)

Inconsistent read

b)

Phantom read

c)

Lost update

d)

Blind write

35.

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:

a)

Durability

b)

Serializability

c)

Availability

d)

Redundancy

36.

Choose the BEST answer. In a busy restaurant, which technique allows the kitchen staff to prepare meals without blocking the waitstaff from taking orders?

a)

Strict two-phase locking

b)

Multiversion concurrency control (MVCC)

c)

Deadlock detection

d)

Timestamp ordering

37.

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.

a)

True

b)

False

38.

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:

a)

Deadlock

b)

Starvation

c)

Livelock

d)

Blocking

39.

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?

a)

Deadlock

b)

Starvation

c)

Livelock

d)

Contention

40.

Noah is managing a large library database that uses hashing to speed up record searches. What is hashing mainly for?

a)

Fast equality lookups

b)

Sorting records

c)

Encrypting data

d)

Compressing data

41.

In a small town, two different people, Ethan and Mason, both have keys that unlock the same community garden shed. This situation is called:

a)

Collision

b)

Distribution

c)

Overflow

d)

Segmentation

42.

In a small library, Nora is organizing books on a fixed-size shelf. She decides to use:

a)

Static hashing

b)

Dynamic hashing

c)

Perfect hashing

d)

Open addressing

43.

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:

a)

Dynamic hashing

b)

Static hashing

c)

Linear probing

d)

Double hashing

44.

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:

a)

Separate chaining

b)

Open addressing

c)

Linear probing

d)

Quadratic probing

45.

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:

a)

Open addressing

b)

Separate chaining

c)

Hashing

d)

Bucketing

46.

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?

a)

True

b)

False

47.

In a library, a good system for organizing books should:

a)

Distribute books uniformly across shelves

b)

Produce sequential shelf numbers

c)

Map similar genres to the same shelf

d)

Depend on the order of book arrivals

48.

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?

a)

Linear probing

b)

Separate chaining

c)

Rehashing into a new table

d)

Bucket sorting

49.

In a library, books are organized based on:

a)

Computed hash of the key

b)

Insertion order

c)

Natural sort order

d)

Physical disk sector

50.

Lily is managing a library's book catalog using a static hashing system. She realizes that the main disadvantage of this system is:

a)

Cannot expand dynamically

b)

Guarantees uniform distribution

c)

Automatically resizes

d)

Ensures sorted output

51.

True or False: Collision always means an error.

a)

True

b)

False

52.

In a library, a cataloging system uses a hash function to map book titles into:

a)

Table indices

b)

Query results

c)

SQL clauses

d)

User privileges

53.

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?

a)

Dynamic hashing

b)

Static hashing

c)

Manual rehashing

d)

Separate chaining

54.

In a busy restaurant, the chef uses a special method to quickly find the right ingredients for each dish. This method is known for:

a)

Fast equality lookups

b)

Range queries

c)

Transaction logging

d)

Data compression

55.

Sophia wants to retrieve all records from a table in her database. Which command should she use?

a)

SELECT

b)

INSERT

c)

UPDATE

d)

DELETE

56.

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?

a)

DDL

b)

DML

c)

DCL

d)

TCL

57.

Grace needs to update her contact information in a database. Which command should she use?

a)

UPDATE

b)

INSERT

c)

CREATE

d)

DROP

58.

In a bakery, which clause would the baker use to filter the ingredients before grouping them into different types of bread?

a)

WHERE

b)

HAVING

c)

ORDER BY

d)

GROUP BY

59.

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?

a)

ORDER BY

b)

GROUP BY

c)

WHERE

d)

DISTINCT

60.

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?

a)

HAVING

b)

WHERE

c)

GROUP BY

d)

LIMIT

61.

In a company, the manager needs to allow certain employees to access confidential files. Granting permission to users uses:

a)

GRANT

b)

REVOKE

c)

ALTER

d)

COMMIT

62.

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?

a)

REVOKE

b)

GRANT

c)

ALTER

d)

ROLLBACK

63.

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?

a)

True

b)

False

64.

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?

a)

DROP TABLE

b)

DELETE FROM

c)

TRUNCATE TABLE

d)

ALTER TABLE

65.

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?

a)

SELECT

b)

INSERT

c)

UPDATE

d)

GRANT

66.

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?

a)

DCL

b)

DML

c)

DDL

d)

TCL

67.

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.

a)

True

b)

False

68.

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:

a)

Data in relational databases

b)

Operating system processes

c)

Network routing tables

d)

File compression

69.

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?

a)

TRUNCATE TABLE

b)

DROP TABLE

c)

DELETE DATABASE

d)

REMOVE ALL

70.

During a tech workshop, Benjamin explained that SQL stands for:

a)

Structured Query Language

b)

Simple Query Language

c)

Standard Queue Logic

d)

Sequential Query Language