Database Tutorial

Course Tutorial Site

Site Admin

Help Section

without comments

Lab #3: Modeling Data

Learn data modeling definitions, theory, and normalization process; learn how to use common lookup tables; who-audit columns to manage row-level security; and the INSERT statement.

Help Section

The following is an set of sample programs and steps that address concepts in the lab. The instructor should review these in classroom or in a Google Hangout with students.

This lab deploys an imperfect attempt at a core database design pattern, which is known as the lookup pattern. The idea requires that you store commonly used terms for drop down or popup lists that let you choose values, like Yes or No.

The following articles cover key aspects of INSERT statements and how you can write a scalar subquery to lookup surrogate key values with the natural key values. You will also learn how to write INSERT statements that use named notation. Named notation is superior to positional notation because table designs may change over time and lead to positional notation INSERT statements putting data where it doesn’t belong.

The data modeling concepts are taken from Chapter 3 of MySQL Workbench: Data Modeling and Development (and provided as a PDF file), the common lookup design pattern is in the online reading, and the who-audit security concepts is in the online reading:

Click the Instructional Material link to see the preparation lesson material.

Written by michaelmclaughlin

August 13th, 2018 at 12:05 am

Posted in