Databases and Database Management System. 2 Goals comprehensive introduction to –the design of databases –database transaction processing –the use of.

Slides:



Advertisements
Similar presentations
Chapter 1 Overview of Databases and Transaction Processing.
Advertisements

IiWAS2002, Bandung, Indonesia Teaching and Learning Databases Dr. Stéphane Bressan National University of Singapore.
Overview of Databases and Transaction Processing Chapter 1.
Chapter 3 Database Management
Transaction Processing IS698 Min Song. 2 What is a Transaction?  When an event in the real world changes the state of the enterprise, a transaction is.
1 ACID Properties of Transactions Chapter Transactions Many enterprises use databases to store information about their state –e.g., Balances of.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
1 ICS 223: Transaction Processing and Distributed Data Management Winter 2008 Professor Sharad Mehrotra Information and Computer Science University of.
Databases and Database Management System. 2 Goals comprehensive introduction to –the design of databases –database transaction processing –the use of.
1 Recap Database: –collection of data central to some enterprise that is managed by a Database Management System –reflection of the current state of the.
1 Introduction Introduction to database systems Database Management Systems (DBMS) Type of Databases Database Design Database Design Considerations.
Database Fundamentals Introduction
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1.
Dr. Kalpakis CMSC 461, Database Management Systems Introduction.
Introduction and Conceptual Modeling
Chapter 1 Database and Database Users Dr. Bernard Chen Ph.D. University of Central Arkansas.
Lecture1: Principles of Databases Prepared by L. Nouf Almujally 1 Ref. Chapter1.
Database Systems Chapter 1 The Worlds of Database Systems.
Chapter 1 Database and Database Users Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Chapter 1 Overview of Databases and Transaction Processing.
Introduction to DBMS Purpose of Database Systems View of Data
1 CS222: Principles of Database Management Fall 2010 Professor Chen Li Department of Computer Science University of California, Irvine Notes 01.
© D. Wong 2002 © D. Wong CS610 / CS710 Database Systems I Daisy Wong.
Introduction. 
The Worlds of Database Systems Chapter 1. Database Management Systems (DBMS) DBMS: Powerful tool for creating and managing large amounts of data efficiently.
Module Title? DBMS Introduction to Database Management System.
Objectives Overview Define the term, database, and explain how a database interacts with data and information Define the term, data integrity, and describe.
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.
 DATABASE DATABASE  DATABASE ENVIRONMENT DATABASE ENVIRONMENT  WHY STUDY DATABASE WHY STUDY DATABASE  DBMS & ITS FUNCTIONS DBMS & ITS FUNCTIONS 
Introduction: Databases and Database Users
1Mr.Mohammed Abu Roqyah. Introduction and Conceptual Modeling 2Mr.Mohammed Abu Roqyah.
1 Welcome: To the second learning sequence “ Data Base (DB) and Data Base Management System (DBMS) “ Recap : In the previous learning sequence, we discussed.
Chapter 1 Databases & Database Users. Slide 1-2 Acknowledge The main reference of this presentation is the textbook and PPT from : Elmasri & Navathe,
Introduction to Database Management Systems. Information Instructor: Csilla Farkas Office: Swearingen 3A43 Office Hours: Monday, Wednesday 4:15 pm – 5:30.
Chapter 1 : Introduction §Purpose of Database Systems §View of Data §Data Models §Data Definition Language §Data Manipulation Language §Transaction Management.
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
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Databases and Database Users.
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
1-1 Chapter 1 Databases and Database Users 1.1 Introduction 1.2 An Example 1.3 Characteristics of the Database Approach 1.4 Actors on the Scene 1.5 Workers.
CIS/SUSL1 Fundamentals of DBMS S.V. Priyan Head/Department of Computing & Information Systems.
DatabaseCSIE NUK1 Fundamentals of Database Systems Chapter 1 Database and Database Users.
Characteristics of the Database Approach (Difference between traditional file processing and database approach) Redundancy Self-Describing nature of a.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1 Databases and Database Users.
Computer Science and Engineering Computer System Security CSE 5339/7339 Session 21 November 2, 2004.
Chapter 1 Overview of Databases and Transactions.
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
CSC 370 – Database Systems Introduction Instructor: Alex Thomo.
ICS 321 Spring 2011 Introduction to Database Systems Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 1/12/20111Lipyeow.
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
IIS 645 Database Management Systems DDr. Khorsheed Today’s Topics 1. Course Overview 22. Introduction to Database management 33. Components of Database.
Chapter 1 Overview of Databases and Transaction Processing.
Chapter 1 Databases and Database Users. Overview Traditional database applications Store textual or numeric information Multimedia databases Store images,
Chapter 1 Database and Database Users
Databases and Database Users
On-Line Transaction Processing
Chapter 1: Introduction
Introduction to Database Systems
Overview of Databases and Transaction Processing
1.1 The Evolution of Database Systems
Introduction to Database Management Systems
Instructor 彭智勇 武汉大学软件工程国家重点实验室 电话:
Terms: Data: Database: Database Management System: INTRODUCTION
Presentation transcript:

