1NF (First Normal Form)
Mathematical Proof & Decomposition
📜 Formal Definition: Eliminate repeating groups, multi-valued attributes, and non-atomic cells. Every column must hold atomic (single) values with a defined Primary Key.
⚠️ Violations Detected & Addressed: The denormalized table contained composite comma-separated values (e.g., multi-item lists in a single cell) and lacked strict domain atomicity.
🛠️ Mathematical Resolution: We unrolled repeating multivalued items into distinct tuples and assigned a canonical composite primary key (order_id, item_id).
🛠️ Mathematical Resolution: We unrolled repeating multivalued items into distinct tuples and assigned a canonical composite primary key (order_id, item_id).
🗄️ Decomposed Relations in 1NF (First Normal Form) (1 tables)
order_details_unnormalized_1nfPK: order_id, item_id
1NF Table with atomic attributes and composite primary key (order_id, item_id)
| Column | Type | Key |
|---|---|---|
| order_id | BIGINT | PK |
| item_id | BIGINT | PK |
| customer_id | BIGINT | - |
| customer_name | VARCHAR(255) | - |
| customer_email | VARCHAR(255) | - |
| order_date | DATE | - |
| item_name | VARCHAR(255) | - |
| item_price | DECIMAL(10,2) | - |
| quantity | INT | - |
| supplier_id | BIGINT | - |
| supplier_name | VARCHAR(255) | - |
| supplier_city | VARCHAR(100) | - |
🚀 Compiled PostgreSQL DDL for 1NF (First Normal Form)
-- ============================================================================ -- INSIGHTFUL SAGA SCHEMA EXPORT — POSTGRES DDL -- Generated: 2026-11-12T16:10:33.067Z -- ============================================================================ CREATE TABLE IF NOT EXISTS order_details_unnormalized_1nf ( order_id BIGINT NOT NULL, item_id BIGINT NOT NULL, customer_id BIGINT, customer_name VARCHAR(255), customer_email VARCHAR(255), order_date DATE, item_name VARCHAR(255), item_price DECIMAL(10,2), quantity INT, supplier_id BIGINT, supplier_name VARCHAR(255), supplier_city VARCHAR(100), CONSTRAINT pk_order_details_unnormalized_1nf PRIMARY KEY (order_id, item_id) ); COMMENT ON TABLE order_details_unnormalized_1nf IS '1NF Table with atomic attributes and composite primary key (order_id, item_id)';