1-1 Unit 1 Introduction to DBMS (Database Management Systems) Application program End-user DBMS.

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

Database Management Systems (ECS-402)
Introduction to Database Management  Department of Computer Science Northern Illinois University January 2001.
--What is a Database--1 What is a database What is a Database.
1 Chapter 2 Database Environment Transparencies © Pearson Education Limited 1995, 2005.
1 Pertemuan 02 Database environment Matakuliah: >/ > Tahun: > Versi: >
Chapter 2 Database Environment.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Teleprocessing.
Data Management I DBMS Relational Systems. Overview u Introduction u DBMS –components –types u Relational Model –characteristics –implementation u Physical.
Introduction to Databases Transparencies
Database Management Systems ISYS 464 David Chao. Introduction to Databases The most important component in an information system Created to support all.
Chapter 2 Database Environment Pearson Education © 2014.
Lecture Two Database Environment Based on Chapter Two of this book:
Introduction to Database Systems
Chapter 1 Introduction to Databases
DBMS1 Database Management System (DBMS) Introductory Concepts Week-1.
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
Chapter One Overview of Database Objectives: -Introduction -DBMS architecture -Definitions -Data models -DB lifecycle.
Introduction to Database
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Module Title? DBMS Introduction to Database Management System.
Chapter 2 CIS Sungchul Hong
Chapter 2 Database System Architecture. An “architecture” for a database system. A specification of how it will work, what it will “look like.” The “ANSI/SPARC”
Database Architecture Introduction to Databases. The Nature of Data Un-structured Semi-structured Structured.
CSC271 Database Systems Lecture # 4.
Database Environment Chapter 2 AIT632 Sungchul Hong.
Database System Concepts and Architecture
1 Introduction to Database Systems. 2 Database and Database System / A database is a shared collection of logically related data designed to meet the.
Chapter 7: Database Systems Succeeding with Technology: Second Edition.
1-1 Unit 1 Introduction to DBMS (Database Management Systems) Application program End-user DBMS
4B-1 Wei-Pang Yang, Information Management, NDHU Introduction to Database CHAPTER 4B ( 補 ) DB2 and SQL  Overview  Data Definition  Data Manipulation.
Ch. 1 데이터베이스시스템 (2). Ch.1 Database System 데이터베이스시스템 2 What to Learn Database System Overview Entity-Relationship diagram Relational Data Model  Structure.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Data Dictionary.
1-1 Homework 3 Practical Implementation of A Simple Rational Database Management System.
Lecture # 3 & 4 Chapter # 2 Database System Concepts and Architecture Muhammad Emran Database Systems 1.
INFORMATION MANAGEMENT Unit 2 SO 4 Explain the advantages of using a database approach compared to using traditional file processing; Advantages including.
Lesson Overview 3.1 Components of the DBMS 3.1 Components of the DBMS 3.2 Components of The Database Application 3.2 Components of The Database Application.
8/31/2012ISC329 Isabelle Bichindaritz1 Database Environment.
Introduction to Database AIT632 Chapter 1 Sungchul Hong.
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
1 Database Management Systems (DBMS). 2 Database Management Systems (DBMS) n Overview of: ä Database Management Components ä Database Systems Architecture.
Database Environment Session 2 Course Name: Database System Year : 2013.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
1 Chapter 1 Introduction to Databases Transparencies.
Database Systems Lecture 1. In this Lecture Course Information Databases and Database Systems Some History The Relational Model.
Index in Database Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Copyright (c) 2014 Pearson Education, Inc. Introduction to DBMS.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
Chapter 2 Database Environment.
1 Chapter 2 Database Environment Pearson Education © 2009.
Databases and DBMSs Todd S. Bacastow January 2005.
Introduction To DBMS.
Chapter 2 Database Environment.
Chapter 1 Introduction to DBMS Concepts
Database Management System
Lecture 1 Introduction to Database
Introduction to Database Systems
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Introduction to DBMS (Database Management Systems)
Introduction to Database Management System
Chapter 2 Database Environment Pearson Education © 2009.
Data, Databases, and DBMSs
Introduction to Database
Chapter 2 Database Environment Pearson Education © 2014.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

1-1 Unit 1 Introduction to DBMS (Database Management Systems) Application program End-user DBMS

Wei-Pang Yang, Information Management, NDHU 1-2 Outline of Unit Information Systems 1.2 An Overview of a Database System 1.3 An Architecture for a Database System 1.4 Database Technology Trends

