DataBase System Concepts and Architecture

Slides:



Advertisements
Similar presentations
Database System Concepts and Architecture
Advertisements

Chapter 2 Database System Concepts and Architecture
Database Systems Chapter 2
1 Chapter 2 Database System Concepts and Architecture.
Databases and Database Management Systems
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Database system concepts and architecture Winter 2007Ron McFadyen ACS Database schema Database system architecture Data independence concept Database.
ICS (072)Database Systems Background Review 1 Database Systems Background Review Dr. Muhammad Shafique.
Databases and Database Users
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Overview of Database Languages and Architectures.
Databases and Database Management Systems
Database System Concepts and Architecture Dr. Ali Obaidi.
1 Chapter 2 Database Environment. 2 Chapter 2 - Objectives u Purpose of three-level database architecture. u Contents of external, conceptual, and internal.
Chapter 2 Database System Concepts and Architecture
Copyright © 2004 Pearson Education, Inc. Chapter 1 Introduction.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 1 Database System Architecture.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
Information storage: Introduction of database 10/7/2004 Xiangming Mu.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 1- 1 Chapter 2: Database System Concepts and Architecture - Outline Data Models and Their.
Database System Concepts and Architecture
Copyright © 2004 Pearson Education, Inc.. Chapter 2 Database System Concepts and Architecture.
Faculty of Information Science and Technology Mahanakorn University of Technology Topic 2 Database System Concepts and Architecture.
CSC271 Database Systems Lecture # 4.
Database System Concepts and Architecture Lecture # 2 21 June 2012 National University of Computer and Emerging Sciences.
Database System Concepts and Architecture
2. Database System Concepts and Architecture
COSC 2307: Database Programming Lecture 1: Introduction Kalpdrum Passi Fall 2004 ( )
1 CSBP430 – Database Systems Chapter 2: Database System Concepts and Architecture Elarbi Badidi College of Information Technology United Arab Emirates.
Ihr Logo Fundamentals of Database Systems Fourth Edition El Masri & Navathe Chapter 2 Database System Concepts and Architecture.
Instructors: Churee Techawut Introduction to Database System Chapter 1 CS (204)321 Database System I.
Database System Concepts and Architecture. Relational Model Concepts relational model represents the database as a collection of relations. Each relation.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Copyright © 2004 Pearson Education, Inc. Slide 2-1 Data Models Data Model: A set.
Chapter 2 Database System Concepts and Architecture Dr. Bernard Chen Ph.D. University of Central Arkansas.
1Mr.Mohammed Abu Roqyah. Database System Concepts and Architecture 2Mr.Mohammed Abu Roqyah.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Database System Concepts and Architecture
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 2- 1.
DBMS_Week 3-4 DBMS. Three-Schema Architecture – Internal schema (one view) describes physical storage structures access paths, indexes used Typically.
Database Systems – Concepts
PART I : Databases and Database Management Systems These Slides are based on chapters 1-2 of Fundamentals of : Database Systems by Elmasri and Navathe,
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 340 Introduction to Database Systems.
1 Chapter 2 Database Environment Pearson Education © 2009.
2) Database System Concepts and Architecture. Slide 2- 2 Outline Data Models and Their Categories Schemas, Instances, and States Three-Schema Architecture.
Postgraduate Module Enterprise Database Systems Technological Educational Institution of Larisa in collaboration with Staffordshire University Larisa
1 Database Design Chapter-2- Database System Concepts and Architecture Reference: Prof. Mona Mursi Lecture notes.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Introduction: Databases and Database Systems Lecture # 1 June 19,2012 National University of Computer and Emerging Sciences.
Database Systems 主講人 : 陳建源 日期 :99/9/14 研究室 : 法 Chapter 2 Database System Concepts and Architecture.
ISC321 Database Systems I Chapter 2: Overview of Database Languages and Architectures Fall 2015 Dr. Abdullah Almutairi.
Copyright © 2011 Ramez Elmasri and Shamkant Navathe Chapter 2 Database System Concepts and Architecture.
College of Arts & Science Computer Science Department
Chapter (2) Database Systems Concepts and Architecture Objectives
Databases (CS507) CHAPTER 2.
Databases and DBMSs Todd S. Bacastow January 2005.
Chapter 2: Database System Concepts and Architecture - Outline
Chapter (2) Database Systems Concepts and Architecture Objectives
Chapter 2 Database Environment.
Database System Concepts and Architecture
Database System Concepts and Architecture
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Chapter 2 Database Environment.
Chapter 2: Database System Concepts and Architecture
Chapter 2 Database Environment Pearson Education © 2009.
Data, Databases, and DBMSs
Database System Concepts and Architecture
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment Pearson Education © 2009.
Presentation transcript:

