CSE544 Introduction Monday, March 27, 2006. Staff Instructor: Dan Suciu –CSE 662, –Office hours: Wednesdays, 12pm-1pm TA: Bhushan.

Slides:



Advertisements
Similar presentations
1 Introduction to Database Systems CSE 444 Lecture #1 January 6, 2003 Guest Lecturer: Prof. Dan Suciu (Alon will explain when he returns)
Advertisements

IiWAS2002, Bandung, Indonesia Teaching and Learning Databases Dr. Stéphane Bressan National University of Singapore.
Introduction Susan B. Davidson University of Pennsylvania CIS330 – Database & Information Systems Some slide content courtesy of Tova Milo.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 16 – Intro. to Transactions.
Lecture 1 Intro Databases and Information Systems DT210 S McKeever 1.
1 Introduction to Information Systems SSC, Semester 6 Lecture 01.
1 Introduction to Information Systems SSC, Semester 6 Lecture 01.
Murali Mani CS3431 – Database Systems I Introduction.
Chapter 8 : Transaction Management. u Function and importance of transactions. u Properties of transactions. u Concurrency Control – Meaning of serializability.
1 ICS 223: Transaction Processing and Distributed Data Management Winter 2008 Professor Sharad Mehrotra Information and Computer Science University of.
CSE 636 Data Integration Introduction. 2 Staff Instructor: Dr. Michalis Petropoulos Location: 210 Bell Hall Office Hours:
Databases and Database Management System. 2 Goals comprehensive introduction to –the design of databases –database transaction processing –the use of.
Transaction Management WXES 2103 Database. Content What is transaction Transaction properties Transaction management with SQL Transaction log DBMS Transaction.
1 Introduction to Database Systems CSE 444 Lecture #1 January 5, 2004 Alon Halevy.
1 Database Systems Lecture #1. 2 Staff Lecturer: Yael Amsterdamer – –Schreiber, Databases lab, M-20, –Office.
1 Introduction to Database Systems CSE 444 Lecture #1 March 31, 2008.
1 Introduction to Database Systems CSE 444 Lecture #1 January 3, 2005.
1 Introduction to Database Systems CSE 444 Lecture #1 January 4, 2006.
Transactions and Recovery
1 Introduction to Database Systems CSE 444 Lecture #1 September 27, 2006.
1 Database Systems Lecture #1. 2 Staff Instructor: Tova Milo – –Schreiber, Room 314, –Office hours: See.
1 Introduction to Database Systems CSE 444 Lecture #1 September 28, 2005.
CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)
Introduction. 
Database Management Systems 1 Introduction to Database Systems Instructor: Xintao Wu Ramakrishnan & Gehrke.
Course Introduction Introduction to Databases Instructor: Joe Bockhorst University of Wisconsin - Milwaukee.
Database and Database Users. Outline Database Introduction An Example Characteristics of the Database Actors on the Scene Advantages of using the DBMS.
1 CS 430 Database Theory Winter 2005 Lecture 1: Introduction.
Transaction Management: Concurrency Control CS634 Class 16, Apr 2, 2014 Slides based on “Database Management Systems” 3 rd ed, Ramakrishnan and Gehrke.
Database Management Systems 1 Ramakrishnan & Gehrke Introduction to Database Systems Chpt 1 Instructor: Xintao Wu.
CS461: Principles and Internals of Database Systems Instructor: Ying Cai Department of Computer Science Iowa State University Office:
CS505: Final Exam Review Jinze Liu. Major Topics Before Mid-Term – Security and Access Control – Indexing After Mid-Term – Transaction Management Locking,
Introduction to Database Management Systems. Information Instructor: Csilla Farkas Office: Swearingen 3A43 Office Hours: Monday, Wednesday 4:15 pm – 5:30.
CSE544 Introduction Monday, March 29, Staff Instructor: Dan Suciu –CSE 662, –Office hours: Tuesday, 1-2pm. TA: Nilesh Dalvi.
Transactions1 Unit of work on a database. Transactions2 Transactions, concept Logical unit of work on the database –Examples Transfer money from bank.
Introduction to Database Management Systems. Information Instructor: Csilla Farkas Office: Swearingen 3A43 Office Hours: M,T,W,Th,F 2:30 pm – 3:30 pm,
INFS614, Dr. Brodsky, GMU1 Database Management Systems INFS 614 Instructor: Professor Alex Brodsky
Transaction processing Book, chapter 6.6. Problem: With a single user…. you run a query, you get the results, you run the next, etc. But database life.
Introduction to Database Systems1. 2 Basic Definitions Mini-world Some part of the real world about which data is stored in a database. Data Known facts.
Concurrency Control. Objectives Management of Databases Concurrency Control Database Recovery Database Security Database Administration.
Introduction to Database Management Systems. Information Instructor: Csilla Farkas Office: Swearingen 3A43 Office Hours: Monday, Wednesday 2:30 pm – 3:30.
1 CS3431 – Database Systems I Introduction Instructor: Mohamed Eltabakh
1 Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 15: Reliability and Security in Database Servers Instructor’s.
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 21 November 2, 2004.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
Fall CSE330/CIS550: Introduction to Database Management Systems Prof. Susan Davidson Office: 278 Moore Office hours: TTh
10 1 Chapter 10 - A Transaction Management Database Systems: Design, Implementation, and Management, Rob and Coronel.
ICOM 6005 – Database Management Systems Design Dr. Manuel Rodríguez-Martínez Electrical and Computer Engineering Department Lecture 16 – Intro. to Transactions.
CS3431: C-Term CS3431 – Database Systems I Introduction Instructor: Mohamed Eltabakh
1 Introduction to Database Systems CSE 444 Lecture #1 September 26, 2007.
Introduction to Database Systems 1. Pop Quiz Question 1: How often do you use a database system or database system application? a)At least once a day.
MULTIUSER DATABASES : Concurrency and Transaction Management.
Introduction to Information Systems
Database Systems Lecture #1.
Database Systems Lecture #1.
Introduction to Database Systems CSE 444
Database Management Systems
Database What is a database ? Give examples of databases.
Database Systems Lecture #1.
Introduction to Database Systems
Introduction to Database Systems CSE 444
Introduction to Database Management Systems
Introduction to Database Systems CSE 444
Introduction to Database Systems CSE 444
Lecture 13: Transactions in SQL
Introduction to Database Systems CSE 444
Introduction to Database Systems CSE 444
Introduction to Database Systems CSE 444
Presentation transcript:

