1Z0-006 Database Concepts & Terminology 3 β Questions and Answers
Question 1: What is a 'view' in a relational database?
- A physical copy of a table stored on disk
- A virtual table based on the result of a stored query (Correct answer)
- An index that improves query speed
- A user account with read-only access
Correct answer: A virtual table based on the result of a stored query
A view is a virtual table defined by a SELECT query; it does not store data itself but presents data from one or more underlying tables.
Question 2: In database terminology, 'cardinality' of a relationship refers to:
- The number of columns in a table
- The number of rows in a table at any given time
- The numerical mapping of how many instances of one entity relate to another (Correct answer)
- The maximum size of a data type
Correct answer: The numerical mapping of how many instances of one entity relate to another
Cardinality describes the numerical relationship between entity instances, such as one-to-one, one-to-many, or many-to-many.
Question 3: Which normal form eliminates partial dependencies on a composite primary key?
- First Normal Form (1NF)
- Second Normal Form (2NF) (Correct answer)
- Third Normal Form (3NF)
- Boyce-Codd Normal Form (BCNF)
Correct answer: Second Normal Form (2NF)
2NF requires that every non-key attribute is fully functionally dependent on the entire primary key, eliminating partial dependencies.
Question 4: What is a 'transaction' in database terms?
- A report generated from the database
- A single SQL SELECT statement
- A logical unit of work containing one or more SQL operations that must complete as a whole (Correct answer)
- A stored procedure that runs on a schedule
Correct answer: A logical unit of work containing one or more SQL operations that must complete as a whole
A transaction is a unit of work that groups one or more DML operations; it either commits all changes or rolls back all changes to maintain database integrity.
Question 5: The 'C' in ACID properties of a database transaction stands for:
- Concurrency
- Consistency (Correct answer)
- Completeness
- Compactness
Correct answer: Consistency
Consistency ensures that a transaction brings the database from one valid state to another, maintaining all defined rules and constraints.
Question 6: Which type of database relationship exists when one record in Table A can relate to many records in Table B, and one record in Table B can relate to many records in Table A?
- One-to-one
- One-to-many
- Many-to-many (Correct answer)
- Self-referencing
Correct answer: Many-to-many
A many-to-many relationship means multiple rows in one table associate with multiple rows in another, typically implemented using a junction (bridge) table.
Question 7: What is 'referential integrity' in a relational database?
- Ensuring that all data is encrypted before storage
- Guaranteeing that foreign key values always match an existing primary key value (Correct answer)
- Making sure all queries return results in the correct order
- Verifying that column names follow naming conventions
Correct answer: Guaranteeing that foreign key values always match an existing primary key value
Referential integrity is a constraint that ensures every foreign key value either matches a primary key in the referenced table or is NULL, preventing orphaned records.
What is a 'view' in a relational database?