DataBase System Concepts and Architecture Chapter 2 DataBase System Concepts and Architecture 2.1 Data Models, Schemas, and Instances 2.2 DBMS Architecture and Data Independence 2.3 Database Languages and Interfaces 2.4 The Database System Environment 2.5 Classification of Database Management Systems 2.6 Summary 2-1

Introduction to SQL SQL is a standard language for accessing and manipulating databases. *What is SQL? SQL stands for Structured Query Language SQL lets you access and manipulate databases SQL is an ANSI (American National Standards Institute) standard *What Can SQL do? SQL can execute queries against a database SQL can retrieve data from a database SQL can insert records in a database SQL can update records in a database SQL can delete records from a database SQL can create new databases SQL can create new tables in a database SQL can create stored procedures in a database .

SQL can create views in a database SQL can set permissions on tables, procedures, and views SQL is a Standard - BUT.... Although SQL is an ANSI (American National Standards Institute) standard, there are many different versions of the SQL language

2.1 Data Models, Schemas, and Instances ‧data types ‧relationships Data Model: A set of concepts to describe the structure of a database, and certain constraints that the database should obey. Provide data abstraction Data Model Operations: Operations for specifying database retrievals and updates by referring to the concepts of the data model. ‧generic operation: insert, delete, modify, retrieve ‧user-defined operations 2-2

2.1.1 Categories of Data Models: Conceptual (high-level, semantic) data models: Provide concepts that are close to the way many users perceive data. (Also called entity-based or object-based data models.) ‧entity ‧attribute ‧relationship Physical (low-level, internal) data models: Provide concepts that describe details of how data is stored in the computer. ‧record formats ‧record ordering ‧access paths Implementation (record-oriented) data models: Provide concepts that fall between the above two, balancing user views with some computer storage details. ‧relational ‧network ‧hierarchical 2-2

2.1.2 Schemas, Instances and Database State cf database Database Schema (meta-data): The description of a database. Includes descriptions of the database structure and the constraints that should hold on the database. Schema Diagram: A diagrammatic display of (some aspects of ) a database schema. (refer to Fig 2.1 2-5) Database Instance: The actual data stored in a database at a particular moment in time. Also called database state ( or occurrence, snapshot) (refer to Fig 1.2 2-6) The database schema changes very infrequently. The database state changes every time the database is updated. Schema is also called intension, whereas state is called extension. Each schema construct has its own current set of instances. 2-3

Figure 2.1 Schema diagram for UNIVERSITY database schema construct Known data: name of record types, data items 2-4a

Figure 1.2 UNIVERSITY Database 2-4

satisfy database schema state define empty state load initial state update valid state satisfy database schema state update 2-3

2.2 DBMS Architecture and Data Independence 2.2.1 Three-Schema Architecture Proposed to support DBMS characteristics of: - Insulation of programs and data/program and operations (program-data and program-operation independence) - Support of multiple views of the data. - Use of catalog (database description) Defines DBMS schema at three levels: (see 2-9) - Internal schema at the internal level to describe data storage structures and access paths. Typically uses a physical data model. - Conceptual schema at the conceptual level to describe the structure and constraints for the whole database. Uses a conceptual or an implementation data model. - External schema at the external level to describe the various user views. Usually uses the same data model as the conceptual level or high-level data model. Mappings among schema levels are also needed. Programs refer to an external schema, and are mapped by the DBMS to the internal schema for execution 2-5

Figure 2.2 The Three-schema architecture 2-6 Figure 2.2 The Three-schema architecture 2-6