CSE544 Introduction Monday, March 27, 2006

Staff Instructor: Dan Suciu –CSE 662, –Office hours: Wednesdays, 12pm-1pm TA: Bhushan Mandhani –Office hours: TBA Mailing list: – Web page: (a lot of stuff already there)

Course Times Mon, Wed, 10:30-12 Final: –8:30-10:20 a.m. Monday, Jun. 5, 2006 –In this room

Goals of the Course Using database systems Foundations of data management. Issues in building database systems. Current research topics in databases.

Format Basic structure: Lectures on Wednesdays Paper discussions on Mondays (reviews !)

Content Data modeling basics (3weeks): –SQL/XQuery with homeworks on Postgres/Galax –Logical foundations of databases Transactions (2weeks): –concurrency control (locks, timestamps) –recovery (undo, redo, undo/redo) Topics in query execution/optimization (3weeks) Database security (1 week) Databases + IR, Probabilistic databases (1 week)

Textbooks Won’t follow any book, but you may want to consult them if you need more details to understand a topic Database Management Systems, Ramakrishnan The Complete Book, GarciaMolina, Ullman, Widom Xquery from the Experts, Howard Katz, Ed. Data on the Web, Abiteboul, Buneman, Suciu Theory of database systems, Abiteboul, Hull, Vianu

Grading Homework: 20% Paper reviews: 20% Participation in the discussions: 10% Project: 30% Final: 20%

Homework: 20% HW1: minor programming in SQL and Xquery HW2: problem sets, no programming theory, optimizations, query execution, transactions

Project: 30% Choose from a list of mini-research topics, or come up with your own Open ended Write short research paper (2-3 pages) Conference-style presentation

Project: 30% Goals: apply database principles to a new problem –Understand and model the problem –Research and understand related work (1-2 papers) –Propose some new approach (creativity will be evaluated) –Implement some part NOT intended to be a major software development Amount of work may vary widely between groups

Project: 30% Milestones: Groups of 1-3 assembled by 4/5 Proposals due by 4/10 Short research papers (2-3pages) due by 5/30 Presentations on 5/31 in class (MAY TAKE LONGER THAN 12pm)

Paper Reviews: 20% There will be reading assignments Papers are discussed Mondays You have to write the reviews by Sunday night

Final: 20% June 5, 8:30-10:30, same room Challenging and fun

Database What is a database ? Give examples of databases

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

Database Management System What is a DBMS ? Give examples of DBMS

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 DBMS DB2 (IBM), SQL Server (MS), Oracle, Sybase MySQL, Postgres, …

Market Shares From IMB: 35% market with $2.5BN in sales Oracle: 33% market with $2.3BN in sales Microsoft: 19% market with $1.3BN in sales

