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
- Three-Tier Architecture
- Database
- RDBMS
- DML
- DDL
- Transaction (Database)
- ACID Properties of a Transaction Module 2: Relational Database
- Relational Data Model
- Relational Calculus (RC Query) Module 3: Introduction to SQL Module 4: Advanced SQL
- Integrity Constraint
- NULL Values
- SQL Trigger
- SQL Authorization Module 5: Applications Programming and SQL
- Embedded SQL Module 6: Applications Programming with Dynamic SQL
- Dynamic SQL Module 7: The Entity Relationship Data Model
- Entity-Relationship Model Module 8: Logical Mapping
- Also see Entity-Relationship Model Module 9: Data Dependence
- Functional Dependency
- BCNF Module 10: Query Evaluation
- Two-Tier Architecture
- Relational Algebra Module 11: Transaction and Recovery Management
- Concurrency Control
- Serialization Graph
- Two Phase Locking
- Deadlock
- Failure Recovery
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