Docsity

Understanding Database Systems: DBMS, Relational Model, SQL, and Transactions, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Understanding Database Systems: DBMS, Relational Model, SQL, and Transactions and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Database Systems

and Applications

Database Management System

(DBMS)

  • Specialized software that manages access to very large amounts of data: - data persists over a long time - efficient access - concurrent access - reliable and predictable access - convenient interface language
  • Examples: airline reservation systems, banking, corporate records

Structured Query Language (SQL)

Preview

accountNo balance type 12345 1000.00 savings 67890 2846.92 checking

Accounts

SELECT balance FROM Accounts WHERE accountNo = 67890;

SELECT accountNo FROM Accounts WHERE type = 'savings' AND balance < 0;

Setting up a Database

  • Database schema specifies what relations are

in the database

  • Schema is altered using DDL (data definition

language) commands

  • Only database administrator should be able to

do this

  • Schema affects how the data is stored

Storage and Buffer Management

  • Data usually is stored on disk, in units called blocks
  • Storage manager controls movement of data between disk and main memory
  • Buffer manager controls partitioning of main memory into block-sized regions
  • Relies on info about data, schema, statistics, and indexes (special data structures for efficient access)

Transactions

  • Usually database queries are grouped into transactions
  • A transaction must satisfy ACID properties:
    • Atomicity: either all the changes or none of them are made to the database
    • Consistency: transaction must preserve consistency constraints of the database
    • Isolation: the result must be "as if" the transaction ran alone
    • Durability: once transaction has completed, changes must not be lost