Information Systems

Wei-Pang Yang, Information Management, NDHU 1-4 Stages of Information System  Stage 0: Manual Information System Records Files Index Cards  Stage 1: Sequential Information Systems Tapes Files slow, non-interactive, redundancy,....  Stage 2: File Based Information Systems Disk (direct access) application program has its own file data dependence data redundancy  Stage 3: DBMS based Information Systems Generalized data management software Transaction processing

Wei-Pang Yang, Information Management, NDHU 1-5  Conventional Data Processing techniques: Enterprise: Application System A Application Program A File System A Customer Application System B Application Program B File System B Invoice Application System N Application Program N File System N Inventory … File Based Information Systems

Wei-Pang Yang, Information Management, NDHU 1-6 CustomerInvoice Inventory Parts Customer No. Customer Name Customer Addr. Social Security ID Customer No. Customer Name Part No. Quantities Unit Price Part No. Part Description Unit Price Supplier Quantities Remain Quantities Ordered Part No. Part Description Supplier Quantities Ordered Customer Name Unit Price File Based Information Systems (cont.)

Wei-Pang Yang, Information Management, NDHU 1-7 Host Language + DSL Host Language + DSL Host Language + DSL Host Language + DSL Host Language + DSL User A1User A2User B1User B2User B3 External # & External View B External/conceptual mapping A Conceptual View External/conceptual mapping B Conceptual/internal mapping Stored database (Internal View) Database management system dictionary (DBMS) e.g. system catalog < DBA Storage structure definition (Internal schema ) Conceptual schema External schema A External schema B (Build and maintain schemas and mappings) & DSL (Data Sub Language) C, Pascal e.g. SQL

Wei-Pang Yang, Information Management, NDHU 1-8 DBMS based Information Systems: Basic Approach - Integration  (1) Integration of Information Description of the integrated view of data is the "Conceptual Schema" of the database Application program End-user DBMS

Wei-Pang Yang, Information Management, NDHU 1-9 DBMS based Information Systems: Basic Approach – Simple views and High level language  (2) Provide simple views (External Schema) and high level language ( e.g. SQL) for users to manipulate (handle) data High level language: e.g. SQL (Structured Query Language) : SELECT SNAME FROM S WHERE S#= 'S4'; Description of user's view of data is the "external schema" or "subschema" or "view". High-level languages (Query Language): SQL (1) Data Definition Language: define format (2) Data Manipulation Language: retrieve, insert, delete, update Emphasize: EASE OF USE !! S S# name

Wei-Pang Yang, Information Management, NDHU 1-10 DBMS based Information Systems: Basic Approach - Storage/Access Method  (3) Efficient Storage/Access Techniques: implemented once rather than duplicated in all application programs. Language Processor Access Method (B+ tree, Dynamic Hashing) DBMS User: query in SQL Access Methods Calls I/O calls

Wei-Pang Yang, Information Management, NDHU 1-11 DBMS based Information Systems: Basic Approach - Transaction Management  (4) Provide Transaction Management: Concurrency Control Recovery Security. :

Wei-Pang Yang, Information Management, NDHU 1-12 Example: A Simple Query Processing Query in SQL : SELECT CUSTOMER. NAME FROM CUSTOMER, INVOICE WHERE REGION = 'N.Y.' AND AMOUNT > AND CUTOMER.C#=INVOICE.C I nternal Form :  (  (S SP) Operator : SCAN C using region index, create C SCAN I using amount index, create I SORT C?and I?on C# JOIN C?and I?on C# EXTRACT name field Calls to Access Method : OPEN SCAN on C with region index GET next tuple. Calls to file system : GET10th to 25th bytes from block #6 of file #5 Language Processor Optimizer Operator Processor Access Method File System database Language Processor Access Method e.g.B-tree; Index; Hashing DBMS

An Overview of a Database System

Wei-Pang Yang, Information Management, NDHU 1-14 An Example  The Wine Cellar Database: Cellar:  Retrieval: DML (Data Manipulation Language) : SELECT Wine, Bin, Producer FROM Cellar WHERE Ready = 85; Result: 2 Chardonnay Buena Vista Chardonnay Louis Martini Chardonnay Chappellet Thanksgiving 12 Jo. Riesling Buena Vista Late Harvest 16 Jo. Riesling Sattui Very dry 43 Cab. Sauvignon Robt. Mondavi Pinot Noir Mirassou Harvest 51 Pinot Noir Ch. St. Jean Bin Wine Producer Year Bottle Ready Comments Wine Bin Producer Chardonnay 2 Buena Vista Chardonnay 6 Chappellet Pinot Noir 50 Mirassou

