Tutorial
Arslan
ArslanAug 29, 2026

Learn what data normalization means in databases, machine learning, and web data. Explore examples, methods, benefits, trade-offs, and best practices.

What Is Data Normalization? Database, ML, and Web Data

Data normalization applies consistent rules to data so a specific system can store, compare, or use it predictably. The rules may change structure, relationships, formats, labels, or numeric scales.

This guide uses the term in three contexts: relational database design, machine-learning feature scaling, and operational standardization across varied source records. This distinction matters because each meaning solves a different problem. A guide to structured and unstructured data provides more context for the operational meaning.

Database Normalization Organizes Relational Tables

Database normalization organizes related data into tables and connects those tables with keys. The practical goal is to limit repeated data and avoid inconsistent relationships between records.

Microsoft Learn’s database guide states, “Normalization is the process of organizing data in a database.” Normal forms provide checks for deciding which fields belong together.

ML Normalization Rescales Numerical Features

ML normalization rescales numerical features so their magnitudes are more comparable during model training or inference. Common methods include min-max scaling, z-score scaling, log scaling, and clipping.

According to Google’s normalization lesson, “Linear scaling” commonly maps values to “0 to 1 or -1 to +1”; the formulas are x' = (x - x_min) / (x_max - x_min) and x' = (x - μ) / σ. Method choice depends on the feature distribution, bounds, outliers, and model.

Operational Normalization Standardizes Heterogeneous Records

In this guide, operational normalization means mapping source-specific data into a shared schema. It can standardize fields such as dates, prices, units, identifiers, categories, and missing values. For web data, this approach can give downstream code a more consistent record even when sources use different layouts or wording.

A Raw-to-Normalized Web Data Example

A web data normalization example converts different retailer values into one typed product record. Each source may use different labels, currencies, stock phrases, and color names.

Olostep’s Merchkit article shows this pattern across retailer sources. The schema becomes the shared interface between source pages and catalog systems.

Map Source Fields Into One Product Schema

Schema mapping assigns varied source values to defined fields, types, and allowed values. The mapping should retain source evidence when a conversion could hide detail or uncertainty.

Raw inputs might look like this. Each line describes the same product:

text
Store A: price="$129.99", availability="In stock", color="Midnight Blue"
Store B: price="129,99 USD", stock="Available now", colour="Navy"
Store C: price_cents=12999, inventory_status="Y", finish="Blue - Dark"

With schema-based HTML extraction, field names and data types are defined before varied HTML is mapped. One normalized record could be:

json
{
  "product_id": "sku-4821",
  "price": {
    "amount": 129.99,
    "currency": "USD",
    "raw": "$129.99"
  },
  "availability": "in_stock",
  "color": {
    "canonical": "dark_blue",
    "raw": "Midnight Blue"
  },
  "source": {
    "url": "https://retailer.example/products/sku-4821",
    "extracted_at": "2026-08-25T14:30:00Z"
  },
  "schema_version": "product.v1"
}

This output keeps application fields predictable while retaining raw values for review. The source URL and extraction time also show where the record came from.

Qualify the Merchkit Results

Merchkit maps heterogeneous retailer data into one schema with standardized attributes and deterministic JSON. This is one operational example of source-specific extraction feeding a shared catalog model.

Olostep’s vendor-published case study on standardized retail catalog data reports 94% faster enrichment, five times more SKUs per month with the same team, and a 10x cost reduction. These figures describe Merchkit’s reported results from one case study, not expected outcomes for every team.

How a Production Web Data Normalization Pipeline Works

A production normalization pipeline moves source evidence through classification, mapping, validation, delivery, and monitoring. Each stage needs a defined input, output, and failure path.

A complete web data collection pipeline also accounts for acquisition and repeated runs. Normalization starts after retrieval, but retrieval quality affects every later field.

Acquire and Extract Source Evidence

Acquisition retrieves the page content needed to support each candidate value. JavaScript-heavy pages may require rendering before text, tables, metadata, or page state become available.

A URL to structured JSON workflow can connect a public source page to machine-readable output. The extraction stage should keep enough evidence to inspect the original value.

  1. Fetch the requested URL and record the response status.
  2. Render client-side content when the required fields depend on JavaScript.
  3. Extract candidate values with their source locations or surrounding text.

A successful fetch does not prove that the needed fields were present. Empty content, login pages, and unexpected page types should follow separate failure paths.

Classify the Page and Entity