Databases and Database Management System

2 Goals comprehensive introduction to –the design of databases –database transaction processing –the use of database management systems for applications

3 Topics the entity-relationship (E/R) and relational data models approaches to database design abstract query languages (relational algebra) SQL issues in database design and use (views, integrity constraints, triggers, transactions, and security) physical data organization query processing and optimization transaction processing advanced topics (data warehouses, data mining, temporal databases, and XML) [time permit]

4 Book 1.Textbook: Databases and Transaction Processing – An Application-Oriented Approach by Lewis, Bernstein, and Kifer (Addison Wesley) 2.Additional reading: 1.A first course in Database Systems by Ullman & Widom 2.Database systems the complete book by Garcia-Molina, Ullman, & Widom

5 Organizational issues Class web site: 5 weeks: First mid-term (September 18) 11 weeks: Second mid-term (October 28) December 8: Final Office hours: 4-5 pm Tues & Thus. I will need to go home right after the class on Tues, please do not try to ask questions after Tue’s class Use of s: questions, notifications Homework submission – web based

6 What is a Database? American Heritage Dictionary: a collection of data organized for easy and speed of search and retrieval

7 What is a Database? Related to data, perhaps lot of them –same characteristics –over long period of time (months, years, …) Pertinent to people who use the data Might or might not be of interest to other

8 Definition and Properties Definition: A database is a collection of data central to some enterprise that is managed by a Database Management System (DBMS) Properties: –Essential to operation of enterprise (contains the only record of enterprise activity) –Valuable to the enterprise (Historical data can guide enterprise strategy, might be of interest to other enterprises) –Reflection of the state of the enterprise (database is persistent)

9 DBMS Specialized software manages databases –create new databases –modify existing databases (update data, create reports for different purposes) Supports –high-level access language (e.g. SQL) –application describes database accesses using that language.

10 DBMS Provides users with –Persistent storage: like file system but much more flexible –Programming interface: accessing and modifying data through a query language –Transaction management: concurrent access to data

11 Overview of a DBMS DBMS (Oracle, DB2, MySQL, …) Data - base s Modify/ Retrieval (Command) Results Admin Users

12 Overview of a DBMS (Cont.) Data - base s Results Query Processor Transaction Manager Storage Manager Storage manager: uses OS techniques in memory management (buffer, page, read/write pages) Query processor: receive queries, create query plans, send to execution engine primitive commands (index, file, record requests), which will be satisfied by the corresponding manager Transaction manager: maintains the consistency of the database (control read from/write to a database, concurrency execution, recovery) commands E M E M Users

13 Overview of a DBMS (Cont.) Database administrator: –set-up databases creates new schema modifies existing schema manages users (authorization, permission, etc.) –uses Data Definition Language – a specialized language for creating and defining database schema

14 Query Processing Query Compiler queries/updates User/application Execution Engine query plan Index/File Record Manager index,file, record requests Buffer Manager page commands Storage Manager read/write pages Data - base s flow & data data Buffer

15 Transaction Manager Responsible for the consistency of database –changes in the real-world are reflected correctly in the database –every time a real-world event happens, a transaction occurs to cause the corresponding changes in the database Definition: A transaction is an application program with special properties – see next slides – to guarantee it maintains database correctness

16 Properties of Transactions (ACID) Atomicity: ALL-or-NOTHING execution (a sequence of primitive commands that needs to be executed ALL or NONE). Isolation: No two transactions should be executed at the same time. Durability: Effects of a transaction can never be lost Consistency: Constraints are satisfied all the time

17 Transaction Manager Log manager: every change in the database is logged separately on the disk (for recovery or durability) Concurrency-control manager: for isolation (uses lock, similar to lock in OS) Deadlock resolution: resources control

18 Today Examples of database systems (databases) Characteristics of current db vs. old one Requirements on db systems People involving in designing, implementing, and maintaining of db Study directions in db systems Two common applications of db

