1 Chapter 2 Database Environment Pearson Education © 2009.

Slides:



Advertisements
Similar presentations
Database Environment Pertemuan 02 Matakuliah: M0564 /Pengantar Sistem Basis Data Tahun : 2008.
Advertisements

Introduction to Databases
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
Chapter 2 Database Environment Pearson Education © 2014.
1 Chapter 2 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data u User’s view immune to changes.
Lecture Two Database Environment Based on Chapter Two of this book:
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Introduction to Databases Transparencies 1. ©Pearson Education 2009 Objectives Common uses of database systems. Meaning of the term database. Meaning.
Chapter 3 Data Models.
Copyright © 2004 Pearson Education, Inc. Chapter 1 Introduction.
Database Environment 1.  Purpose of three-level database architecture.  Contents of external, conceptual, and internal levels.  Purpose of external/conceptual.
1 Chapter 2 Database Environment Transparencies Last Updated: Pebruari 2010 By M. Arief Updated by RSO Feb 2011
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Chapter 2 CIS Sungchul Hong
Chapter 2 Database Environment
CSC271 Database Systems Lecture # 4.
CST203-2 Database Management Systems Lecture 2. One Tier Architecture Eg: In this scenario, a workgroup database is stored in a shared location on a single.
Database Environment Chapter 2 AIT632 Sungchul Hong.
Database System Concepts and Architecture
1 Chapter 2 Database Environment Transparencies © Pearson Education Limited 1995, 2005.
Chapter 1 : Introduction §Purpose of Database Systems §View of Data §Data Models §Data Definition Language §Data Manipulation Language §Transaction Management.
Lecture2: Database Environment Prepared by L. Nouf Almujally & Aisha AlArfaj 1 Ref. Chapter2 College of Computer and Information Sciences - Information.
©Silberschatz, Korth and Sudarshan1.1Database System Concepts Chapter 1: Introduction Purpose of Database Systems View of Data Data Models Data Definition.
Chapter 2 Database Environment. Agenda Three-Level ANSI-SPARC Architecture Database Languages Data Models Functions of DBMS Components of DBMS Data Dictionary.
Lecture2: Database Environment Prepared by L. Nouf Almujally 1 Ref. Chapter2 Lecture2.
Chapter 1 Introduction to Databases. 1-2 Chapter Outline   Common uses of database systems   Meaning of basic terms   Database Applications  
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.
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
Module 2: Database Environment
Bayu Adhi Tama, M.T.I 1 © Pearson Education Limited 1995, 2005.
Database Environment Session 2 Course Name: Database System Year : 2013.
1 Pertemuan > > Matakuliah: >/ > Tahun: > Versi: >
Chapter 2 Database Environment Chuan Li 1 © Pearson Education Limited 1995, 2005.
DATABASE MANAGEMENT SYSTEM ARCHITECTURE
1 Chapter 1 Introduction to Databases Transparencies.
1 Lecturer M.Eng. Nguyen Ngo Bao Tran URL:
DataBase System Concepts and Architecture
1 Database Environment. 2 Objectives of Three-Level Architecture All users should be able to access same data. A user’s view is immune to changes made.
Chapter 2 Database Environment.
1 Database Environment. 2 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes.
Lecture On Introduction (DBMS) By- Jesmin Akhter Assistant Professor, IIT, Jahangirnagar University.
Database Environment CPSC 356 Database Ellen Walker Hiram College.
Database Environment Chapter 2. The Three-Level ANSI-SPARC Architecture External Level Conceptual Level Internal Level Physical Data.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
CS-508 Databases and Data Mining By Dr. Noman Hasany.
國立臺北科技大學 課程:資料庫系統 Chapter 2 Database Environment.
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
Introduction to Databases
REV 00 Chapter 2 Database Environment DDC DATABASE SYSTEM.
Chapter 2 Database Environment.
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 Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Data Base System Lecture : Database Environment
Database Environment Transparencies
Introduction to Databases
Chapter 2 Database Environment Pearson Education © 2014.
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

1 Chapter 2 Database Environment Pearson Education © 2009

2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal levels. u Purpose of external/conceptual and conceptual/internal mappings. u Meaning of logical and physical data independence. u Distinction between DDL and DML. u A classification of data models. Pearson Education © 2009