Classification determines which schema and rules apply to the input. A product page, category page, article, and search result should not be forced into the same record shape.

  1. Classify the page type before field mapping.
  2. Identify the entity, such as a product, company, person, or event.

Ambiguous or unsupported inputs should enter a review queue. Returning a confident but incorrect entity type can corrupt later mappings and deduplication.

Normalize Formats, Units, Identifiers, and Taxonomies

Value normalization converts accepted source values into canonical representations. Every conversion rule should define locale handling, rounding, null behavior, and conflict resolution.

  1. Map source fields to canonical field names and data types.
  2. Standardize values such as dates, currencies, units, booleans, identifiers, and categories.

For example, 08/09/2026 is ambiguous without a locale rule. A price also needs separate amount and currency fields before systems can compare it safely.

Controlled categories require explicit enums. If the allowed availability values are in_stock, out_of_stock, and unknown, a new source phrase needs a documented mapping.

Validate, Deduplicate, and Quarantine Failures

Validation checks whether a normalized record meets its contract before delivery. Useful gates include required fields, types, enums, ranges, cross-field consistency, freshness, and duplicate identity.

  1. Validate the record and quarantine malformed or ambiguous outputs.
  2. Resolve duplicates with stable identifiers or documented matching rules.

Guidance on preventing bad web data explains why missing fields, invalid values, stale snapshots, and schema drift need separate checks. Silent coercion can turn uncertainty into false precision.

Version Outputs and Monitor Drift

Versioning records which parser and schema produced each output. Monitoring then compares repeated runs for changes in field presence, types, null rates, and value distributions.

  1. Deliver the versioned record and monitor its shape and fields over time.

Request status and record quality are separate signals. A request can succeed while a changed layout causes missing keys, null spikes, or incorrect mappings.

Schema changes should follow explicit compatibility rules. A renamed required field may need a new major version, while an optional field may fit a minor version.

Stable JSON Schemas Act As Data Contracts

A stable JSON schema defines the interface between changing sources and downstream consumers. It specifies field names, types, required values, arrays, objects, enums, null behavior, constraints, and versions.

Downstream code can depend on that contract instead of each source layout. Olostep’s guidance on stable JSON extraction contracts covers predictable keys, metadata, and field monitoring.

Choose Parsers, LLM Extraction, or a Hybrid

Choose the extraction method according to how fixed the required fields are. Olostep recommends parsers for recurring contract-critical fields, LLM extraction for fuzzy fields, and hybrids for mixed workloads.

A product price and currency may need strict parser output. A generated product summary may tolerate a flexible LLM step after the validated fields are available.

The hybrid boundary should be visible in the schema. Consumers need to know which values follow deterministic mappings and which values come from probabilistic extraction.

Store Provenance With the Normalized Record

Provenance records where a value came from and which process changed it. Store the source URL, extraction time, retrieve ID, parser or schema version, raw value, normalized value, and validation status.

Google Cloud’s lineage guide states, “Data lineage is a Dataflow feature that lets you track how data moves through your systems: where it comes from, where it is passed to, and what transformations are applied to it.” This supports traceability, but it does not establish a measured reliability or accuracy gain.

Provenance should travel with the record or remain addressable through stable identifiers. Temporary hosted JSON URLs should be treated as delivery paths, not permanent storage.

Database Normalization: A Practical 1NF, 2NF, and 3NF Baseline

Database normalization separates related facts into tables connected by keys. The following 1NF, 2NF, and 3NF example uses Microsoft Learn’s practical rules of thumb, not a complete formal treatment.

Start with one table that mixes customers, orders, and repeated product fields. Each row stores facts about several entities:

Order IDCustomer NameCustomer EmailProduct 1Product 2Sales RepRep Phone
1001Maya Chenmaya@example.comKeyboardMouseLuis555-0101
1002Maya Chenmaya@example.comMonitorPriya555-0102

The table repeats customer details and stores products in numbered columns. It also ties a sales representative’s phone number to every order row.

First Normal Form Removes Repeating Groups

First normal form removes repeating groups and identifies related records with keys. A practical change is to move order items into separate rows.

Orders

Order IDCustomer IDSales Rep ID
1001C17R4
1002C17R9

Order Items

Order IDLine NumberProduct Name
10011Keyboard
10012Mouse
10021Monitor

The order item key can combine Order ID and Line Number. Each product now occupies its own record instead of a numbered product column.

Second Normal Form Keeps Records Dependent on the Key

