October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

Normalize It, Then Break It on Purpose: 3NF to Star Schema, Explained Through Food Delivery

A food-delivery example shows why 3NF minimizes repeated operational facts while a star schema brings selected descriptive data together for clearer analysis—and why grain must come first.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A normalized database and a star schema solve different problems. Third Normal Form (3NF) helps an operational system maintain accurate records with less duplication; a star schema arranges facts and descriptive dimensions to make analysis easier. The useful transition is not a mechanical conversion: start with a business question, declare the grain of each fact, then decide which descriptive data to bring together for reporting.

Why keep operational data in separate tables?

In a food-delivery system, customers, restaurants, menu items, orders, order lines, couriers, and delivery statuses are distinct entities. A normalized design stores each fact with the entity it describes and connects related records with keys. For example, customer contact details belong to a customer record, restaurant address belongs to a restaurant record, and an order line can refer to a menu item and its quantity.

As an Amazon Associate I earn from qualifying purchases.

This organization minimizes repeated facts and helps avoid insertion, update, and deletion anomalies—the central aims Oracle describes for 3NF design in its Data Warehousing Logical Design discussion. If a restaurant address is maintained once, changing it need not require updating many order records. The tradeoff is that a broad report may need to traverse several related tables.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What changes in a star schema?

A star schema organizes analysis around a fact table connected to descriptive dimensions. The fact table records observations or events, typically with keys to dimensions and measures to summarize. Dimensions provide the context people filter and group by: date, restaurant, menu item, customer segment, or delivery area. Microsoft explains these roles in its guidance on star schema for Power BI and dimensional modeling in Microsoft Fabric.

For a restaurant-sales report, analysts can group line amounts by month, restaurant, or item category by following the fact table’s dimension keys. Descriptive attributes that were split across operational entities may be brought together in a dimension, so the report user can work with a useful label and its category or location without navigating a chain of small tables.

3NF versus a star schema

Design question 3NF operational model Star-schema analytic model
Primary work Insert, update, and delete accurate operational records. Filter, group, and summarize data for analysis.
Table organization Distinct entities connected by relationships, with repeated facts minimized. Facts connected to descriptive dimensions.
Repetition Limit redundancy to reduce modification anomalies. Accept selected repetition in descriptive dimensions when it aids use and retrieval.
Typical query shape Broad reports may require joins across entity relationships. Measures are summarized in the context of dimension filters and groupings.
Design anchor Entities and their dependencies. Business process, declared grain, dimensions, and facts.

These are complementary approaches, not rival doctrines. Oracle’s older, Oracle Database 12c-era conceptual documentation compares 3NF and star schemas and describes architectures in which a 3NF foundation feeds star-schema access and performance layers. The right design depends on the system’s responsibilities; the table describes typical aims, not a guarantee about every implementation.

How to sketch the food-delivery star

1. Start with the business question

Suppose the question is: “How do delivered item sales and delivery times vary by day, restaurant, menu item, customer segment, and delivery area?” That question identifies the business process—delivery and sales analysis—and possible reporting dimensions. It does not yet establish that every requested measure belongs in one fact table.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Declare the grain before choosing measures

For a sales fact, a reasonable grain is one row per item line on an order. Grain is the atomic level represented by each fact row. Microsoft notes that fact-table key values determine granularity, and that a coarser fact cannot necessarily be split into the detail that was never stored; see Modeling Fact Tables in Warehouse.

At this grain, quantity, line amount, and discount amount can describe the item line. Delivery duration, however, may be recorded once per order. Repeating that whole-order measure across every item line and then summing it would overstate the total. Keep it in a separate order-level delivery fact, or define an aggregation approach that respects its order-level grain.

3. Assign keys, measures, and descriptive attributes

An illustrative FactOrderLine could contain date, restaurant, menu-item, customer, and delivery-area keys, plus an order identifier if useful for analysis. Its measures might include quantity, line amount, and discount amount. Dimensions could hold:

  • DimDate: calendar date, weekday, month, quarter, and year.
  • DimRestaurant: restaurant name and useful descriptive location or category attributes.
  • DimMenuItem: item name and category. Decide explicitly how to represent an item whose identity or description varies by restaurant.
  • DimCustomer: only attributes suitable for the reporting purpose and privacy constraints.
  • DimDeliveryArea: delivery zone and business rollups.

These names and relationships are an instructional sketch, not a schema prescribed for a real delivery platform. In a production model, decisions about status changes, refunds, cancellations, taxes, tips, currency, and changing customer or restaurant attributes follow the reporting requirements and the realities of the source data. Kimball’s dimensional-modeling techniques likewise put business requirements, processes, grain, dimensions, and facts at the center of the method.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why deliberately repeat some dimension data?

In an operational model, a restaurant’s area hierarchy or category might be maintained in separate related records. In an analytic dimension, those descriptive values can be brought together with the restaurant information people use to filter and group results. Some values then repeat across dimension rows. That is not automatically a flaw: it is a tradeoff that may make the model easier to use and retrieval simpler, at the cost of storage redundancy and the need to maintain the dimension consistently.

Denormalization is not always better. Microsoft notes that denormalized dimensions can improve usability in some settings while adding storage redundancy; a snowflake arrangement, with some dimension attributes separated into related tables, can also be appropriate. Oracle similarly treats normalized and dimensional designs as complementary options. Neither design alone guarantees useful analysis or a particular speedup; the model must fit its volume, users, and queries.

A practical design checklist

  • Name the business process and the questions the model must answer.
  • Write the grain as a precise statement about what one fact row represents.
  • Put measures at the grain where they are recorded; do not silently duplicate an order-level measure across item rows.
  • Use dimension keys to connect facts to descriptive context, and keep measures distinct from labels used for filtering and grouping.
  • Choose dimension attributes for real reporting needs, privacy constraints, and understandable labels.
  • Decide where selected descriptive repetition makes analysis clearer, and account for the maintenance and storage tradeoff.
  • Do not treat conversion as a mechanical exercise: validate that the resulting model can answer the business questions at the required detail.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.