3 Chapter 2 - Objectives u Purpose/importance of conceptual modeling. u Typical functions and services a DBMS should provide. u Function and importance of system catalog. u Software components of a DBMS. u Meaning of client–server architecture and advantages of this type of architecture for a DBMS. u Function and uses of Transaction Processing Monitors. Pearson Education © 2009

4 Objectives of Three-Level Architecture u All users should be able to access same data. u A user’s view is immune to changes made in other views. u Users should not need to know physical database storage details. Pearson Education © 2009

5 Objectives of Three-Level Architecture u DBA should be able to change database storage structures without affecting the users’ views. u Internal structure of database should be unaffected by changes to physical aspects of storage. u DBA should be able to change conceptual structure of database without affecting all users. Pearson Education © 2009

6 ANSI-SPARC Three-Level Architecture Pearson Education © 2009

7 ANSI-SPARC Three-Level Architecture u External Level –Users’ view of the database. –Describes that part of database that is relevant to a particular user. –Entities, attributes, relationships : user interested. u Conceptual Level –Community view of the database. –Describes what data is stored in database and relationships among the data. –Complete view of the data requirements of the organization: independentof any storage considerations –Supports external views Pearson Education © 2009

8 ANSI-SPARC Three-Level Architecture u Internal Level –Physical representation of the database on the computer. –Describes how the data is stored in the database. –Physical implementation of the database to achieve optimal runtime performance and storage utilization. Pearson Education © 2009

9 Differences between Three Levels of ANSI- SPARC Architecture Pearson Education © 2009

10 Differences between Three Levels of ANSI- SPARC Architecture Pearson Education © 2009 UNIVERSITY Conceptual Schema STUDENT (Name, Student Number, Class, Major) COURSE (Course Name, Course Number, Credit, Dept) PREREQUISITE (Course Number, Prerequisite Number) SECTION (Section Id, Course Number, Semester, Year, Instructor) GRADE_REPORT(Student Number, Section Id, Grade) UNIVERSITY External Schema TRANSCRIPT(Student Name, Course Number, Grade, Semester, Year, Section Id) derived from STUDENT, SECTION, GRADE_REPORT PREREQUISITES(Course Name, Course Number, Prerequisites) derived from PREREQUISITE, COURSE

ANSI-SPARC Three-Level Architecture: Schemas Pearson Education © 2009 u Overall description of the database: Database schema  specified during database design u 3 different types of schema: –External (subschemas) –Conceptual –Internal u Only 1 conceptual & internal schema

12 ANSI-SPARC Three-Level Architecture: Schemas Pearson Education © 2009

13 ANSI-SPARC Three-Level Architecture: Mappings u DBMS: –responsible for mapping between these schemas. –Check the schemas for consistency u Mappings: –Conceptual/Internal mapping »Enables DBMS to find the actual record/combinations of records in physical storage && any constraints –External/Conceptual mapping »Enables DBMS to map names in the user’s view to the relevant part of the conceptual schema Pearson Education © 2009

14 Data Independence u Major objective of the three-level architecture: provide data independence. u Two types: –Logical –Physical Pearson Education © 2009

15 Data Independence u Logical Data Independence –Refers to immunity of external schemas to changes in conceptual schema. –Conceptual schema changes (e.g. addition/removal of entities/attributes/relationships). –Should not require changes to external schema or rewrites of application programs. Pearson Education © 2009

16 Data Independence u Physical Data Independence –Refers to immunity of conceptual schema to changes in the internal schema. –Internal schema changes (e.g. using different file organizations, storage structures/devices). –Should not require change to conceptual or external schemas. Pearson Education © 2009

17 Data Independence and the ANSI-SPARC Three-Level Architecture Pearson Education © 2009

18 Database Languages u Data Definition Language (DDL) –Allows the DBA or user to describe and name entities, attributes, and relationships required for the application –plus any associated integrity and security constraints. Pearson Education © 2009

19 Database Languages u Data Manipulation Language (DML) –Provides basic data manipulation operations on data held in the database. u Procedural DML –allows user to tell system exactly how to manipulate data. u Non-Procedural DML –allows user to state what data is needed rather than how it is to be retrieved. u Fourth Generation Languages (4GLs) –nonprocedural Pearson Education © 2009

20 Database Languages u Fourth Generation Languages (4GLs) –Nonprocedural –Includes: »Presentation languages – query languages, report generators »Speciality languages – spreadsheets, database languages »Application generators that define insert, update, retrieve data from the database to build applications »Very high-level languages that are used too generate application code Pearson Education © 2009

