Professional Documents
Culture Documents
Systems
Shivnath Babu
Fall 2007
Outline for Today
Data
High-level
Query Q Answer
Translates Q into
best execution plan
DBMS for current conditions,
runs plan
Data
Example: Store that Sells Cars
Owners of Make Model OwnerID ID Name Age
Honda Accords Honda Accord 12 12 Nemo 22
who are <= Honda Accord 156 156 Dory 21
23 years old
Join (Cars.OwnerID = Owners.ID)
High-level
Query Q Answer
Translates Q into
best execution plan
DBMS for current conditions,
runs plan
Keeps data safe
and correct
despite failures,
concurrent Data
updates, online
processing, etc.
DBMS is multi-user
• Example
Get account balance from database;
If balance > amount of withdrawal then
balance = balance - amount of withdrawal;
dispense cash;
store new balance into database;
• Homer at ATM1 withdraws $100
• Marge at ATM2 withdraws $50
• Initial balance = $400, final balance = ?
– Should be $250 no matter who goes first
Final balance = $250
High-level
Query Q Answer
Translates Q into
best execution plan
DBMS for current conditions,
runs plan
Keeps data safe
and correct
despite failures,
concurrent Data
updates, online
processing, etc.
Summary of modern DBMS features
• Persistent storage of data
• Logical data model; declarative queries and
updates ! physical data independence
• Multi-user concurrent access
• Safety from system failures
• Performance, performance, performance
– Massive amounts of data (terabytes ~
petabytes)
– High throughput (thousands ~ millions
transactions per minute)
– High availability (¸ 99.999% uptime)
Modern DBMS Architecture
Applications
SQL
DBMS
Parser
Logical query plan
Query Optimizer
Physical query plan
Query Executor
Access method API calls
Storage Manager
Storage system API calls File system API calls
OS
Disk(s)
Course Outline
• 40% of the class is about core DBMS concepts
– Query execution, query optimization, transactions,
recovery, etc.
– Textbook material
• 60% of the class is on “what is happening today
in data management”
– New developments on textbook material
– Data streams
– Web search – Google, Yahoo!
– Data integration (structured data + unstructured data)
– Data mining
– Unsolved challenges
Using a Traditional DBMS
User/Application
Query
Query Result
Result
… …
Loader Table R
Table S
New Approach for Data Streams
User/Application
Register
Continuous Query
Result
(Standing Query)
Stream Query
Input streams Processor
Example Continuous (Standing) Queries
• Web
– Amazon’s best sellers over last hour
• Network Intrusion Detection
– Track HTTP packets with destination address
matching a prefix in given table and content
matching “*\.ida”
• Finance
– Monitor NASDAQ stocks between $20 and
$200 that have moved down more than 2% in
the last 20 minutes
New Challenges in DBMSs
High-level
Query Q Answer
DBMS
TeraBytes PetaBytes
<CD>
<TITLE>Empire B.</TITLE>
Data <ARTIST>Bob Dylan</ARTIST>
<COUNTRY>USA</COUNTRY>
<COMPANY>Columbia
</COMPANY>
<PRICE>10.90</PRICE>
</CD>
Course Logistics