Introduction to DBMS (Database Management Systems)

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

--What is a Database--1 What is a database What is a Database.
Chapter 2 Database Environment.
Database Management Systems ISYS 464 David Chao. Introduction to Databases The most important component in an information system Created to support all.
Introduction to Database Systems
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Chapter One Overview of Database Objectives: -Introduction -DBMS architecture -Definitions -Data models -DB lifecycle.
Introduction to Database
1-1 Unit 1 Introduction to DBMS (Database Management Systems) Application program End-user DBMS.
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.
Database Environment Chapter 2 AIT632 Sungchul Hong.
1-1 Unit 1 Introduction to DBMS (Database Management Systems) Application program End-user DBMS
Ch. 1 데이터베이스시스템 (2). Ch.1 Database System 데이터베이스시스템 2 What to Learn Database System Overview Entity-Relationship diagram Relational Data Model  Structure.
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.
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 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.
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.
What is Database Administration ?
Introduction to Databases
Introduction to DBMS Purpose of Database Systems View of Data
Databases (CS507) CHAPTER 2.
Databases and DBMSs Todd S. Bacastow January 2005.
Normalized bubble chart for Data in the Instructor’s View
Introduction To DBMS.
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
Introduction to Databases
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
Database Management.
Chapter 2: Database System Concepts and Architecture - Outline
Chapter 2 Database Environment.
An Introduction to database system
Chapter 1: Introduction
Database Management:.
Chapter 1 Introduction to DBMS Concepts
Database Management System
Lecture 1 Introduction to Database
Introduction to Database Systems
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Introduction to Databases
Introduction to Databases
Chapter 2 Database Environment.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2: Database System Concepts and Architecture
Introduction to Database Management System
Introduction to Database Systems
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Data Base System Lecture : Database Environment
Data, Databases, and DBMSs
Introduction to Database
Database System Architecture
Database Environment Transparencies
Introduction to DBMS Purpose of Database Systems View of Data
Introduction to Databases
Chapter 2 Database Environment Pearson Education © 2014.
Advanced Database System
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Course Instructor: Supriya Gupta Asstt. Prof
Unit 12 Index in Database 大量資料存取方法之研究 Approaches to Access/Store Large Data 楊維邦 博士 國立東華大學 資訊管理系教授.
Presentation transcript:

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

Outline of Unit 1 1.1 Information Systems 1.2 An Overview of a Database System 1.3 An Architecture for a Database System 1.4 Database Technology Trends

1.1 Information Systems

Stages of Information System Stage 0: Manual Information System Records Files Index Cards Stage 1: Sequential Information Systems Tapes 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

File Based Information Systems 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 (cont.) Customer Invoice Inventory Parts Customer No. Customer Name Customer Addr. Social Security ID Part No. Quantities Unit Price Part Description Supplier Quantities Remain Quantities Ordered

Stored database (Internal View) Host Language + DSL User A1 User A2 User B1 User B2 User B3 External View @ # & B External/conceptual mapping A Conceptual View mapping B Conceptual/internal mapping Stored database (Internal View) Database management system dictionary (DBMS) e.g. system catalog < DBA Storage structure definition (Internal schema) schema External A (Build and maintain schemas and mappings) # @ & DSL (Data Sub Language) C, Pascal e.g. SQL 1 2 3 ... 100

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

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) <e.g.>: 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

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

(4) Provide Transaction Management: DBMS based Information Systems: Basic Approach - Transaction Management (4) Provide Transaction Management: Concurrency Control Recovery Security . :

Example: A Simple Query Processing Language Processor Optimizer Operator Processor Access Method File System database Language Processor Access Method e.g.B-tree; Index; Hashing DBMS Query in SQL: SELECT CUSTOMER. NAME FROM CUSTOMER, INVOICE WHERE REGION = 'N.Y.' AND AMOUNT > 10000 AND CUTOMER.C#=INVOICE.C Internal 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

1.2 An Overview of a Database System

