CS348: Introduction to Database Management
Taught by Toman.
He is lazy at making new questions for midterm and final. For the midterm, he literally copy pasted a past midterm.
Concepts
Module 1: Overview of Data Management
- Database
- Database System
- Database Management System
- Data Definition Language
- Data Manipulation Language
Module 2:
Module 3:
Module 4:
Module 5:
- SQL Authorization
Module 6:
Module 7:
Module 8:
Module 9:
Module 10:
Module 11:
Module 12:
Setup db2
source ~db2inst2/sqllib/db2profile
db2
connect to cs348
quit
db2 list tables
db2 -f printTables.sql
Final
-
Embedded sql and ocbd not on it, Not Module 6
-
BCNF and 3NF
-
Minimal FD sets
-
Lossless
-
Superkey - Candidate key
-
2PL is high priority
-
Scheduler are responsible for operations: execute, delay, reject, ignore and there is two schedulers one that delays and one that rejects
-
Shared lock is when you have something where you can read from and you put a shared lock around it, and you can’t write until you finish reading it
-
Exclusive lock is when you have a lock around something that you write, but it can’t continue and do anything else until it has finished writing
Midterm
Up to module 6, nothing module 7 onward
- So far, we have learned about Database, RC Queries, SQL, embedded SQL
- Relational model, how to represent data, queries
- What is domain independence
- What is logical and physical data independence?
- Majority will be problem solving, writing queries in RC or SQL
- Writing integrity constraints
- Week 1:
- no question on the history of data base
- what are transactions good for
- what is data independence
- we should think about how we could define main concepts from week 1 in 2-3 sentences
- other stuff:
- relational model comes in 2 flavours: writing queries and updates in relational calculus and SQL, and also regular queries and queries with aggregation
- can be simple questions about embedded sql (static embedded sql), how cursors work for example
- example: how cursors work, define cursor for a query
- how host variables work
- can be some question about how duplicates work in SQL
- duplicate semantics only in SQL, not Multi set syntax RC
- Slide 15/51 syntactically no, but semantics are obviously important
- Do these two SQL expressions say the same thing?
- duplicate semantics only in SQL, not Multi set syntax RC
- can have questions about how SQL deals with NULL values
- won’t ask about exact syntax: if ours is close enough we are fine, since there is a manual if you do it for real
- won’t be asked about advanced things like triggers
- will not be asked about dynamic SQL or OBDC (module6 stuff??): they are about memorizing things from manuals apparently
foreign keys?
no content from this week
- What is a host variable
- A variable that’s used in the embedded SQL