An Example The Internet Movie Database Entities: Actors (800k), Movies (400k), Directors, … Relationships: who played where, who directed what, … Want to store and process locally; what functions do we need ?

Functionality 1.Create/store large datasets 2.Search/query/update 3.Change the structure 4.Concurrent access to many user 5.Recover from crashes 6.Security (not here, but in other apps)

Possible Organizations Files Spreadsheets DBMS

1. Create/store Large Datasets Files Spreadsheets DBMS Yes, but… Not really… Yes

2. Search/Query/Update Simple query: –In what year was ‘Rain man’ produced ? Multi-table query: –Find all movies by ‘Coppola’ Complex query: –For each actor, count her/his movies Updating –Insert a new movie; add an actor to a movie; etc

2. Search/Query/Update Files Spreadsheets DBMS Simple queries Multi-table queries (maybe) All Updates: generally OK

3. Change the Structure Add Address to each Actor Files Spreadsheets DBMS Very hard Yes

4. Concurrent Access Multiple users access/update the data concurrently What can go wrong ? How do we protect against that in OS ? This is insufficient in databases; why ?

4. Concurrent Access Multiple users access/update the data concurrently What can go wrong ? –Lost update; resulting in inconsistent data How do we protect against that in OS ? –Locks

4. Concurrent Access X = Read(Accounts, A); X.amount = X.amount - 100; Write(Accounts, A, X); Y = Read(Accounts, B); Y.amount = Y.amount + 100; Write(Accounts, B, Y); X = Read(Accounts, A); X.amount = X.amount - 100; Write(Accounts, A, X); Y = Read(Accounts, B); Y.amount = Y.amount + 100; Write(Accounts, B, Y); Transfer $100 from account A to B: Find total amount in A and B: X = Read(Accounts, A); Y = Read(Accounts, B); S = X.amount + Y.amount return S X = Read(Accounts, A); Y = Read(Accounts, B); S = X.amount + Y.amount return S What can go wrong ? Do locks help ?

5. Recover from crashes X = Read(Accounts, A); X.amount = X.amount - 100; Write(Accounts, A, X); Y = Read(Accounts, B); Y.amount = Y.amount + 100; Write(Accounts, B, Y); X = Read(Accounts, A); X.amount = X.amount - 100; Write(Accounts, A, X); Y = Read(Accounts, B); Y.amount = Y.amount + 100; Write(Accounts, B, Y); CRASH ! What is the problem ?

Enters a DMBS Data files Database server (someone else’s C program) Applications connection (ODBC, JDBC) “Two tier system” or “client-server”

DBMS = Collection of Tables Still implemented as files, but behind the scenes can be quite complex Directors:Movie_Directors: Movies: “data independence” idfNamelName 15901Francis FordCoppola... midTitleYear The Godfather idmid

1. Create/store Large Datasets Use SQL to create and populate tables: CREATE TABLE Actors ( Name CHAR(30) DateOfBirth CHAR(20) )... CREATE TABLE Actors ( Name CHAR(30) DateOfBirth CHAR(20) )... INSERT INTO Actors VALUES(‘Tom Hanks’,...) INSERT INTO Actors VALUES(‘Tom Hanks’,...) Size and physical organization is handled by DBMS We focus on modeling the database Will study data modeling in this course

2. Searching/Querying/Updating Find all movies by ‘Coppola’ What happens behind the scene ? SELECT title FROM Movies, Directors, Movie_Directors WHERE Directors.lname = ‘Coppola’ and Movies.mid = Movie_Directors.mid and Movie_Directors.id = Directors.id We will study SQL in gory details in this course We will discuss the query optimizer in class.

3. Changing the Structure Add Address to each Actor ALTER TABLE Actor ADD address CHAR(50) DEFAULT ‘unknown’ Lots of cleverness goes on behind the scenes

3&4 Concurrency&Recovery: Transactions A transaction = sequence of statements that either all succeed, or all fail E.g. Transfer $100 BEGIN TRANSACTION; UPDATE Accounts SET amount = amount WHERE number = 4662 UPDATE Accounts SET amount = amount WHERE number = 7199 COMMIT BEGIN TRANSACTION; UPDATE Accounts SET amount = amount WHERE number = 4662 UPDATE Accounts SET amount = amount WHERE number = 7199 COMMIT

Transactions Transactions have the ACID properties: A = atomicity C = consistency I = isolation D = durability

4. Concurrent Access Serializable execution of transactions –The I (=isolation) in ACID We study three techniques in this course Locks Timestamps Validation

5. Recovery from crashes Every transaction either executes completely, or doesn’t execute at all –The A (=atomicity) in ACID We study three types of log files in this course Undo log file Redo log file Undo/Redo log file