Answers Verified 100% Correct Latest Update
Q1: What is the main advantage of using an index in a database?
a) It reduces storage space.
b) It speeds up query execution.
c) It allows more complex queries.
d) It prevents duplicate rows. - ANSWER -Correct ANSWER: b
Q2: Which SQL command is used to modify the data in an existing row?
a) UPDATE
b) MODIFY
c) ALTER
d) INSERT - ANSWER -Correct ANSWER: a
Q3: What happens if you attempt to insert a NULL value into a column with a
NOT NULL constraint?
a) The value is converted to 0.
b) The operation is ignored.
c) The operation fails with an error.
d) The value is replaced with the default value. - ANSWER -Correct ANSWER: c
Q4: Which of the following is a property of a transaction?
a) Redundancy
b) Scalability
c) Distribution
d) Atomicity - ANSWER -Correct ANSWER: d
Q5: In relational algebra, what does the selection operation do?
a) Combines rows from two tables.
b) Filters rows based on a condition.
c) Combines columns from two tables.
d) Removes duplicate rows. - ANSWER -Correct ANSWER: b
, Q6: Which of the following commands can be used to remove both the structure
and data of a table?
a) DELETE
b) DROP
c) REMOVE
d) TRUNCATE - ANSWER -Correct ANSWER: b
Q7: What is the purpose of the UNIQUE constraint in SQL?
a) To ensure a column only contains positive values.
b) To ensure all rows in a column are distinct.
c) To limit the size of the table.
d) To define a column as a primary key. - ANSWER -Correct ANSWER: b
Q8: What is an entity in the context of relational databases?
a) A table representing an object or concept.
b) A column in a table.
c) A specific value in a database.
d) A relationship between two tables. - ANSWER -Correct ANSWER: a
Q9: Which SQL keyword is used to combine rows from two or more tables, even
if there is no match?
a) INNER JOIN
b) LEFT JOIN
c) OUTER JOIN
d) CROSS JOIN - ANSWER -Correct ANSWER: c
Q10: Which SQL aggregate function calculates the total number of rows?
a) SUM()
b) COUNT()
c) AVG()
d) TOTAL() - ANSWER -Correct ANSWER: b
Q11: What is the primary purpose of normalization in relational databases?
a) To minimize redundancy and avoid anomalies.
b) To increase query complexity.