← All projects
DATA MODELINGintermediate

Data Modeling: Pizza Planet Party

Restaurant-ops data modeling: orders, inventory, and shifts

Pizza Planet Party: Galactic Data Modeling

A Cosmic Pizza Festival Awaits! 🚀🍕

Greetings, fearless data astronaut! At Pizza Planet, we're about to kick off the biggest cosmic pizza celebration in the galaxy. Astronauts, aliens, and space explorers from every corner of the universe are warping in, and we must track it all with a stellar data model.

Chef Basil, our interstellar culinary wizard, needs help organizing customer info, pizza details, and the rocket-powered deliveries zooming across the stars. Chef Coriander, our cosmic fleet manager, insists we keep the design simple yet as powerful as a supernova.

Here's our mission plan:

  1. dim_customers & dim_pizzas with surrogate keys (like space IDs).
  2. A single fact_deliveries table to track our intergalactic pizza journeys.
  3. Finish by assigning the right data types for each column (not even black holes can mess with proper typing).

With your data modeling superpowers, we'll ensure every cosmic slice is documented, every alien customer is accounted for, and every warp-speed delivery is a success!

Mission Accomplished: The Cosmic Feast Begins! 🎉🍕🚀

Stellar Success! With your brilliant data engineering, we have our dim_customers and dim_pizzas built to withstand supernovas, the fact_deliveries ready to track orders across galaxies, and all columns typed with quantum precision. Chef Basil is now prepared for the cosmic crowd—and Chef Coriander can monitor deliveries faster than the speed of light!

Thank you for your heroic modeling skills, interstellar data champion! Now, let's slice up the galaxy's finest pizzas and celebrate the success of our new cosmic data model. May your tables always join efficiently and your queries run at warp speed!

🍕 🚀 👽 🌌 🍕

Project plan

3 steps to ship this

Draft each step inline below. Reveal the worked solution when you're ready to compare.

  1. Forging the Dimensional Foundations 🛠️

    We begin by creating two dimension tables for our cosmic database:

    • dim_customers with customer_key as a surrogate PK (Primary Koordinate).
    • dim_pizzas with pizza_key as a surrogate PK (Pizza Koordinate).
    Natural IDs (customer_id, pizza_id) remain attributes. Beam the columns from the space pool into each dimension bucket.

    Mission Goal: Surrogate keys let us avoid the chaos of ever-changing cosmic IDs. Not even a supernova can disrupt Chef Basilmaf_single_qoutes records!

    Pick an item, then click the section it belongs in. Click again to put it back.

    Pool · 4 remaining

    dim_customers

    Empty

    dim_pizzas

    Empty
  2. Tracking Deliveries Across the Galaxy 🛸

    Next, we build fact_deliveries to record every interstellar pizza order. Our loyal UFO couriers will want to know:

    • A delivery_key as the factmaf_single_qoutes primary key (Delivery Koordinate).
    • References to customer_key and pizza_key for warp-speed joins.
    • At least one measure or date—like order_date or amount_paid in space credits.
    Help us teleport the correct columns from the space pool into this single fact table.

    Mission Goal: Chef Coriander can then monitor which alien customer ordered which cosmic pizza, and how many galactic credits they paid.

    Pick an item, then click the section it belongs in. Click again to put it back.

    Pool · 5 remaining

    fact_deliveries

    Empty
  3. Bestowing Cosmic Data Types 🔭

    Finally, every column must receive the perfect galactic data type—like INT for keys, VARCHAR for IDs, DATE for stellar timestamps, and DECIMAL for space credits.

    Mission Goal: Once assigned, our model will withstand even the gravitational pull of a black hole. Letmaf_single_qoutes drag each column to the Data Types bucket and select from the quantum dropdown.

    Pick an item, then click the section it belongs in. Click again to put it back.

    Pool · 7 remaining

    Quantum Data Types

    Empty