1. Which of the following is a primary characteristic of a relational database?
A. Data is stored in tables, which are related to each other.
B. Data is stored in files.
C. Data is stored in objects.
D. Data is stored in nodes.
Answer: A
Rationale: A relational database stores data in tables, with relationships between
those tables defined by keys. Each table consists of rows and columns, and data is
organized in a way that facilitates easy retrieval and manipulation.
2. In SQL, the JOIN operation is used to:
A. Combine data from two or more tables based on a related column.
B. Merge rows within the same table.
C. Remove duplicate values.
D. Delete records from a table.
Answer: A
,Rationale: The JOIN operation is used to combine data from multiple tables based
on a related column, typically a foreign key.
3. In SQL, which command is used to remove a table from a database?
A. DELETE
B. REMOVE
C. DROP
D. TRUNCATE
Answer: C
Rationale: The DROP command is used to remove an entire table from the
database, including its structure and all data.
4. Which of the following is a constraint in a database?
A. Primary key
B. Data type
C. Foreign key
D. All of the above
Answer: D
, Rationale: Primary keys, foreign keys, and data types are all types of constraints
that enforce data integrity rules within a database.
5. Which of the following is not a characteristic of NoSQL databases?
A. Schema-less design
B. Horizontal scalability
C. Strong consistency
D. Non-relational data model
Answer: C
Rationale: NoSQL databases are often designed for horizontal scalability and
flexibility with a schema-less structure. They may favor eventual consistency over
strict consistency.
6. Decomposition in database design refers to:
A. Splitting a relation into smaller relations to achieve normalization.
B. Removing redundant data from a table.
C. Merging multiple relations into one.
D. Removing a table from a database.
A. Data is stored in tables, which are related to each other.
B. Data is stored in files.
C. Data is stored in objects.
D. Data is stored in nodes.
Answer: A
Rationale: A relational database stores data in tables, with relationships between
those tables defined by keys. Each table consists of rows and columns, and data is
organized in a way that facilitates easy retrieval and manipulation.
2. In SQL, the JOIN operation is used to:
A. Combine data from two or more tables based on a related column.
B. Merge rows within the same table.
C. Remove duplicate values.
D. Delete records from a table.
Answer: A
,Rationale: The JOIN operation is used to combine data from multiple tables based
on a related column, typically a foreign key.
3. In SQL, which command is used to remove a table from a database?
A. DELETE
B. REMOVE
C. DROP
D. TRUNCATE
Answer: C
Rationale: The DROP command is used to remove an entire table from the
database, including its structure and all data.
4. Which of the following is a constraint in a database?
A. Primary key
B. Data type
C. Foreign key
D. All of the above
Answer: D
, Rationale: Primary keys, foreign keys, and data types are all types of constraints
that enforce data integrity rules within a database.
5. Which of the following is not a characteristic of NoSQL databases?
A. Schema-less design
B. Horizontal scalability
C. Strong consistency
D. Non-relational data model
Answer: C
Rationale: NoSQL databases are often designed for horizontal scalability and
flexibility with a schema-less structure. They may favor eventual consistency over
strict consistency.
6. Decomposition in database design refers to:
A. Splitting a relation into smaller relations to achieve normalization.
B. Removing redundant data from a table.
C. Merging multiple relations into one.
D. Removing a table from a database.