Second normal form keeps values dependent on the table’s key. Shared customer details should move out of the order table because one customer can have many orders.

Customers

Customer IDCustomer NameCustomer Email
C17Maya Chenmaya@example.com

The Orders.Customer ID field becomes a foreign key to Customers.Customer ID. This does not remove all possible redundancy, but it gives customer facts one defined location.

Third Normal Form Removes Fields That Do Not Depend on the Key

Third normal form removes fields that do not depend on the table’s key. A representative’s phone number belongs with the representative, not with an order.

Sales Representatives

Sales Rep IDSales Rep NameRep Phone
R4Luis555-0101
R9Priya555-0102

The order now references the representative by ID. Formal dependency theory, BCNF, and higher normal forms require a deeper database-specific treatment.

ML Normalization Methods and When to Use Them

ML normalization changes numerical feature scales, not relational table structure. The method should fit the feature’s distribution, bounds, outliers, and model sensitivity. Terminology varies, so document the exact formula and fitted statistics used.

MethodTransformationOutput BehaviorOutlier SensitivityCommon Fit
Min-maxRescales from observed minimum and maximumObserved endpoints map to 0 and 1HighStable bounds and few extreme outliers
Z-scoreCenters by mean and scales by standard deviationMean becomes 0; values are unboundedModerate to highNormal or approximately normal features
Log scalingApplies a logarithm to positive valuesCompresses a long right tailReduces magnitude gapsPositive, right-skewed features
ClippingCaps values at chosen limitsExtremes stop at set thresholdsDirectly limits extremesKnown implausible or disruptive tails

Min-Max Scaling Maps an Observed Range

Min-max scaling uses the observed minimum and maximum to map values onto a relative scale. The standard 0-to-1 formula is:

x' = (x - x_min) / (x_max - x_min)

The observed minimum maps to 0, and the observed maximum maps to 1. A future value outside that fitted range can produce a result below 0 or above 1.

Min-max scaling fits features with stable bounds and few extreme outliers. One large outlier can compress most observations into a narrow part of the output range.

Z-Score Scaling Centers Values Around the Mean

Z-score scaling expresses each value as a number of standard deviations from the mean. Its formula is:

x' = (x - μ) / σ

The transformed feature has a mean near 0 when the same fitted data is used. Z-scores are unbounded, so they do not place every value inside a fixed interval.

Z-score scaling often fits normal or approximately normal features. Extreme outliers can still require separate treatment because they affect the mean and standard deviation.

Log Scaling and Clipping Handle Skew and Extremes

Log scaling compresses large gaps in positive, right-skewed data. It can make values such as counts or prices easier for some models to use.

The exact function must handle zeros and negative values deliberately. Options such as log1p(x) work for nonnegative inputs, but they still change the feature’s interpretation.

Clipping caps values below or above chosen thresholds. The thresholds should reflect domain rules or measured distributions because clipping discards information beyond each cap.

Batch Normalization and Layer Normalization Are Different Topics

This article does not use batch normalization or layer normalization to mean dataset feature scaling. Those topics require separate, model-specific explanations and are outside this guide’s scope.

Normalization vs. Standardization vs. Denormalization

Normalization, standardization, and denormalization describe different operations. Their meaning depends on whether the subject is ML features, operational records, or database design.

The table separates these uses with consistent criteria. It also shows why the terms are not interchangeable:

TermMain DomainOperationTypical OutputMain Trade-Off
Min-max normalizationMachine learningRescales an observed numeric rangeOften 0 to 1Sensitive to new bounds and outliers
Z-score standardizationMachine learningCenters by mean and scales by standard deviationUnbounded z-scoresSensitive to distribution and outliers
Operational standardizationData engineeringMaps formats, units, labels, and schemasCanonical recordsMapping can hide source nuance
Database normalizationRelational databasesSeparates facts into related tablesKey-linked tablesMore joins may be required
Database denormalizationDatabase architectureDuplicates or nests selected dataFewer joins for chosen access patternsUpdates and consistency become more complex

Normalization and Standardization Depend on Context

In this article, min-max scaling means bounded rescaling of the fitted range, while z-score scaling means centering by the mean and scaling by the standard deviation. In data engineering, standardization may refer to consistent dates, units, labels, identifiers, or schemas. This operational use does not imply a statistical transformation.

Denormalization Is a Workload-Specific Database Choice

Denormalization intentionally duplicates or nests data for a defined database workload. The decision depends on the engine, schema, access patterns, update frequency, and measured costs.