19 Examples of databases Airline reservation system Banking system Student registration system Supermarket Corporate record ….

20 Airline reservation system Data: Information about flights –Flight number, type of aircraft –Date, time, departure airport, arrival airport –Number of seats (1 st, 2 nd class if applicable) –Lists of travelers, their reservation –Ticket prices, number of available seats Operations (Queries/Transactions): –Customer inquires about the availability of a flight, ticket for a flight –Customer makes a reservation –Customer cancels a reservation Properties: –Large number of transactions (very frequently) –Cannot be processed in batch mode (on-line transaction processing) –Concurrency required

21 Banking system Data: Account information –Customer information (name, address, accounts, balances) –Relationship between customers and accounts Operations (Queries/Transactions): –Customer inquires about the balance of one of its accounts –Customer makes a deposit –Customer withdraws Properties: –Large number of transactions (very frequently) –Cannot be processed in batch mode (on-line transaction processing) –Concurrency required –Recovering from failures

22 Student Registration System Data: Information about students and courses –Student information (name, address, SSN, status, major, minor, courses taken and grade, courses enrolled, balance, picture) –Course information (name, call number, number, credit hours, department, instructor, date and time, location, number of students) Operations (Queries/Transactions): –Students ask for a transcript, list of enrolled classes –Adding/Dropping classes –Prerequisites enforcement Properties: –Large number of transactions at the beginning and end of semester –Batch mode processing possible (better with on-line transaction processing) –Concurrency required

23 Databases (Now vs. Then) Relational model using SQL - high-level view of data –Older systems presented low-level view Might contain multimedia data –Older systems restricted to alphanumeric data On-line: database accessed at time of event –Older systems were off-line, batch

24 Databases (Now vs. Then) Concurrent - multiple transactions execute simultaneously –Older systems processed transactions sequentially Distributed computation - different parts of the application execute on different computers –Older systems were centralized

25 Databases (Now vs. Then) Distributed data - different parts of the data are stored in different databases on different computers –Older systems were centralized Heterogeneous - involves HW and SW modules from different manufacturers –Older systems were homogeneous Accessed by everyone (e.g., e-commerce) –Older systems restricted to trained personnel

Database (System) Requirements

27 Database (System) Requirements High Availability: on-line => must be operational while enterprise is functioning High Reliability: correctly tracks state, does not lose data, controlled concurrency High Throughput: many users => many transactions/sec Low Response Time: on-line => users are waiting

28 Requirements (cont.) Long Lifetime: complex systems are not easily replaced –Must be designed so they can be easily extended as the needs of the enterprise change Security: sensitive information must be carefully protected since system is accessible to many users –Authentication, authorization, encryption

29 People in Design, Implementation, and Maintenance of a Database System Analyst - specifies system using input from customer; provides complete description of functionality from customer’s and user’s point of view Database Designer - specifies structure of data that will be stored in database Application Programmer - implements application programs (transactions) that access data and support enterprise rules

30 People (cont.) Database Administrator - maintains database once system is operational: space allocation, performance optimization, database security System Administrator - maintains transaction processing system: monitors interconnection of HW and SW modules, deals with failures and congestion

Database System Studies

32 Design of databases how to design a database what should be stored which structure for the data what assumptions should be made how is the connection between data

33 Database programming how to write queries on the database how to use other capabilities of a DBMS in an application how is database programming combined with conventional programming

34 Database System Implementation how to build a DBMS (query processing, transaction processing, storage manager etc.) This will not be discussed in this course.

Application of Database

36 Decision Support System (OLTP vs. OLAP) On-line Transaction Processing (OLTP) –Day-to-day handling of transactions that result from enterprise operation –Maintains correspondence between database state and enterprise state On-line Analytic Processing (OLAP) –Analysis of information in a database for the purpose of making management decisions

37 On-Line Analytical Processing Analyzes historical data (terabytes) using complex queries Due to volume of data and complexity of queries, OLAP often uses a data warehouse Data Warehouse - (offline) repository of historical data generated from OLTP or other sources Data Mining - use of warehouse data to discover relationships that might influence enterprise strategy

38 Exp – Airline reservation system OLTP –Event: customer A books tickets from ELP to NY; update database to reflect that event OLAP –During the last holiday season, how many customers fly from ELP to Dallas and NY? Data Mining –Are there any airports in which more than 50% of travelers from ELP need to change their flight?