Applying 2NF
Your productqualityrating
entity is a rich dataset that captures the essence of chocolate bars reviewed over various years. You noticed that the company_location
attribute depends on the manufacturer
attribute. The company_location
values repeat every time they are together with the manufacturer attribute, which violates the second normal form's rule against partial dependencies.
By separating this data into a dedicated manufacturers
entity, you can remove redundancies and prepare our data model for more efficient operations. This step is crucial in maintaining data integrity and allows scalable business intelligence solutions.
Your task is to normalize this data to align with 2NF principles, ensuring that each non-key attribute entirely depends on the primary key.
This exercise is part of the course
Introduction to Data Modeling in Snowflake
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
-- Add new entity
___ (
-- Assign unique identifier
___ NUMBER(10,0) PRIMARY KEY,
--Add other attributes
___ VARCHAR(255),
___ VARCHAR(255)
);