Wei-Pang Yang, Information Management, NDHU 1-15 An Example (cont.)  Deletion: DML: DELETE FROM Cellar WHERE Ready < 86; Result:  Insertion: DML: INSERT INTO Cellar VALUES (53, 'Pinot Noir', 'Franciscan', 79, 1, 86, 'for Joan'); Result: 43 Cab. Sauvignon Robt. Mondavi Pinot Noir Ch. St. Jean Bin Wine Producer Year Bottle Ready Comments 43 Cab. Sauvignon Robt. Mondavi Pinot Noir Ch. St. Jean Pinot NoirFranciscan79 186for Joan Bin Wine Producer Year Bottle Ready Comments

Wei-Pang Yang, Information Management, NDHU 1-16 An Example (cont.)  Update DML: UPDATE Cellar SET Bottles = 4 WHERE Bin = 51; Result: 43 Cab. Sauvignon Robt. Mondavi Pinot Noir Ch. St. Jean Pinot NoirFranciscan for Joan Bin Wine Producer Year Bottle Ready Comments

Wei-Pang Yang, Information Management, NDHU 1-17 What is a Database System? Application program End-user DBMS

Wei-Pang Yang, Information Management, NDHU 1-18 What is a Database System? (cont.)  Major components of a database system: Data: integrated and shared. Hardware: disk, CPU, Main Memory,... Software: DBMS Users: 1. Application programmers 2. End users 3. Database administrator (DBA) Defining external schema Defining conceptual schema Defining internal schema Liaison with users Defining security and integrity checks Defining backup and recovery procedures Monitoring performance and changing requirements

Wei-Pang Yang, Information Management, NDHU 1-19 Why Database ?  Redundancy can be reduced  Inconsistency can be avoided  The data can be shared  Standards can be enforced  Security restrictions can be applied  Integrity can be maintained  Provision of data independence objective !

Wei-Pang Yang, Information Management, NDHU 1-20 Data Independence  Application Program  Data Structure  Immunity of application to change in storage structure and access strategy.

Wei-Pang Yang, Information Management, NDHU 1-21 Data Dependence vs. Data Independence  Data Dependent e.g. SELECT CITY FROM S WHERE ITEM = 'X'; Linked list: TOP if item = TOP  . item then Tree:. if item < root.data then root := root .left Array: if A[I] = item then Storage structure changed  program changed S S# S 1 S 2 : Sn S Top s1s1 s2s2 snsn

An Architecture for a Database System

Wei-Pang Yang, Information Management, NDHU 1-23 Host Language + DSL Host Language + DSL Host Language + DSL Host Language + DSL Host Language + DSL User A1User A2User B1User B2User B3 External # A & External View B External/conceptual mapping A Conceptual View External/conceptual mapping B Conceptual/internal mapping Stored database (Internal View) Database management system (DBMS) < DBA Storage structure definition (Internal schema) Conceptual schema External schema A External schema B (Build and maintain schemas and mappings) & (Data Sub Language) & e.g. SQL, QUEL

Wei-Pang Yang, Information Management, NDHU 1-24 An Example of the Three Levels  Internal level: STORED_EMP length = 18 PREFIXTYPE = BYTE(6), OFFSET = 0, INDEX = EMPX EMP# TYPE = BYTE(6), OFFSET=0, DEPT# TYPE = BYTE(4), OFFSET = 12 PAYTYPE = FULLWORD, OFFSET = 16  Conceptual level: EMPLOYEE EMPLOYEE_NUMBER CHARACTER(6) DEPARTMENT_NUMBER CHARACTER(4) SALARY NUMERIC(5)  External level: ( PL /I ) DCL 1 EMP 2 EMP# CHAR(6) 2SAL FIXED BIN(31) (COBOL) 01 EMPC 02 EMPNO PIC X(4) 02 DEPTNO PIC X(4)

Wei-Pang Yang, Information Management, NDHU 1-25 Functions of the DBMS  Data Definition Language (DDL)  Data Manipulation Language (DML)  Data Security and Integrity  Data Recovery and Concurrency  Data Dictionary  Performance

