1. Which database model organizes data into tables with rows and columns?
Relational
Hierarchical
Network
Object-Oriented
Show Answer
✅ Correct Answer: Relational
2. What is the purpose of a primary key in a relational database?
To uniquely identify each record in a table
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To uniquely identify each record in a table
3. Which SQL command is used to retrieve data from a database?
SELECT
INSERT
UPDATE
DELETE
Show Answer
✅ Correct Answer: SELECT
4. What is the purpose of a foreign key in a relational database?
To establish a relationship between tables
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To establish a relationship between tables
5. Which database model organizes data in a tree-like structure?
Hierarchical
Relational
Network
Object-Oriented
Show Answer
✅ Correct Answer: Hierarchical
6. What is the purpose of a database index?
To improve query performance
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To improve query performance
7. Which SQL command is used to add new data to a database?
INSERT
SELECT
UPDATE
DELETE
Show Answer
✅ Correct Answer: INSERT
8. What is the purpose of a database transaction?
To ensure data integrity and consistency
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To ensure data integrity and consistency
9. Which database model organizes data in a graph structure?
Network
Relational
Hierarchical
Object-Oriented
Show Answer
✅ Correct Answer: Network
10. What is the purpose of a database view?
To provide a virtual table based on a query
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To provide a virtual table based on a query
11. Which SQL command is used to modify existing data in a database?
UPDATE
SELECT
INSERT
DELETE
Show Answer
✅ Correct Answer: UPDATE
12. What is the purpose of a database trigger?
To automatically execute a set of actions when a specific event occurs
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To automatically execute a set of actions when a specific event occurs
13. Which database model organizes data using objects and classes?
Object-Oriented
Relational
Hierarchical
Network
Show Answer
✅ Correct Answer: Object-Oriented
14. What is the purpose of a database stored procedure?
To encapsulate and execute a set of SQL statements
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To encapsulate and execute a set of SQL statements
15. Which SQL command is used to remove data from a database?
DELETE
SELECT
INSERT
UPDATE
Show Answer
✅ Correct Answer: DELETE
16. What is the purpose of a database schema?
To define the structure and organization of a database
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To define the structure and organization of a database
17. Which database model organizes data into tables with rows and columns?
Relational
Hierarchical
Network
Object-Oriented
Show Answer
✅ Correct Answer: Relational
18. What is the purpose of a primary key in a relational database?
To uniquely identify each record in a table
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To uniquely identify each record in a table
19. Which SQL command is used to retrieve data from a database?
SELECT
INSERT
UPDATE
DELETE
Show Answer
✅ Correct Answer: SELECT
20. What is the purpose of a foreign key in a relational database?
To establish a relationship between tables
To store user data
To manage hardware resources
To run applications
Show Answer
✅ Correct Answer: To establish a relationship between tables
21. What is the purpose of database normalization?
To minimize data redundancy and improve integrity
To maximize storage space
To improve hardware performance
To encrypt sensitive data
Show Answer
✅ Correct Answer: To minimize data redundancy and improve integrity
22. Which SQL clause is used to filter results in a GROUP BY query?
HAVING
WHERE
FILTER
CONDITION
Show Answer
✅ Correct Answer: HAVING
23. What is a database cursor used for?
To traverse through result sets row by row
To create temporary tables
To optimize query performance
To enforce referential integrity
Show Answer
✅ Correct Answer: To traverse through result sets row by row
24. Which type of database index stores data in sorted order?
Clustered index
Non-clustered index
Hash index
Bitmap index
Show Answer
✅ Correct Answer: Clustered index
25. What is the default transaction isolation level in most databases?
READ COMMITTED
READ UNCOMMITTED
REPEATABLE READ
SERIALIZABLE
Show Answer
✅ Correct Answer: READ COMMITTED
26. Which SQL statement is used to create a new table?
CREATE TABLE
NEW TABLE
ADD TABLE
DEFINE TABLE
Show Answer
✅ Correct Answer: CREATE TABLE
27. What does the SQL UNION operator do?
Combines result sets of two queries
Joins two tables
Creates a relationship between tables
Updates multiple records
Show Answer
✅ Correct Answer: Combines result sets of two queries
28. Which database model is optimized for analytical processing?
Dimensional
Relational
Hierarchical
Network
Show Answer
✅ Correct Answer: Dimensional
29. What is the purpose of the SQL LIKE operator?
To search for a specified pattern
To compare values
To join tables
To sort results
Show Answer
✅ Correct Answer: To search for a specified pattern
30. Which constraint ensures a column cannot have NULL values?
NOT NULL
UNIQUE
PRIMARY KEY
CHECK
Show Answer
✅ Correct Answer: NOT NULL
31. What is a database deadlock?
When two transactions block each other
When a query runs too long
When the database crashes
When indexes become corrupted
Show Answer
✅ Correct Answer: When two transactions block each other
32. Which SQL function counts the number of rows?
COUNT()
SUM()
AVG()
MAX()
Show Answer
✅ Correct Answer: COUNT()
33. What is the purpose of database sharding?
To horizontally partition data across servers
To encrypt database files
To create database backups
To optimize query execution
Show Answer
✅ Correct Answer: To horizontally partition data across servers
34. Which SQL statement removes a table from the database?
DROP TABLE
DELETE TABLE
REMOVE TABLE
ERASE TABLE
Show Answer
✅ Correct Answer: DROP TABLE
35. What is a materialized view?
A view that stores the query results
A temporary view
A view with encrypted data
A view that updates automatically
Show Answer
✅ Correct Answer: A view that stores the query results
36. Which database operation is most expensive in terms of performance?
JOIN
SELECT
INSERT
UPDATE
Show Answer
✅ Correct Answer: JOIN
37. What is the purpose of database replication?
To maintain multiple copies of data
To compress database files
To encrypt sensitive data
To optimize query performance
Show Answer
✅ Correct Answer: To maintain multiple copies of data
38. Which SQL clause is used to sort results?
ORDER BY
GROUP BY
SORT BY
ARRANGE BY
Show Answer
✅ Correct Answer: ORDER BY
39. What is a database checkpoint?
A point where all transactions are written to disk
A backup operation
A performance measurement
A security audit point
Show Answer
✅ Correct Answer: A point where all transactions are written to disk
40. What is the purpose of the SQL CASE statement?
To perform conditional logic
To handle exceptions
To create temporary tables
To define constraints
Show Answer
✅ Correct Answer: To perform conditional logic
41. Which database feature ensures data remains consistent after a failure?
Transaction logging
Indexing
Views
Stored procedures
Show Answer
✅ Correct Answer: Transaction logging
42. What is the purpose of database denormalization?
To improve read performance
To reduce storage space
To enforce data integrity
To secure sensitive data
Show Answer
✅ Correct Answer: To improve read performance
43. Which SQL statement changes the structure of a table?
ALTER TABLE
MODIFY TABLE
CHANGE TABLE
UPDATE TABLE
Show Answer
✅ Correct Answer: ALTER TABLE
44. What is a database transaction log used for?
Recovery and rollback operations
Performance monitoring
User authentication
Data encryption
Show Answer
✅ Correct Answer: Recovery and rollback operations
45. Which type of database is optimized for time-series data?
Time-series database
Document database
Graph database
Key-value store
Show Answer
✅ Correct Answer: Time-series database
46. What is the purpose of the SQL COMMIT statement?
To permanently save a transaction
To start a new transaction
To rollback changes
To create a savepoint
Show Answer
✅ Correct Answer: To permanently save a transaction
47. Which database concept describes the ability to handle growing amounts of data?
Scalability
Durability
Consistency
Isolation
Show Answer
✅ Correct Answer: Scalability
48. What is the purpose of database partitioning?
To divide large tables into smaller pieces
To encrypt sensitive data
To create backups
To optimize indexes
Show Answer
✅ Correct Answer: To divide large tables into smaller pieces
49. Which SQL function returns the current date and time?
GETDATE() or NOW()
CURRENT()
DATE()
TIMESTAMP()
Show Answer
✅ Correct Answer: GETDATE() or NOW()
50. What is a database connection pool?
A cache of database connections
A group of related tables
A backup strategy
A security feature
Show Answer
✅ Correct Answer: A cache of database connections
51. Which type of database is optimized for storing documents?
Document database
Relational database
Graph database
Key-value store
Show Answer
✅ Correct Answer: Document database
52. What is the purpose of the SQL ROLLBACK statement?
To undo changes in a transaction
To save changes
To start a new transaction
To create a savepoint
Show Answer
✅ Correct Answer: To undo changes in a transaction
53. Which database concept ensures transactions are processed reliably?
Durability
Consistency
Isolation
Atomicity
Show Answer
✅ Correct Answer: Durability
54. What is the purpose of database indexing?
To speed up data retrieval
To secure data
To compress data
To backup data
Show Answer
✅ Correct Answer: To speed up data retrieval
55. Which SQL statement grants permissions to users?
GRANT
ALLOW
PERMIT
AUTHORIZE
Show Answer
✅ Correct Answer: GRANT
56. What is a database savepoint?
A point within a transaction to roll back to
A backup file
A performance benchmark
A security checkpoint
Show Answer
✅ Correct Answer: A point within a transaction to roll back to
57. Which type of join returns all rows from the left table?
LEFT JOIN
INNER JOIN
RIGHT JOIN
FULL JOIN
Show Answer
✅ Correct Answer: LEFT JOIN
58. What is the purpose of database archiving?
To move old data to separate storage
To backup current data
To encrypt sensitive data
To optimize performance
Show Answer
✅ Correct Answer: To move old data to separate storage
59. Which SQL function converts data types?
CAST() or CONVERT()
CHANGE()
TRANSFORM()
MODIFY()
Show Answer
✅ Correct Answer: CAST() or CONVERT()
60. What is database mirroring?
Maintaining a real-time copy of a database
Creating database backups
Optimizing query performance
Encrypting database files
Show Answer
✅ Correct Answer: Maintaining a real-time copy of a database
61. Which SQL statement revokes user permissions?
REVOKE
DENY
REMOVE
WITHDRAW
Show Answer
✅ Correct Answer: REVOKE
62. What is the purpose of database snapshots?
To provide read-only views of data at a point in time
To backup the database
To optimize performance
To encrypt sensitive data
Show Answer
✅ Correct Answer: To provide read-only views of data at a point in time
63. Which type of database is optimized for relationships between entities?
Graph database
Relational database
Document database
Key-value store
Show Answer
✅ Correct Answer: Graph database
64. What is the purpose of the SQL TRUNCATE statement?
To quickly delete all rows from a table
To remove a table structure
To delete specific rows
To backup a table
Show Answer
✅ Correct Answer: To quickly delete all rows from a table
65. Which database concept ensures transactions don't interfere with each other?
Isolation
Atomicity
Consistency
Durability
Show Answer
✅ Correct Answer: Isolation
66. What is the purpose of database caching?
To store frequently accessed data in memory
To backup data
To encrypt sensitive data
To compress database files
Show Answer
✅ Correct Answer: To store frequently accessed data in memory
67. Which SQL function returns the length of a string?
LEN() or LENGTH()
SIZE()
COUNT()
MEASURE()
Show Answer
✅ Correct Answer: LEN() or LENGTH()
68. What is database federation?
Distributing data across multiple databases
Creating database backups
Encrypting database files
Optimizing query performance
Show Answer
✅ Correct Answer: Distributing data across multiple databases
69. Which SQL statement creates an index?
CREATE INDEX
ADD INDEX
MAKE INDEX
DEFINE INDEX
Show Answer
✅ Correct Answer: CREATE INDEX
70. What is the purpose of database compression?
To reduce storage requirements
To encrypt sensitive data
To improve query performance
To create backups
Show Answer
✅ Correct Answer: To reduce storage requirements
71. Which type of database is optimized for simple key-value pairs?
Key-value store
Relational database
Document database
Graph database
Show Answer
✅ Correct Answer: Key-value store
72. What is the purpose of the SQL EXPLAIN statement?
To show the execution plan of a query
To describe a table structure
To explain database concepts
To document SQL syntax
Show Answer
✅ Correct Answer: To show the execution plan of a query
73. Which database concept ensures transactions are all-or-nothing operations?
Atomicity
Consistency
Isolation
Durability
Show Answer
✅ Correct Answer: Atomicity
74. What is the purpose of database virtualization?
To abstract physical database resources
To create database backups
To encrypt sensitive data
To optimize query performance
Show Answer
✅ Correct Answer: To abstract physical database resources
75. Which SQL function concatenates strings?
CONCAT()
JOIN()
MERGE()
COMBINE()
Show Answer
✅ Correct Answer: CONCAT()
76. What is database clustering?
Grouping multiple database servers
Creating database indexes
Organizing related tables
Sorting data physically
Show Answer
✅ Correct Answer: Grouping multiple database servers
77. Which SQL statement creates a view?
CREATE VIEW
MAKE VIEW
DEFINE VIEW
ADD VIEW
Show Answer
✅ Correct Answer: CREATE VIEW
78. What is the purpose of database auditing?
To track database activities
To optimize performance
To create backups
To encrypt sensitive data
Show Answer
✅ Correct Answer: To track database activities
79. Which type of database is optimized for spatial data?
Spatial database
Relational database
Document database
Key-value store
Show Answer
✅ Correct Answer: Spatial database
80. What is the purpose of the SQL WITH clause?
To define a common table expression
To specify conditions
To create temporary tables
To handle exceptions
Show Answer
✅ Correct Answer: To define a common table expression
81. Which database concept ensures data meets defined rules?
Consistency
Atomicity
Isolation
Durability
Show Answer
✅ Correct Answer: Consistency
82. What is the purpose of database migration?
To move data between systems
To create backups
To optimize performance
To encrypt sensitive data
Show Answer
✅ Correct Answer: To move data between systems
83. Which SQL function extracts part of a string?
SUBSTRING()
EXTRACT()
PART()
SLICE()
Show Answer
✅ Correct Answer: SUBSTRING()
84. What is database federation?
Distributing data across multiple databases
Creating database backups
Encrypting database files
Optimizing query performance
Show Answer
✅ Correct Answer: Distributing data across multiple databases
85. Which SQL statement creates a stored procedure?
CREATE PROCEDURE
MAKE PROCEDURE
DEFINE PROCEDURE
ADD PROCEDURE
Show Answer
✅ Correct Answer: CREATE PROCEDURE
86. What is the purpose of database versioning?
To track schema changes over time
To create backups
To optimize performance
To encrypt sensitive data
Show Answer
✅ Correct Answer: To track schema changes over time
87. Which type of database is optimized for high-speed transactions?
In-memory database
Relational database
Document database
Graph database
Show Answer
✅ Correct Answer: In-memory database
88. What is the purpose of database configuration management?
To track and manage database settings
To encrypt sensitive data
To optimize performance
To create backups
Show Answer
✅ Correct Answer: To track and manage database settings
89. Which SQL function rounds a numeric value?
ROUND()
TRUNCATE()
FLOOR()
CEILING()
Show Answer
✅ Correct Answer: ROUND()
90. What is the purpose of database capacity planning?
To anticipate future resource needs
To encrypt sensitive data
To optimize performance
To create backups
Show Answer
✅ Correct Answer: To anticipate future resource needs