DOC PREVIEW
UW CSE 444 - Lecture Notes

This preview shows page 1-2-16-17-18-34-35 out of 35 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 35 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Introduction to Database Systems CSE 444 Lecture 1 Introduction Magda Balazinska CSE 444 Fall 2010 1 About Me General Prof Magdalena Balazinska magda At UW since January 2006 PhD from MIT Born in Poland Grew up in Poland Algeria and Canada Magda Balazinska CSE 444 Fall 2010 2 About Me Research Past Stream Processing Distributed stream processing Borealis Load management and fault tolerance RFID data management RFID Ecosystem Probabilistic event processing Lahar Now Cloud computing and scientific data mgmt Collaboration with astronomers oceanographers etc Making large scale data analysis easier and interactive Helping scientists leverage cloud computing Magda Balazinska CSE 444 Fall 2010 3 Staff Instructor Magdalena Balazinska CSE 550 magda cs washington edu Office hours Wednesdays 10 30am 12 20pm Ugrad TA Michael Rathanapinta michaelr cs washington edu Office hours Thursdays 10 30am 12 00pm in CSE 006 Ugrad TA Liem Dinh liemdinh cs washington edu Magda Balazinska CSE 444 Fall 2010 4 Communications Web page http www cs washington edu 444 Lectures will be available there The mini projects description will be there Homeworks will be posted there Mailing list Announcements group discussions You are already subscribed Message board Great place to ask assignment related questions Magda Balazinska CSE 444 Fall 2010 5 Textbook Main textbook available at the bookstore Database Systems The Complete Book Hector Garcia Molina Jeffrey Ullman Jennifer Widom Most important COME TO CLASS ASK QUESTIONS Magda Balazinska CSE 444 Fall 2010 6 Other Texts Available at the Engineering Library not on reserve Database Management Systems Ramakrishnan XQuery from the Experts Katz Ed Fundamentals of Database Systems Elmasri Navathe Foundations of Databases Abiteboul Hull Vianu Data on the Web Abiteboul Buneman Suciu Magda Balazinska CSE 444 Fall 2010 7 Course Format Lectures MWF 9 30am 10 20am Quiz sections Th 8 30 9 20 9 30 10 20 Location EEB 025 4 Mini projects 3 homework assignments Midterm and final Magda Balazinska CSE 444 Fall 2010 8 Grading Homeworks Mini projects Midterm Final 30 30 15 25 Magda Balazinska CSE 444 Fall 2010 9 Four Mini Projects 1 2 3 4 SQL SQL in Java Database tuning Parallel processing MapReduce Check course website for due dates Magda Balazinska CSE 444 Fall 2010 10 Three Homework Assignments 1 Conceptual Design 2 Transactions 3 Query execution and optimization Check course website for due dates Magda Balazinska CSE 444 Fall 2010 11 Exams Midterm Monday November 8 in class Final Wednesday December 15 8 30 10 20am in class Magda Balazinska CSE 444 Fall 2010 12 Outline of Today s Lecture 1 Overview of a DBMS 2 A DBMS through an example 3 Course content Magda Balazinska CSE 444 Fall 2010 13 Database What is a database Give examples of databases Magda Balazinska CSE 444 Fall 2010 14 Database What is a database A collection of files storing related data Give examples of databases Accounts database payroll database UW s students database Amazon s products database airline reservation database Magda Balazinska CSE 444 Fall 2010 15 Database Management System What is a DBMS Give examples of DBMSs Magda Balazinska CSE 444 Fall 2010 16 Database Management System What is a DBMS A big C program written by someone else that allows us to manage efficiently a large database and allows it to persist over long periods of time Give examples of DBMSs DB2 IBM SQL Server MS Oracle Sybase MySQL PostgreSQL We will focus on relational DBMSs most quarter Magda Balazinska CSE 444 Fall 2010 17 Market Shares From 2006 Gartner report IBM 21 market with 3 2BN in sales Oracle 47 market with 7 1BN in sales Microsoft 17 market with 2 6BN in sales Magda Balazinska CSE 444 Fall 2010 18 An Example The Internet Movie Database http www imdb com Entities Actors 800k Movies 400k Directors Relationships who played where who directed what Magda Balazinska CSE 444 Fall 2010 19 Required Data Management Functionality 1 2 3 Describe real world entities in terms of stored data Create persistently store large datasets Efficiently query update 1 2 3 4 5 6 7 Must handle complex questions about data Must handle sophisticated updates Performance matters Change structure e g add attributes Concurrency control enable simultaneous updates Crash recovery Security and integrity Magda Balazinska CSE 444 Fall 2010 20 DBMS Benefits Expensive to implement all these features inside the application DBMS provides these features and more DBMS simplifies application development How to decide what features should go into the DBMS Magda Balazinska CSE 444 Fall 2010 21 Back to Example Tables Actor Cast id fName lName gender pid mid 195428 645947 Tom Amy Hanks Hanks M F 195428 337166 Movie id Name year 337166 Toy Story 1995 Magda Balazinska CSE 444 Fall 2010 22 SQL SELECT FROM Actor Magda Balazinska CSE 444 Fall 2010 23 SQL SELECT count FROM Actor This is an aggregate query Magda Balazinska CSE 444 Fall 2010 24 SQL SELECT FROM Actor WHERE lName Hanks This is a selection query Magda Balazinska CSE 444 Fall 2010 25 SQL SELECT FROM Actor Casts Movie WHERE lname Hanks and Actor id Casts pid and Casts mid Movie id and Movie year 1995 This query has selections and joins 817K actors 3 5M casts 380K movies How long do we expect it to take Magda Balazinska CSE 444 Fall 2010 26 How Can We Evaluate the Query Actor id Movie Cast fName lName Hanks gender pid mid id Name year 1995 Plan 1 in class Plan 2 in class Magda Balazinska CSE 444 Fall 2010 27 Evaluating Tom Hanks lName Hanks Actor year 1995 Cast Movie lName Hanks Actor Magda Balazinska CSE 444 Fall 2010 year 1995 Cast Movie 28 What an RDBMS Does Well 1 2 Indexes on Actor lName on Movie year Multiple implementations of joins Query optimization Access path selection Join order Join implementation Statistics Magda Balazinska CSE 444 Fall 2010 29 Now Let s See Database Updates Transfer 100 from account 4662 to 7199 X Read Account 4662 X amount X amount 100 Write Account 4662 X Y Read Account 7199 Y amount Y amount 100 Write Account 7199 Y Magda Balazinska CSE 444 Fall 2010 30 Now Let s See Database Updates Transfer 100 from account 4662 to 7199 X Read Account 4662 X amount X amount 100 Write Account 4662 X Y Read Account 7199 Y amount Y amount 100 Write Account 7199 Y CRASH What is the problem Magda Balazinska CSE 444 Fall 2010 31 What a RDBMS Does Well 2 2 Transactions Recovery Concurrency control Magda Balazinska CSE 444 Fall 2010 32 Client Server Architecture There is a single server that stores the


View Full Document

UW CSE 444 - Lecture Notes

Documents in this Course
XML

XML

48 pages

SQL

SQL

25 pages

SQL

SQL

42 pages

Recovery

Recovery

30 pages

SQL

SQL

36 pages

Indexes

Indexes

35 pages

Security

Security

36 pages

Wrap-up

Wrap-up

6 pages

SQL

SQL

37 pages

More SQL

More SQL

48 pages

SQL

SQL

35 pages

XML

XML

46 pages

Triggers

Triggers

26 pages

Load more
Download Lecture Notes
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Notes and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Notes 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?