Skip to content

stephrlo/mySQL_database_normalization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Companion SQL Code for Towards Data Science article: "When spreadsheets aren’t good enough: A lesson in relational databases"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published