Skip to content

Latest commit

 

History

History
63 lines (31 loc) · 726 Bytes

Lesson plan.md

File metadata and controls

63 lines (31 loc) · 726 Bytes

Database basics

Tables

  • Creating tables with the diagram designer and with SQL

  • Field types and nulls

CRUD

  • Create

  • Retrieve

  • Update

  • Delete

Keys

  • Primary

  • Natural vs arbitrary

  • Foreign

    • Create another table

    • Populate from CSV file with import/export

    • Link it

Joins

  • Inner join

  • Left outer join

  • Other join types

More advanced stuff

Indexes

  • Primary keys are clustered indexes by default

  • Foreign key fields should have indexes so joins are fast

  • Fields that are part of queries should also have indexes

Stored procedures and functions

  • Motivation

  • Examples

Transactions

  • Motivation

  • Examples