1. Which of the following is an example of data redundancy?
A. Storing the same data in multiple locations.
B. Using unique keys for each record.
C. Storing foreign key references between tables.
D. Designing tables with normalized forms.
Answer: A
Rationale: Data redundancy occurs when the same piece of data is stored in
multiple places, which can lead to inconsistencies and increased storage
requirements.
2. Which of the following is a feature of Object-Oriented Databases?
A. Support for complex data types and inheritance.
B. Tables and rows for data storage.
C. Strict use of foreign keys.
D. Schema-less storage.
Answer: A
,Rationale: Object-oriented databases support complex data types, inheritance, and
encapsulation, storing data as objects that can represent real-world entities more
naturally than relational databases.
3. A view in SQL is:
A. A virtual table that is based on the result of a query.
B. A stored procedure for data retrieval.
C. A table with predefined data.
D. A way to optimize queries.
Answer: A
Rationale: A view is a virtual table that does not store data itself but is derived
from the result of a query. It can simplify complex queries and provide an
abstraction layer.
4. What does SQL GROUP BY do?
A. Groups rows that have the same values into summary rows.
B. Sorts the rows in the result set.
C. Combines multiple tables into a single result.
, D. Limits the number of rows in the result set.
Answer: A
Rationale: The GROUP BY clause groups rows that have the same values in
specified columns into summary rows, often used with aggregate functions like
COUNT(), SUM(), or AVG().
5. Which of the following is a foreign key used for?
A. To uniquely identify rows in a table.
B. To create a relationship between two tables.
C. To store large binary objects.
D. To allow faster indexing of data.
Answer: B
Rationale: A foreign key is used to establish and enforce a link between the
columns in two different tables. It ensures referential integrity by linking a column
in one table to a primary key in another.
6. In the context of entity-relationship (ER) modeling, an entity is represented by:
A. A rectangle.
A. Storing the same data in multiple locations.
B. Using unique keys for each record.
C. Storing foreign key references between tables.
D. Designing tables with normalized forms.
Answer: A
Rationale: Data redundancy occurs when the same piece of data is stored in
multiple places, which can lead to inconsistencies and increased storage
requirements.
2. Which of the following is a feature of Object-Oriented Databases?
A. Support for complex data types and inheritance.
B. Tables and rows for data storage.
C. Strict use of foreign keys.
D. Schema-less storage.
Answer: A
,Rationale: Object-oriented databases support complex data types, inheritance, and
encapsulation, storing data as objects that can represent real-world entities more
naturally than relational databases.
3. A view in SQL is:
A. A virtual table that is based on the result of a query.
B. A stored procedure for data retrieval.
C. A table with predefined data.
D. A way to optimize queries.
Answer: A
Rationale: A view is a virtual table that does not store data itself but is derived
from the result of a query. It can simplify complex queries and provide an
abstraction layer.
4. What does SQL GROUP BY do?
A. Groups rows that have the same values into summary rows.
B. Sorts the rows in the result set.
C. Combines multiple tables into a single result.
, D. Limits the number of rows in the result set.
Answer: A
Rationale: The GROUP BY clause groups rows that have the same values in
specified columns into summary rows, often used with aggregate functions like
COUNT(), SUM(), or AVG().
5. Which of the following is a foreign key used for?
A. To uniquely identify rows in a table.
B. To create a relationship between two tables.
C. To store large binary objects.
D. To allow faster indexing of data.
Answer: B
Rationale: A foreign key is used to establish and enforce a link between the
columns in two different tables. It ensures referential integrity by linking a column
in one table to a primary key in another.
6. In the context of entity-relationship (ER) modeling, an entity is represented by:
A. A rectangle.