2nd EXAM sir sting Flashcards
(44 cards)
Q: What is SQL normalization?
A: SQL normalization is the process of organizing a database into tables and columns to reduce redundancy and improve data integrity.
Q: What are the goals of SQL normalization?
A: The main goals are to reduce redundancy and improve data integrity by dividing large tables into smaller, related tables.
Q: What are the key characteristics of a primary key?
A:
Uniqueness: No two rows can have the same primary key value.
Non-nullability: A primary key cannot contain null values.
Immutability: The primary key should not change once assigned.
It can be a single column or a composite key.
Q: What is the goal of the First Normal Form (1NF)?
A: To eliminate repeating groups in a table.
Q: What is a primary key?
A: A primary key is a unique identifier for each record in a database table, ensuring no duplicate records.
Q: What rule does 1NF enforce?
A: Each column should contain atomic (indivisible) values, and each record must be unique.
Q: What is a transitive dependency?
A: A situation where a non-key column is dependent on another non-key column, rather than the primary key.
Q: What rule does 2NF enforce?
A: The table must be in 1NF, and all non-key columns must be fully dependent on the primary key.
Q: What happens when a table violates 1NF?1
A: The table has non-atomic columns, such as multiple values in one column.
Q: What is the goal of the Third Normal Form (3NF)?
A: To eliminate transitive dependencies.
Q: What is the goal of the Second Normal Form (2NF)?
A: To eliminate partial dependencies.
Q: What is a partial dependency?
A: It occurs when a non-key column is dependent on part of a composite primary key rather than the entire key.
Q: What rule does 3NF enforce?
A: The table must be in 2NF, and all columns must be directly dependent on the primary key.
Q: How do you normalize a table with partial dependencies to 2NF?
A: Split the table into separate tables where non-key columns are fully dependent on the entire primary key.
Q: What problem does the table in 1NF with a “Courses” column have?
A: It violates atomicity by containing multiple values in one column.
Q: How do you normalize a table with transitive dependencies to 3NF?
A: Create separate tables for columns that are dependent on non-key attributes.
Q: What is an entity in data modeling?
A: An entity is something that exists independently and is distinguishable, like “Customer,” “Product,” or “Order.”
Q: What is the purpose of conceptual database design?
A: It describes the data, relationships, and constraints in a database, focusing on the data rather than the processes.
Q: What is the output of conceptual database design?
A: The output is a Conceptual Data Model and a Data Dictionary.
Q: What is data modeling?
A: It is the iterative and progressive process of creating a specific data model to represent complex real-world data structures.
Q: What is the bottom-up approach to data modeling?
A: It starts by analyzing specific details from business documents, working towards a broader understanding.
Q: What is the top-down approach to data modeling?
A: It starts with a broad understanding of the business needs and gradually moves into the details.
Q: What are attributes in data modeling?
A: Attributes are the characteristics or properties of an entity. For example, a “Customer” entity may have attributes like “Name” and “Email.”
Q: What is a relationship in data modeling?
A: A relationship defines how entities are connected. For example, a “Customer” places an “Order.”