Exploring Conceptual and Logical Data Models

Introduction to Data Modeling in Snowflake

Nuno Rocha

Director of Engineering

What is a conceptual model?

Conceptual model, sketch of a house

Introduction to Data Modeling in Snowflake

What is a logical data model?

Logical model, house blueprint with room sizes and others

Introduction to Data Modeling in Snowflake

Applying the conceptual model

Conceptual model: High-level overview of main data entities Conceptual model, list of entities

Introduction to Data Modeling in Snowflake

Applying the conceptual model (1)

Conceptual model: High-level overview of main data entities Conceptual model, relationship between the entities

Introduction to Data Modeling in Snowflake

Applying the logical model

Logical model: Detailed entities with attributes definition and their relationship Logical model, entities with list of attributes

Introduction to Data Modeling in Snowflake

Applying the logical model (1)

Relationship cardinality: Number of times entities are associated to each other Logical model, adding relationship cardinality

Introduction to Data Modeling in Snowflake

Implementing the logical model

SELECT FROM: SQL command to fetch columns from a table

SELECT * 
FROM ecommerceonlineretail;

E-Commerce data

Introduction to Data Modeling in Snowflake

Implementing the logical model (1)

DESC TABLE ecommerceonlineretail;

E-Commerce data

Introduction to Data Modeling in Snowflake

Implementing the logical model (2)

CREATE TABLE: SQL command to define a new table structure

CREATE OR REPLACE TABLE customers (
    customerid NUMBER(38,0),
    country VARCHAR(255)
);
Introduction to Data Modeling in Snowflake

Terminology and functions overview

  • Conceptual model: High-level overview of main data entities
  • Logical model: Detailed entities with attribute definitions and their relationship
  • Relationship cardinality: Number of times entities are associated with each other
  • SELECT FROM: SQL command to fetch columns from a table
  • CREATE OR REPLACE TABLE: SQL command to create or replace a table structure
SELECT * FROM table_name;
CREATE OR REPLACE TABLE table_name (
      column_name column_datatype,
      another_column column_datatype
); 
Introduction to Data Modeling in Snowflake

Let's practice!

Introduction to Data Modeling in Snowflake

Preparing Video For Download...