Wei-Pang Yang, Information Management, NDHU s to Mid-1970s 1970s to Mid-1980s Late 1980s Future Data Model Database Hardware User Interface Program Interface Presentation and display processing Network Hierarchical Mainframes None Forms Procedural Reports Processing data Relational Mainframes Minis PCs Query languages - SQL, QUEL Embedded query language Report generators Information and transaction processing Semantic Object-oriented Logic Faster PCs Workstations Database machines Graphics Menus Query-by-forms 4GL Logic programming Business graphics Image output Knowledge processing Merging data models, knowledge representation, and programming languages Parallel processing Optical memories Natural language Speech input Integrated database and programming language Generalized display managers Distributed knowledge processing 1.4 Database Technology Trends

Wei-Pang Yang, Information Management, NDHU 1-27 Distributed Databases Database Distributed System  Distributed database is a database that is not stored in its entirety at a single physical location, but rather is spread across a network of computer. Hsinchu Taipei Kaoshiung computers Taichung communication links

Wei-Pang Yang, Information Management, NDHU 1-28 Distributed Databases (cont.)  Advantages:  efficiency of local processing  data sharing  Disadvantages:  communication overhead  implementation difficulties  Reference: S. Ceri and G. Pelagatti "Distributed Databases: principles and systems"

Wei-Pang Yang, Information Management, NDHU 1-29 Multi-Database/Heterogeneous Database Multidatabase IMS INGRES ORION... Hierarchical Model Relational Model Object- Oriented Model semantic inconsistency data incompleteness global schema

Wei-Pang Yang, Information Management, NDHU 1-30 DB + AI Database AI Language Processor Query Optimizer Operator Processor Access Method File Manager Query Distributed DB design Logical DB design Knowledge Base Knowledge Base Knowledge Base DBMS

Wei-Pang Yang, Information Management, NDHU 1-31 KBMS  A Combined Model : Logic Programming + Relational DB  Three layers : Database Logic User Program Knowledge management program Relational DB management program IDB EDB relational interface Query : ? :- ancestor (taro, Y) ? :- grandfather (?, c) IDB: ancestor(X,Y):- parent(X,Y) ancestor(X,Y) :- parent(X,Z), ancestor(Z,Y) parent(X,Y):-edb(father(X,Y)) parent(X,Y):-edb(mother(X,Y)) grandfather(X,Z):- father(X,Y) ^ father(Y,Z) EDB: father son A B X Y.... B C fathe r mother

Wei-Pang Yang, Information Management, NDHU 1-32 OODB  A typical Document : MEMO [Woelk86, SIGMOD] Database Object-Oriented MCC To: W. Kim From: D. Woolk Date: September 18, 1992 can be heard Subject: Workstations In the computer center of National Chiao-Tung University, there are a lot of workstations. There are HP RS serials, SUNs, Apollo, and so on. The students in NCTU learn to use workstation since they are fresh- men. The configuration of the workstations follows:... In the course  introduction to Computer Science? students do their homework's on workstations. Workstation Database Server  speaker voice message associated } text } graphics } image

Wei-Pang Yang, Information Management, NDHU 1-33 Use of a Database Management System in Design and Application Design Analysis Design Verification EvaluationSynthesisRelease Manufacturing Planning Production Control Project Management APPLICATION DBMS Database Management System Graphic InterfaceLanguage Interface INTERFACE Preliminary- design Analysis Models Detailed Design Release Control Fabrication Assembly Info Test / Inspection Database Manufacturing

Wei-Pang Yang, Information Management, NDHU 1-34 Fuzzy Database  Fuzzy Query Database Fuzzy Set Theory SELECT STUDENT.NAME FROM STUDENT WHERE SEX = M  AND HEIGH = TALLER AND WEIGH = SLIMMER STUDENT: NAME SEX HEIGHT WEIGHT IQ Mary F High Linda F Medium SELECT STUDENT.NAME FROM STUDENT WHERE IQ >= 130

Wei-Pang Yang, Information Management, NDHU 1-35 More? DB AI DB VR ? ? DB ? WWW DB ? Mobile/video 1999 ? 2003 DB 911/ Anthrax ? 2001 DB DNA/BioInfo. ? 2004 DB ??? SARS ? 2006 DB ???