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

Connected

Exercise

Altering an entity

Imagine the business has decided to track more contact details for each fruit product supplier. This information is crucial for businesses like quality control and supply chain management.

Your task is to adapt the suppliers entity to have all the required attributes and a well-identified key so that you can relate later suppliers to the rest of the data model.

The entity suppliers already exist. Below is the code of how it was created:

CREATE OR REPLACE TABLE suppliers (
    name VARCHAR(255),
    location VARCHAR(255)
);

Instructions 1/3

undefined XP
  • 1
    • Alter the existing suppliers entity.
    • Add a new attribute named region of type VARCHAR(255).
  • 2
    • Alter the existing suppliers entity.
    • Add a new attribute: contact with datatype VARCHAR(255).
  • 3
    • Alter the existing suppliers entity to set supplier_id attribute as the unique identifier of the entity.

    • ⚠️ If you see an SQL compilation error, reload the page and press Run Solution.