Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 1.2 KB

README.md

File metadata and controls

25 lines (18 loc) · 1.2 KB

When spreadsheets aren’t good enough: A lesson in relational databases

Database normalization, relational databases, and why you need them

Summary

Repository for Towards Data Science article: "When spreadsheets aren’t good enough: A lesson in relational databases". Includes follow-along SQL code to demonstrate how to structure relational databases using MySQL.

Contents

  1. Table Creation and Loading

    • create_tables.sql - creation of synthetic customer and email databases
    • data_input.sql - data input to customer and email tables with artificial data
  2. Normal Forms

    • first_normal_form.sql - code used to transform databases into 1NF
    • second_normal_form.sql - code used to transform databases into 2NF
    • third_normal_form.sql - code used to transform databases into 3NF
  3. Queries

    • queries.sql - SQL queries that retrieve information of customers and email prospects to target

Software

Note: this code can be adapted to work with the SQL server of your choice.