Microsoft’s OLTP guidance states, “The goal of efficiently processing and storing individual transactions by an OLTP system is partly accomplished through data normalization.” This guidance concerns OLTP-oriented relational systems.

BigQuery performance guidance states, “Best practice: Use nested and repeated fields to denormalize data storage and increase query performance.” The recommendation is specific to BigQuery and does not fit every schema.

Benefits and Trade-Offs of Data Normalization

Data normalization has different benefits and costs in each domain. The mechanism matters more than the label.

A relational schema may reduce repeated facts. An ML transformation may make feature magnitudes comparable, while an operational schema may give consumers consistent fields.

Benefits Depend on the Normalization Domain

The benefit of normalization depends on the problem being solved. Each domain uses different rules and produces a different output.

DomainMechanismPotential BenefitImportant Condition
Relational databasesSeparates facts into key-linked tablesReduces repeated storage and inconsistent updatesTable design must fit integrity and access needs
Machine learningRescales numerical featuresPrevents raw magnitude from dominating scale-sensitive calculationsMethod must fit the model and distribution
Operational web dataMaps source values into a shared schemaGives downstream code consistent fields and typesMappings, validation, and versions need maintenance

These benefits are conditional, not universal performance claims. A poor schema or unsuitable scaling method can introduce new errors.

Trade-Offs Include Complexity, Information Loss, and Maintenance

Database normalization can increase the number of tables and joins needed for a query. Selective denormalization may fit measured access patterns, but duplicate data adds update and consistency work.

ML scaling depends on fitted statistics and distribution shape. Shifts in bounds, means, variance, or outliers can change how future values are represented.

Operational normalization requires mappings, validation rules, schema versions, and drift monitoring. Canonical values can also erase source wording, units, or uncertainty if raw evidence is discarded.

When You Should Not Normalize Data

Do not normalize data when the operation does not support the system’s actual needs. The decision should follow the domain, workload, model, and cost of losing source detail.

Scale-insensitive models may not need numeric feature scaling. A database may justify selected denormalization after measurement, while uncertain source values may need to remain raw.

Keep Raw Values When Meaning or Uncertainty Matters

Keep raw values when a canonical value would hide ambiguity, source wording, locale, confidence, or measurement detail. Store raw and normalized fields together when the conversion needs review or future reprocessing.

For example, converting “usually ships within a week” into shipping_days: 7 creates false precision. A safer record can keep the phrase and set a normalized estimate with an explicit confidence or status.

Normalization should also avoid silent unit assumptions. A field named weight: 10 is unsafe unless the source unit and canonical unit are known.

Measure Before Selective Database Denormalization

Selective database denormalization should respond to measured workload behavior. Useful evidence can include query latency, repeated joins, scan volume, update frequency, and engine-specific execution plans.

Document every duplicated field and its source of truth. The design should also define how updates propagate and how inconsistent copies are detected.

Data Normalization FAQs

These answers summarize the main decisions without repeating the full examples and methods above. Each answer stays focused on one common question.

What Does It Mean to Normalize Data?

Normalizing data means applying consistent rules to relational tables, numerical features, or varied source records for a defined use.

Is Data Normalization the Same in Databases and Machine Learning?

No. Database normalization restructures relational tables and dependencies, while ML normalization changes the scale or distribution of numerical features.

What Is an Example of Normalized Data?

Examples include customer and order facts split into linked tables, a numeric feature scaled with min-max, or retailer pages mapped into one product JSON schema.

Do All Machine-Learning Models Need Normalized Features?

No. Whether feature scaling is useful depends on the model, feature ranges, and distribution, so evaluate it as part of the training pipeline.

How Much Database Normalization Is Enough?

Use 1NF through 3NF as a practical baseline, then evaluate integrity, access patterns, engine behavior, query cost, and update complexity for the actual workload.

How Do You Keep Normalized Web Data Stable When Websites Change?

Use versioned schemas and parsers, preserve provenance, validate field shapes and values, monitor drift, retry recoverable failures, and route ambiguous records for review.

About the Author

Arslan Ali

Co-Founder, Olostep · San Francisco, CA

Arslan is the co-founder of Olostep, a web data infrastructure platform that helps developers and teams access, extract, and structure web data at scale. He works closely on the product and technology behind Olostep, with a focus on building reliable infrastructure for web scraping, search APIs, and structured web data.

On this page

Read more