LoslegenKostenlos loslegen

Building the physical data model

After creating all the entities and their respective attributes, the final step to completing the physical model is creating the relationships linking them.

In an e-commerce system, there are three essential entities: customers, products, and orders. And the relationship cardinality is: One customer generates many orders, and one order can contain many products.

You have previously created all the entities, and now it is time to create the relationships that link the orders table to customers and products as needed based on the cardinality described in the design of the physical model.

Diese Übung ist Teil des Kurses

Introduction to Data Modeling in Snowflake

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

-- Re-create orders table
___ (
  -- Assign unique identifier column
  ___,
  invoicedate TIMESTAMP_NTZ(9),
  unitprice NUMBER(10,2),
  quantity NUMBER(38,0),
  customerid NUMBER(38,0)
);
Code bearbeiten und ausführen