CS348: Introduction to Database Management

signature - doesn’t change, it’s the high-level metadata Instance - the actual data

One thing he said is super interesting: Most modern databases have implementations for conjunctive (AND). For disjunctive, they have some sort of heuristic. I need to check this.

Read this instead https://oberstar.eu.org/share/Documents/The-Manga-guide-to-databases.pdf.

Setup with db2

Tutorial for setup: https://cs.uwaterloo.ca/~david/cs348/DB2atUW-Tutorial.pdf

First, you need to source your environment

source ~db2inst2/sqllib/db2profile

To run code from a file batch.file use:

db2 -f batch.file

Things I need to master for midterm:

  • Syntax for SQL Insert, Delete, Update
  • Joins
  • Embedded SQL

It seems that in general, prefer NOT EXISTS over NOT IN, only use IN if you really need it. It might come more intuitively to use IN, but exists is better since you won’t need to worry about handling NULL values in most cases.

Integrity checks seem to prefer NOT EXISTS. If it is a “Every …”, turn it into a “No …” statement.

I need to go through the midterm practices

Concepts

Module 1: Overview of Data Management

Resources:

Final:

  • Review the functions to ccompute3NF

Timeline: By 5:45 finish going through the slides, and go through the homework things first.

Then, go through past finals.

Things I don’t understand

  • wtf is a join and inclusion dependency? p.422

Things to practice

  • Compute3NF do it manually
  • more SQL practice
  • First part of CS348, since it seems that the exam is comprehensive

embedded SQL

  • Cursor