Monday, March 29, 2004
Monday, March 29, 2004
Introduction
• Final:
– 8:30-10:20 a.m. Thursday, Jun. 10,
2004
Goals of the Course
• Purpose:
– Using database systems
– Foundations of data management.
– Issues in building database systems.
– Introduction to current research in databases.
Grading
• Homeworks: 25%
– HW1: programming (SQL, Xquery, …)
– HW2: theory
• Project: 30%
– More later.
• Paper reviews: 20%
• Final: 25%
Textbook
• Database Management Systems,
Ramakrishnan and Gehrke.
Also:
• Foundations of Databases,
Abiteboul, Hull & Vianu
Also:
• Some papers to read (see website)
Other Useful Texts
• Database systems: the complete book (Ullman, Widom and
Garcia-Molina)
• Parallel and Distributed DBMS (Ozsu and Valduriez)
• Transaction Processing (Gray and Reuter)
• Data and Knowledge based Systems (volumes I, II)
(Ullman)
• Data on the Web (Abiteboul, Buneman, Suciu)
• Readings in Database Systems (Stonebraker and
Hellerstein)
• Proceedings of SIGMOD, VLDB, PODS conferences.
Prerequisites
• Officially: none
• Real prerequisites:
– Programming languages
– Logic
– Complexity theory
– Algorithms and data structures
What Is a Relational Database
Management System ?
Database Management System = DBMS
Relational DBMS = RDBMS
connection
(ODBC, JDBC)
Database server
(someone else’s
Data files C program) Applications
Functionality of a DBMS
The programmer sees SQL, which has two components:
• Data Definition Language - DDL
• Data Manipulation Language - DML
– query language
IF everything-went-OK
THEN COMMIT;
ELSE ROLLBACK
If system crashes, the transaction is still either committed or aborted
Transactions
• A transaction = sequence of statements that
either all succeed, or all fail
• Transactions have the ACID properties:
A = atomicity
C = consistency
I = isolation
D = durability
Queries
• Find all courses that “Mary” takes
SELECT C.name
FROM Students S, Takes T, Courses C
WHERE S.name=“Mary” and
S.ssn = T.ssn and T.cid = C.cid
• What happens behind the scene ?
– Query processor figures out how to answer the
query efficiently.
Queries, behind the scene
Declarative SQL query Imperative query execution plan:
sname
SELECT C.name
FROM Students S, Takes T, Courses C
WHERE S.name=“Mary” and cid=cid
name=“Mary”