Define the concept of database normalization and explain its primary goals in database design.
Explain the rules and characteristics of First Normal Form (1NF). Provide a concrete example of a table that violates 1NF and how to refactor it to comply.
Explain the rules and characteristics of Second Normal Form (2NF). Provide a concrete example of a table that violates 2NF and how to refactor it to comply. Assume the table is already in 1NF.
Explain the rules and characteristics of Third Normal Form (3NF). Provide a concrete example of a table that violates 3NF and how to refactor it to comply. Assume the table is already in 2NF.
Consider the following simplified initial schema designed by a junior developer:
Identify and explain at least three significant normalization violations or design flaws present in this schema, specifically focusing on the full_address and tags columns. Discuss the potential problems each flaw could cause (e.g., data redundancy, update anomalies, query complexity).
Refactor the problematic users and products tables from Question 5 to achieve Third Normal Form (3NF). Provide the SQL DDL (CREATE TABLE statements) for your new, normalized schema. Clearly indicate any new tables, columns, primary keys, foreign keys, and constraints added.
Explain the key advantages of your refactored schema from Question 6 compared to the original design presented in Question 5. Focus on how your changes improve data integrity, queryability (provide a simple example query demonstrating improved querying for tags), and overall maintainability and flexibility of the database.