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

Connected

Exercise

Creating entities for ER model

The HR department has requested a new system to track the training programs employees have completed.

Your task involves applying the ER model by setting up a new entity to record the details of each session, including a reference to the training program from the trainings entity.

Instructions

100 XP
  • Create a new entity called employee_training_details that will store records of training sessions attended by employees.
  • This entity should include an employee_training_id as a primary key; the datatype should be NUMBER(10,0).
  • Add a new attribute year with datatype NUMBER(4,0) to record the year that the employee took the training.
  • Include foreign keys that reference employee_id in the employees entity and training_id in the training entity; both are NUMBER(38,0) data types.
Powered by Snowflake