1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Modeling in Snowflake

Connected

Exercise

Implementing conceptual data model

As you progress in this journey to model data, it's essential to get hands-on practice on how to implement the models.

In our ongoing E-Commerce project, the logical and conceptual data model indicated to us that there are three key entities: customers, orders, and products.

The customers entity is ready, and now, for this exercise, you will focus on defining the table structures for orders and products.

Instructions 1/2

undefined XP
  • 1
    • Create, or replace if it already exists, products table.
    • Define the columns stockcode and description with VARCHAR(255) as the data type.
  • 2
    • Create, or replace, the orders table.
    • List the attributes related to invoice;
      • invoiceno to be a character column
      • invoicedate to store time.
    • Add the attribute unitprice as a number 10 digits long and with 2 decimals.
    • Add quantity attribute as number values without decimals, up to 38 digits long.