Presentation is loading. Please wait.

Presentation is loading. Please wait.

CPSC 310/6031 CPSC 310 Database Systems CPSC 603 Database Systems and Applications Prof. Jennifer Welch.

Similar presentations


Presentation on theme: "CPSC 310/6031 CPSC 310 Database Systems CPSC 603 Database Systems and Applications Prof. Jennifer Welch."— Presentation transcript:

1 CPSC 310/6031 CPSC 310 Database Systems CPSC 603 Database Systems and Applications Prof. Jennifer Welch

2 CPSC 310/6032 References uDatabase Systems, The Complete Book, Hector Garcia-Molina, Jeffrey D. Ullman, and Jennifer Widom, Prentice Hall 2002. uSlides by Jeffrey Ullman: http://www-db.stanford.edu/~ullman/dscb/pslides/pslides.html uSlides by Hector Garcia-Molina: http://www-db.stanford.edu/~hector/cs245/notes.htm uSlides by Arthur Keller: http://www.soe.ucsc.edu/classes/cmps180/Winter02 uSlides by Rada Chirkova: http://courses.ncsu.edu/csc540/lec/001/

3 CPSC 310/6033 Database Management System (DBMS) u Specialized software that manages access to very large amounts of data: wdata persists over a long time wefficient access wconcurrent access wreliable and predictable access wconvenient interface language u Examples: airline reservation systems, banking, corporate records

4 CPSC 310/6034 Relational Model u Store information in tables u Each table is a relation u Each column is named with an attribute u Each row is a tuple u Example relation named Accounts: accountNobalancetype 123451000.0savings 678902846.92checking

5 CPSC 310/6035 Structured Query Language (SQL) Preview accountNobalancetype 123451000.00savings 678902846.92checking Accounts SELECT balance FROM Accounts WHERE accountNo = 67890; SELECT accountNo FROM Accounts WHERE type = 'savings' AND balance < 0;

6 CPSC 310/6036 Setting up a Database uDatabase schema specifies what relations are in the database uSchema is altered using DDL (data definition language) commands uOnly database administrator should be able to do this uSchema affects how the data is stored

7 CPSC 310/6037 Querying the Database uA query is expressed in a DML (data manipulation language), e.g. SQL uThe query compiler translates query into a query plan (sequence of operations to be performed). uQuery compilation includes query optimization, to choose best sequence of operations uExecution engine performs the operations, interacting with…

8 CPSC 310/6038 Storage and Buffer Management uData usually is stored on disk, in units called blocks uStorage manager controls movement of data between disk and main memory uBuffer manager controls partitioning of main memory into block-sized regions uRelies on info about data, schema, statistics, and indexes (special data structures for efficient access)

9 CPSC 310/6039 Transactions uUsually database queries are grouped into transactions uA transaction must satisfy ACID properties: wAtomicity: either all the changes or none of them are made to the database wConsistency: transaction must preserve consistency constraints of the database wIsolation: the result must be "as if" the transaction ran alone wDurability: once transaction has completed, changes must not be lost

10 CPSC 310/60310 Transaction Processing uEvery change is logged separately on disk by log manager uAfter a system failure, recovery manager uses log on disk to reconstruct a consistent state uScheduler ensures that concurrently executing transactions do not interfere with each other

11 CPSC 310/60311 Outline of Course uDatabase Design: wentity-relationship model: notation to express relationships among the data (Ch 2) wrelational model: easier to implement than E-R (Ch 3) uDatabase Programming: wrelational algebra: how to operate on relations (Ch 5) wprogramming with SQL (Chs 6-8) uDatabase Implementation: wstorage management (Chs 11-13) wquery processing (Chs 15-16) wtransaction processing (Chs 17-19)


Download ppt "CPSC 310/6031 CPSC 310 Database Systems CPSC 603 Database Systems and Applications Prof. Jennifer Welch."

Similar presentations


Ads by Google