An Example DML (Data Manipulation Language): Result: The Wine Cellar Database: Cellar: Retrieval: DML (Data Manipulation Language): SELECT Wine, Bin, Producer FROM Cellar WHERE Ready = 85; Result: 2 Chardonnay Buena Vista 83 1 85 3 Chardonnay Louis Martini 81 5 84 6 Chardonnay Chappellet 82 4 85 Thanksgiving 12 Jo. Riesling Buena Vista 82 1 83 Late Harvest 16 Jo. Riesling Sattui 82 1 83 Very dry 43 Cab. Sauvignon Robt. Mondavi 77 12 87 50 Pinot Noir Mirassou 77 3 85 Harvest 51 Pinot Noir Ch. St. Jean 78 2 86 Bin Wine Producer Year Bottle Ready Comments Wine Bin Producer Chardonnay 2 Buena Vista Chardonnay 6 Chappellet Pinot Noir 50 Mirassou

An Example (cont.) DML: DELETE FROM Cellar Result: Deletion: DML: DELETE FROM Cellar WHERE Ready < 86; Result: Insertion: DML: INSERT INTO Cellar VALUES (53, 'Pinot Noir', 'Franciscan', 79, 1, 86, 'for Joan'); Bin Wine Producer Year Bottle Ready Comments 43 Cab. Sauvignon Robt. Mondavi 77 12 87 51 Pinot Noir Ch. St. Jean 78 2 86 43 Cab. Sauvignon Robt. Mondavi 77 12 87 51 Pinot Noir Ch. St. Jean 78 2 86 53 Pinot Noir Franciscan 79 1 86 for Joan Bin Wine Producer Year Bottle Ready Comments

An Example (cont.) Update DML: UPDATE Cellar Result: SET Bottles = 4 WHERE Bin = 51; Result: Bin Wine Producer Year Bottle Ready Comments 43 Cab. Sauvignon Robt. Mondavi 77 12 87 51 Pinot Noir Ch. St. Jean 78 4 86 53 Pinot Noir Franciscan 79 1 86 for Joan

What is a Database System? Application program End-user DBMS

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

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 !

Data Independence Application Program  Data Structure Immunity of application to change in storage structure and access strategy.

Data Dependence vs. Data Independence : Sn 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 Top s1 s2 sn

1.3 An Architecture for a Database System

Stored database (Internal View) Host Language + DSL User A1 User A2 User B1 User B2 User B3 External View @ # A & B External/conceptual mapping A Conceptual View mapping B Conceptual/internal mapping Stored database (Internal View) Database management system (DBMS) < DBA Storage structure definition (Internal schema) schema External A (Build and maintain schemas and mappings) # @ & (Data Sub Language) #A e.g. SQL, QUEL

An Example of the Three Levels Internal level: STORED_EMP length = 18 PREFIX TYPE = BYTE(6), OFFSET = 0, INDEX = EMPX EMP# TYPE = BYTE(6), OFFSET=0, DEPT# TYPE = BYTE(4), OFFSET = 12 PAY TYPE = 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) 2 SAL FIXED BIN(31) (COBOL) 01 EMPC 02 EMPNO PIC X(4) 02 DEPTNO PIC X(4)

Functions of the DBMS Data Definition Language (DDL) Data Manipulation Language (DML) Data Security and Integrity Data Recovery and Concurrency Data Dictionary Performance

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

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. < e.g.> Hsinchu Taipei Kaoshiung computers Taichung communication links

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"

Multi-Database/Heterogeneous Database IMS INGRES ORION . Hierarchical Model Relational Object- Oriented semantic inconsistency data incompleteness global schema

DB + AI Database AI Query Language Processor Query Optimizer Operator Processor Access Method File Manager Query Distributed DB design Logical Knowledge Base DBMS

KBMS A Combined Model : Three layers : Database Logic Logic Programming + Relational DB Three layers : User Program Knowledge management program Relational DB 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 father mother

speaker voice message associated Database Object-Oriented OODB A typical Document : MEMO [Woelk86, SIGMOD] 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

Use of a Database Management System in Design and Application Analysis Verification Evaluation Synthesis Release Manufacturing Planning Production Control Project Management APPLICATION DBMS Database Management System Graphic Interface Language Interface INTERFACE Preliminary- design Models Detailed Fabrication Assembly Info Test / Inspection Database Manufacturing