Instructor 彭智勇 武汉大学计算机学院珞珈学者特聘教授 软件工程国家重点实验室 电话 :87653196

Slides:



Advertisements
Similar presentations
计算机学院 数据库系统原理 1 Introduction to Databases 杨宁 1/23.
Advertisements

CS4432Notes 11 CS 4432 Database Systems II Lecture 1: Introduction.
CMPT 454, Simon Fraser University, Fall 2009, Martin Ester 1 Database Systems II Introduction.
CSC 485E/CSC 571 Advanced Databases Introduction.
CPSC 310/6031 CPSC 310 Database Systems CPSC 603 Database Systems and Applications Prof. Jennifer Welch.
CPSC-608 Database Systems Fall 2009 Instructor: Jianer Chen Office: HRBB 309B Phone: Notes #2.
CSC 485D/586D/SEng 480D Introduction. In essence a database is nothing more than a collection of information that exists over a long period of time. Databases.
CSC 485E/SENG 480D/CSC 571 Advanced Databases Introduction.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
11 3 / 12 CHAPTER Databases MIS105 Lec14 Irfan Ahmed Ilyas.
CS Winter 2002Notes 11 CMPS 277: officially Relational Databases but this quarter Database Implementation Notes 01: Introduction Arthur Keller.
1 ICS 223: Transaction Processing and Distributed Data Management Winter 2008 Professor Sharad Mehrotra Information and Computer Science University of.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #13.
Databases and Database Management System. 2 Goals comprehensive introduction to –the design of databases –database transaction processing –the use of.
CS 245Notes 11 CS 245: Database System Principles Notes 01: Introduction Hector Garcia-Molina.
CPSC-608 Database Systems Fall 2010 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 1.
CPSC-608 Database Systems Fall 2010 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes #6.
CPSC-608 Database Systems Fall 2011 Instructor: Jianer Chen Office: HRBB 315C Phone: Notes 1.
1 Course: Database Management Systems Credits: 3 Prepared by: Assoc. Prof. Dr. Duong Tuan Anh Faculty of Computer Science & Engineering HoChiMinh City.
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
Database Management Systems (DBMS)
Database Systems Chapter 1 The Worlds of Database Systems.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
CS462: Introduction to Database Systems. ©Silberschatz, Korth and Sudarshan1.2Database System Concepts Course Information Instructor  Kyoung-Don (KD)
1 CS222: Principles of Database Management Fall 2010 Professor Chen Li Department of Computer Science University of California, Irvine Notes 01.
Overview of a Database Management System
Introduction. 
The Worlds of Database Systems Chapter 1. Database Management Systems (DBMS) DBMS: Powerful tool for creating and managing large amounts of data efficiently.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
Course Introduction Introduction to Databases Instructor: Joe Bockhorst University of Wisconsin - Milwaukee.
DBMS Transactions and Rollback Recovery Helia / Martti Laiho.
© Paradigm Publishing Inc. 9-1 Chapter 9 Database and Information Management.
CS4432Notes 11 CS 4432 Database Systems II Lecture 1: Introduction.
CS4432Notes 11 CS 4432 Database Systems II Lecture 1: Introduction Professor Elke A. Rundensteiner Today: Tim Sutherland.
DBMS 2001Notes 1: Introduction1 Principles of Database Management Systems (Tietokannanhallintajärjestelmät) Pekka Kilpeläinen Fall 2001.
Introduction: The Megatron-3000 Database-Management System (Slides by Hector Garcia-Molina,
Introduction to Database Management Systems. Information Instructor: Csilla Farkas Office: Swearingen 3A43 Office Hours: Monday, Wednesday 4:15 pm – 5:30.
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,
Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  
CHAPTER 3 DATABASES AND DATA WAREHOUSES. 2 OPENING CASE STUDY Chrysler Spins a Competitive Advantage with Supply Chain Management Software Chapter 2 –
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.
Introduction to Database Management Systems. Information Instructor: Csilla Farkas Office: Swearingen 3A43 Office Hours: Monday, Wednesday 2:30 pm – 3:30.
Chapter 3 Databases and Data Warehouses: Building Business Intelligence Copyright © 2010 by the McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin.
INTRODUCTION TO DBS Database: a collection of data describing the activities of one or more related organizations DBMS: software designed to assist in.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
COMP4100: Database System Principles 01: Introduction.
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
Chapter 3: Relational Databases
《数据库系统原理》 Principles of Database Systems. Textbook A First Course in Database Systems (Third Edition) J. D. Ullman, J. Widom 机械工业出版社, Lu Chaojun,
《数据库系统原理》 Principles of Database Systems. Textbook A First Course in Database Systems (Third Edition) J. D. Ullman, J. Widom 机械工业出版社, Lu Chaojun,
Database System Concepts Introduction Purpose of Database Systems View of Data Data Models Data Definition Language Data Manipulation Language Transaction.
Advanced Databases COMP3017 Dr Nicholas Gibbins
Chapter 11 Database System Implementation Spring 2001 Prof. Sang Ho Lee School of Computing, Soongsil Univ.
CPSC-310 Database Systems
Introduction to DBMS Purpose of Database Systems View of Data
Instructor 彭智勇 武汉大学软件工程国家重点实验室 电话:
Module 11: File Structure
CS 245: Database System Principles Notes 01: Introduction
CS 245: Database System Principles Notes 01: Introduction
CS422 Principles of Database Systems Course Overview
Introduction What is a Database?.
Introduction to Database Systems
Chapter 9 Database and Information Management.
Introduction to Database Management Systems
CS 4432 Database Systems II Lecture 1: Introduction
Instructor 彭智勇 武汉大学软件工程国家重点实验室 电话:
CPSC-608 Database Systems
Presentation transcript:

Instructor 彭智勇 武汉大学计算机学院珞珈学者特聘教授 软件工程国家重点实验室 电话 :

Book 经典原版书库 《 Database System Implementation 》 (美) Hator Garcia-Molina, Jeffrey.D.Ullman, Jennifer Widom 著 ( 斯坦福大学 ) 机械工业出版社

Marking Scheme Assignment (3) ( 练习,3 次 ): 15% Small Test (3) ( 小测验,3 次 ): 15% Final Examination ( 期末考试 ): 70% Total 100%

Practice 安装 PostgreSQL 系统 分析 PostgreSQL 源代码 改进 PostgreSQL 系统

Database System Implementation Hector Garcia-Molina Jeffrey D. Ullman Jennifer Widom

Chapter 1 Introduction to DBMS Implementation

Database Management System A database management system (DBMS) is a powerful tool for creating and managing large amounts of data efficiently and allowing it to persist over long periods of time, safely.

Capabilities of a DBMS Persistent Storage Programming interface allowing the user to access and modify data through a powerful query language. Transaction Management S upporting concurrent access to data and resiliency ( i.e. recovering from failures or errors)

Terminology Review Data Database A collection of data, well organized for access and modification, preserved over a long period. Query Relation An organization of data into a two-dimensional table. Schema (Metadata) A description of the structure of the data

A Simple DBMS: Megatron 2000 Megatron 2000 is a relational database management system which supports the SQL query language.

Megatron 2000 Implementation The Relation Students(name, id, dept) Data: /usr/db/students Smith#123#CS Johnson#522#EE …… Schema: /usr/db/schema Students#name#STR#id#INT#dept#STR Depts#name#STR#office#STR ……

Execution of Megatron 2000 DBMS dbhost> megatron2000 WELCOME TO MEGATRON 2000 ! & SELECT * FROM Students # name id dept Smith 123 CS Johnson 522 EE

& SELECT * FROM Students WHERE id>= 500 | HighID # /usr/db/HighID Johnson#522#EE

How Megatron 2000 Executes Queries SELECT * FROM R WHERE 1.Read the file schema to determine the attributes of relation R and their types. 2.Check that the is semantically valid for R. 3.Display each of the attribute names as the header of a column, and draw a line. 4.Read the file named R, and for each line: (a) Check the condition, and (b) Display the line as a tuple, if the condition is true.

SELECT * FROM R WHERE | T 1.Read the file schema to determine the attributes of relation R and their types. 2.Check that the is semantically valid for R. 3.Read the file named R, and for each line: (a) Check the condition, and (b) Write the result to a new file /usr/db/T, if the condition is true. 4. Add to the file /usr/db/schema an entry for T that looks just like the entry for R, except that relation name T replaces R. That is, the schema for T is the same as the schema for R.

SELECT office FROM Students, Depts WHERE Students.name = ‘Smith’ AND Students.dept = Depts.name # for (each tuple s in Students) for (each tuple d in Depts) if(s and d satisfy the WHERE-condition) display the office value from Depts; Example 1.2

Problem (1) of Megatron 2000 Tuple layout on disk The data layout on disk is not flexible. e.g.,- Change string from ‘ Cat ’ to ‘ Cats ’ and we have to rewrite file - ASCII storage is expensive - Deletions are expensive

Problem (2) of Megatron 2000 Search expensive; no indexes e.g.,- Cannot find tuple with given key quickly - Always have to read full relation

Problem (3) of Megatron 2000 Brute force query processing Query-processing is not clever. e.g., select * from R,S where R.A = S.A and S.B > Do select first? - More efficient join?

Problem (4) of Megatron 2000 No buffer manager There is no buffer in main memory. e.g.,Need caching

Problem (5) of Megatron 2000 There is no concurrency control.

Problem (6) of Megatron 2000 No reliability e.g.,- Can lose data - Can leave operations half done

Problem (7) of Megatron 2000 No security e.g.,- File system insecure - File system security is coarse

Problem (8) of Megatron 2000 No application program interface (API) e.g.,How can a payroll program get at the data?

Problem (9) of Megatron 2000 Cannot interact with other DBMSs.

Problem (10) of Megatron 2000 Poor dictionary facilities

Problem (11) of Megatron 2000 No GUI

Overview of a Database Management System Storage manager Buffer manager Index/file/rec- Ord manager Execution engine Query Compiler Transaction Manager Logging and Recovery Buffers DDL Compiler Concurrency Control Lock table User/application queries, updates transaction commands Database administrator query plan Index, file, and record requests page commands read/write pages log pages data, metadata, indexes metadata statistics metadata DDL Commands

It is responsible for storing data, metadata, indexes, and logs. An important storage management component is the buffer manager, which keeps portions of the data contents in main memory. Storage Management

A user or an application program initiates query to extract data from the database. The query is parsed and optimized by a query compiler. The resulting query plan is executed by the execution engine. Query Processing

Transaction Management Logging and Recovery Concurrency Control Deadlock Resolution

Course Overview Storage-Management Overview C2 Memory hierarchy C3 Storage of data elements C4 one-dimensional indexes C5 Multidimensional indexes Query Processing C6 Query Execution C7 Query compiler and optimizer Transaction-Processing C8 System failures C9 Concurrency control C10 More about transaction management Information integration

The course lets students know better ways of building a database management system.