Week 3 - Structured Query Language (SQL) & DuckDB

Learning objectives

  • Understand the relationship of SQL to relational databases
  • Understand how local databases differ from client/server databases
  • Understand basic SQL syntax and statements
  • Be able to answer basic questions about data

Slides and other materials

slides-03.pptx

Lecture notes:

ASDN dataset ER (entity-relationship) diagram

Class data GitHub repository, week 3

Resources

  1. http://swcarpentry.github.io/sql-novice-survey/

    • Good Carpentry lesson, our lesson is drawn from this.
  2. C.J. Date and Hugh Darwen (1993). A Guide to the SQL Standard. 3rd ed. Reading, MA: Addison-Wesley.
    Access via Library Catalog

    • The ANSI standard.
  3. Joe Celko (1995). Joe Celko’s SQL For Smarties: Advanced SQL Programming. San Francisco, CA: Morgan Kaufmann.
    Access via Library Catalog

    • This guy is an SQL guru. Newer versions of this book are available online, check the Library catalog (a bug is preventing me from linking directly).
  4. Grant Allen and Mike Owens (2010). The Definitive Guide to SQLite. 2nd ed. Berkeley, CA: Apress.
    Access via Library Catalog

    • Good reference. Can access online!
  5. Jeffrey D. Ullman and Jennifer Widom (2008). A First Course in Database Systems. 3rd ed. Upper Saddle River, NJ: Pearson/Prentice Hall.
    Access via Library Catalog

    • Complete but theoretical introduction to relational databases, data modeling, and relational algebra.

Homework

SQL problem 1

SQL problem 2

SQL problem 3


Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License

UCSB logo