TECHNOLOGIESTieInn Technologies

Modelling a business from scratch

Data Modelling · 12 questions

Short notes

Key idea

Modelling a business from scratch follows a repeatable path: pick a business process, declare the grain, choose the dimensions, then the facts. Start from the questions people ask, not from the source tables.

Syntax

  1. List the questions ("revenue by city by month", "repeat customers").
  2. Pick the process: orders, payments, deliveries.
  3. Declare the grain: one row per order line.
  4. Dimensions: date, customer, product, store, channel.
  5. Facts: qty, amount, discount.
  6. Conformed dimensions shared across facts (the same dim_customer for orders and payments).
  7. Check each original question can be answered.

Example

A food delivery app: fact_orders (order grain: amount, fee, delivery minutes) and fact_ratings (rating grain). Both share dim_customer, dim_restaurant and dim_date, so "rating vs delivery time by restaurant" is possible.

Traps

  • Copying the app's tables into the warehouse unchanged gives an OLTP model, not an analytical one.
  • Skipping the grain leads to mixed-grain facts.
  • Different "customer" tables per team give different numbers for the same question.
  • Model for questions you have now, but at the lowest grain so new ones fit.

Want the full lesson with step-by-step examples, a project and a certificate? Data Modelling course, ₹120 →

Questions

5 free questions
5 questions

    Modelling a business from scratch

  1. Question 1easy

    An interviewer says "Design the data model for an online pharmacy." What should you do first?

  2. Modelling a business from scratch

  3. Question 2medium

    Why model orders and deliveries as separate fact tables in a food delivery app?

  4. Modelling a business from scratch

  5. Question 3medium

    A ride-hailing company wants surge patterns by hour of day. What should the model include?

  6. Modelling a business from scratch

  7. Question 4hard

    A hospital needs bed occupancy for every ward on every day. Which fact table fits?

  8. Modelling a business from scratch

  9. Question 5medium

    For a ride-hailing app's trips fact, which set are dimensions?

7 more questions on this topic, with hints, and tests

Sign up free for 21 days of every question and test.