21 Data Model u Integrated collection of concepts for describing data, relationships between data, and constraints on the data in an organization. u Representation of real world objects and events and their association. u Represents the organization itself Pearson Education © 2009

22 Data Model Data Model comprises: –a structural part »a collection of data structures which are used to create databases representing the entities or objects modeled by the database. »A set of rules according to which databases can be constructed –a manipulative part »a collection of operators which can be applied to the data structures, to update and query the data contained in the database. »Defining the types of operation that are allowed on the data. –possibly a set of integrity rules »a collection of rules governing the constraints placed on these data structures to ensure structural integrity. »Ensures that the data is accurate Pearson Education © 2009

23 Data Model u Purpose –To represent data in an understandable way. –Can be used to design a database. u Categories of data models include: –Object-based –Record-based –Physical Pearson Education © 2009 Describe data at the conceptual & external levels Describe data at the internal level

24 Data Models: Object-Based Data Models u Use concept such as entities, attributes and relationships. u Some of the common types of object-based data model: –Entity-Relationship (ER) –Semantic –Functional –Object-Oriented. Pearson Education © 2009

25 Data Models: Record-Based Data Models u Database consists of a number of fixed-format records u Each record type defines a fixed number of fields – fixed length u Three types: –Relational Data Model –Network Data Model –Hierarchical Data Model. Pearson Education © 2009

26 Relational Data Model Pearson Education © 2009

27 Network Data Model Pearson Education © 2009

28 Hierarchical Data Model Pearson Education © 2009

29 Data Models: Physical Data Models u Describe how data is stored in the computer u Representing information such as record structures, record orderings and access paths. Pearson Education © 2009

30 Conceptual Modeling u Conceptual schema is the core of a system supporting all user views. u Should be complete and accurate representation of an organization’s data requirements. u Conceptual modeling is process of developing a model of information use that is independent of implementation details. u Result is a conceptual data model. –Also referred as logical model Pearson Education © 2009

31 Functions of a DBMS u Data Storage, Retrieval, and Update. –Fundamental capability of a DBMS –A DBMS must furnish users with the ability to store, retrieve and update data in the database u A User-Accessible Catalog. –A DBMS must furnish a catalog in which descriptions of data items are stored and which is accessible to users –System catalog stores: »Names, types and sizes of data items »Names of relationships »Integrity constraints »Names of authorized users »Data items that user can access and types of access allowed »External, conceptual and internal schemas and the mappings between the schemas »Usage statistics Pearson Education © 2009

32 Functions of a DBMS u Transaction Support. –A DBMS must furnish a mechanism that will ensure either that all the updates corresponding to a given transaction are made or that none of them is made u Concurrency Control Services. –A DBMS must furnish a mechanism to ensure that the database is updated correctly when multiple users are updating the database concurrently Pearson Education © 2009

33 Functions of a DBMS u Recovery Services. –A DBMS must furnish a mechanism for recovering the database in the event that the database is damaged in anyway. –Database has to be returned to a consistent state. u Authorization Services. –A DBMS must furnish a mechanism to ensure that only authorized users can access the database. u Support for Data Communication. –A DBMS must be capable of integrating with communication software. –DBMS should be capable to integrate with a variety of Data Communication Manager (DCM). Pearson Education © 2009

34 Functions of a DBMS u Integrity Services. –A DBMS must furnish a means to ensure that both the data in the database and changes to the data follow certain rules. –Database integrity: correctness and consistency of stored data. –Integrity: »Concerned with the quality of data. »Expressed in terms of constraints. u Services to Promote Data Independence. –A DBMS must include facilities to support the independence of programs from the actual structure of the database Pearson Education © 2009

35 Functions of a DBMS u Utility Services. –A DBMS should provide a set of utility services. –Help DBA administer the database effectively –Example: »Import/export facilities »Monitoring facilities »Statistical analysis programs »Index reorganization facilities Pearson Education © 2009

36 System Catalog u Repository of information (metadata) describing the data in the database. u One of the fundamental components of DBMS. u Typically stores: –names, types, and sizes of data items; –constraints on the data; –names of authorized users; –data items accessible by a user and the type of access; –usage statistics. Pearson Education © 2009