2.2.2 Data Independence By adding or removing a record type or data item to · expand the database (2-11) · reduce the database Logical Data Independence: The capacity to change the conceptual schema without having to change the external schemas and their application programs. Physical Data Independence: The capacity to change the internal schema without having to change the conceptual schema. When a schema at a lower level is changed, only the mappings between this schema and higher-lever schemas need to be changed in a DBMS that fully supports data independence. The higher-level schemas themselves are unchanged. Hence, the application programs need not be changed since they refer to the external schemas. Reorganize physical files to improve performance e.g. List all sections offered in Fall 1998 Disadvantages of two levels of mappings: Overhead during compilation or execution of a query or program 2-7

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 Change GRADE-REPORT Schema Construct GRADE_REPORT (Student Number, Student Name, Section Id, Course Number, Grade) Change Mapping (& View Definition) TRANSCRIPT derived from SECTION, GRADE_REPORT 2-7a

2.3 Database Languages and Interfaces provide appropriate languages and interfaces for each category of users. 2.3.1 DBMS Languages Data Definition Language (DDL): Used by the DBA and database designers to specify the conceptual schema of a database. In many DBMSs, the DDL is also used to define internal and external schemas (views). In some DBMSs, separate storage definition language (SDL) and view definition language (VDL) are used to define internal and external schemas. Data Manipulation Language (DML): Used to specify database retrievals and updates (insertion, deletion, modifications) - DML commands (data sublanguage) can be embedded in a general-purpose programming language (host language). - Alternatively, stand-alone DML commands can be applied directly (query language). DDL Compiler 2-8

-Declarative or non-procedural DML: Types of DML -Procedural DML: Also called record-at-a-time (record-oriented) or low-level DML Must be embedded in a programming language. Searches for and retrieves individual database records and uses looping and other constructs of the host programming language to retrieve multiple records. -Declarative or non-procedural DML: Also called set-at-a-time (set-oriented) or high-level DML. Can be used as a stand-alone query language or can be embedded in a programming language. Searches for and retrieves information from multiple related database records in a single command. - host language: general-purpose language - data sublanguage: DML - C++ 2-9

2.3.2 DBMS Interfaces Stand-alone query language interfaces. (casual end user) - Programmer interfaces for embedding DML in programming languages: (programmer) -Pre-compiler Approach -Procedure (Subroutine) Call Approach - User-friendly interfaces: -Menu-based Interfaces for Browsing. -Forms-based Interfaces. -Graphical User Interfaces. -Natural language Interfaces -Combination of the above Interfaces for Parametic Users (using function keys) - Interfaces for the DBA: -Creating accounts, granting authorizations -Setting system parameters -Changing schemas or access path 2-10

2.4 The Database System Environment 2.4.1 DBMS Component Modules Figure 2.3 2-11

2.4.2 Database System Utilities To perform certain functions such as: Loading data stored in files into a database. Conversion tool Backing up the database periodically on storage. File reorganizing database file structures. Report generation utilities. Performance monitoring utilities. Other functions, such as sorting, user monitoring, data compression, etc. 2-12

2.4.3 Tools, Application Environments, and Communications Facilities Data dictionary utility: - Used to store schema descriptions and other information such as design decisions, application program descriptions, user information, usage standards, etc. (comment) Active data dictionary is accessed by DBMS software and users/DBA. Passive data dictionary is accessed by users/DBA only. Communications Facilities - Allow users at locations remote from the database system site to access the database. DB (DBMS)/DC (Data Communication System) 2-12

2.5 Classification of Database Management Systems Based on the data model used: Data models -Traditional: Relational, Network (see 2-19), Hierarchical - Emerging: Object-oriented, Semantic, Entity- Relationship, other. Other classifications: Number of users : Single-user (typically used with personal computers) vs. multi-user (most DBMSs) Number of sites: Centralized (uses a single computer) vs. distributed (uses multiple computers). Homogeneous vs. Heterogeneous Cost of DBMS software. $10,000~100,000 $100~3,000 Types of access paths used. (inverted file structures, …) Purpose general purpose special purpose e.g. airline reservations, telephone directory, on-line transaction processing system 2-13

Figure 2.4 A Network Schema 2-14