Input Mode:
Step-by-Step Normalization Stages:
Step 1 of 3
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).

🗄️ 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)

ColumnTypeKey
order_idBIGINTPK
item_idBIGINTPK
customer_idBIGINT-
customer_nameVARCHAR(255)-
customer_emailVARCHAR(255)-
order_dateDATE-
item_nameVARCHAR(255)-
item_priceDECIMAL(10,2)-
quantityINT-
supplier_idBIGINT-
supplier_nameVARCHAR(255)-
supplier_cityVARCHAR(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)';