Definitions. Database Architecture 1. Database Schema. Database Instance. Data Item (Schema Construct) The description of a database.

Similar documents
Database Architecture 1

Definitions. Database Architecture. References Fundamentals of Database Systems, Elmasri/Navathe, Chapter 2. HNC Computing - Databases

DBMS and its Architecture

B + -Trees. Fundamentals of Database Systems Elmasri/Navathe Chapter 6 (6.3) Database System Concepts Silberschatz/Korth/Sudarshan Chapter 11 (11.

Lecture 02. Fall 2017 Borough of Manhattan Community College

1. Data Model, Categories, Schemas and Instances. Outline

FIT1004 Database Topic 2: Database Design Life Cycle

DATABASE MANAGEMENT SYSTEM COURSE CONTENT

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE

Oracle 8i User Guide for CS2312

G64DBS Database Systems. G64DBS Module. Recommended Textbook. Assessment. Recommended Textbook. Recommended Textbook.

Teaching Scheme BIT/MMC/BCS Database Systems 1

Configuring Data Masking. Version: 7.3

Lecture2: Database Environment

4/28/2014. File-based Systems. Arose because: Result

Chapter 11 Database Concepts

COIS Databases

Database Design. 8-4 Drawing Conventions for Readability. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

CT13 DATABASE MANAGEMENT SYSTEMS DEC 2015

Teaching Scheme Business Information Technology/Software Engineering Management Advanced Databases

Designing Database Solutions for Microsoft SQL Server 2012

Institute of Southern Punjab, Multan

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

CREATING CUSTOMIZED DATABASE VIEWS WITH USER-DEFINED NON- CONSISTENCY REQUIREMENTS

LECTURE1: PRINCIPLES OF DATABASES

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4-1

Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 25-1

UNIT 1 INTRODUCTION TO DBMS 1

data dependence Data dependence Structure dependence

DATABASE DEVELOPMENT (H4)

DATABASE DEVELOPMENT (H4)

Advance Database Management System

Database Management System. Fundamental Database Concepts

5/23/2014. Limitations of File-based Approach. Limitations of File-based Approach CS235/CS334 DATABASE TECHNOLOGY CA 40%

Active Directory Synchronisation

Database Management Systems MIT Introduction By S. Sabraz Nawaz

"Charting the Course... Oracle 18c DBA I (3 Day) Course Summary

Entity-Relationship Model

Fundamentals of Physical Design: State of Art

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

CS6312 DATABASE MANAGEMENT SYSTEMS LABORATORY L T P C

Rapid Application Development

Database Design. 2-3 Entity Relationship Modeling and ERDs. Copyright 2015, Oracle and/or its affiliates. All rights reserved.

Creating and Managing Tables Schedule: Timing Topic

Institute of Southern Punjab, Multan

Introduction to Database Technology Elmasri/Navathe ch 1-2 Padron-McCarthy/Risch ch 1 Sobhan Badiozamany Silvia Stefanova Department of Information Te

Database system development lifecycles

Where is Database Management System (DBMS) being Used?

Enabling Seamless Data Access for JD Edwards EnterpriseOne

Introduction to database administration

Fundamentals of Design, Implementation, and Management Tenth Edition

Database Systems Overview. Truong Tuan Anh CSE-HCMUT

Relational Theory and Data Independence: Unfinished Business. Logical Data Independence and the CREATE VIEW Statement.

Database System Concepts and Architecture

1. Considering functional dependency, one in which removal from some attributes must affect dependency is called

Chapter 1 Database System Concepts and Architecture. Nguyen Thi Ai Thao

INFS 328 Systems Analysis and Design

Student notes 5.2. The DBMS. Security. Integrity

Inputs. Decisions. Leads to

Database Environment. Pearson Education 2009

DATABASTEKNIK - 1DL116

Multi-Attribute Indexing

Lab IV. Transaction Management. Database Laboratory

DC62 Database management system JUNE 2013

Module 9: Managing Schema Objects

NOTE: DO NOT REMOVE THIS EXAM PAPER FROM THE EXAM VENUE

DumpsKing. Latest exam dumps & reliable dumps VCE & valid certification king

Oracle Database 10g Resource Manager. An Oracle White Paper October 2005

Oracle Transparent Gateways

Chapter 4. Enhanced Entity- Relationship Modeling. Enhanced-ER (EER) Model Concepts. Subclasses and Superclasses (1)

Fundamentals of Information Systems, Seventh Edition

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques. Fundamentals, Design, and Implementation, 9/e

Lab # 6. Using Subqueries and Set Operators. Eng. Alaa O Shama

Database Systems Concepts *

Working with Columns, Characters and Rows. Copyright 2008, Oracle. All rights reserved.

UNIT I. Introduction

[Contents. Sharing. sqlplus. Storage 6. System Support Processes 15 Operating System Files 16. Synonyms. SQL*Developer

COMP3311 Database Systems

Databasesystemer, forår 2005 IT Universitetet i København. Forelæsning 8: Database effektivitet. 31. marts Forelæser: Rasmus Pagh

Objectives. After completing this lesson, you should be able to do the following:

Advance SQL: SQL Performance Tuning. SQL Views


Copyright 2007 Ramez Elmasri and Shamkant B. Navathe Slide 16-1

Data analysis and design Unit number: 23 Level: 5 Credit value: 15 Guided learning hours: 60 Unit reference number: H/601/1991.

Object-Relational and Nested-Relational Databases Dr. Akhtar Ali

Oracle HCM Cloud Common Features

HIBERNATE MOCK TEST HIBERNATE MOCK TEST IV

Ian Kenny. November 28, 2017

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION. Ch. 1 :- Introduction Database Management System - 1

Lab # 6. Data Manipulation Language (DML)

EXAM Microsoft Database Fundamentals. Buy Full Product.

Customization Guide October 14, 2017

B.C.A DATA BASE MANAGEMENT SYSTEM MODULE SPECIFICATION SHEET. Course Outline

Data Warehousing. Overview

DBS Assignment I. 1. With necessary examples, explain any four major disadvantages of keeping organizational information in a file-processing system.

RDBMS Topic 4 Adv. SQL, MSBTE Questions and Answers ( 12 Marks)

Course 40045A: Microsoft SQL Server for Oracle DBAs

Using the Set Operators. Copyright 2006, Oracle. All rights reserved.

1-2 Copyright Ó Oracle Corporation, All rights reserved.

SQL Server DBA Online Training

Transcription:

Architecture 1 References Fundamentals of Systems, Elmasri/Navathe, Chapter 2 Systems : A Practical Approach, Connolly/Begg, Chapters 1 and 2 Definitions The description of a database. Instance The data in the database. Data Item ( Construct) An element in a schema. 2 A database consists of two parts: (1) the database schema describes the structure of the database and (2) the database instance is the actual content of one particular database. A database schema is the same irrespective of the contents of the database. There is only one schema for a database. A database instance changes depending on the data in the database. For example, a database instance changes as new data is added to the database. In designing a database, the database designer constructs a database schema by selecting the data items to be stored in the database. Complex databases can consist of thousands of data items and be accessed by thousands of users. To manage this structure database designers divide the users into user groups and provide each user group with access to their own part of the database. The way the database designer choses to organise the data into user groups and then convert these groups into a database management system is called the database architecture. The most common database architecture is the three-level model. (c) Stephen Mc Kearney, 2003. 1 (c) Stephen Mc Kearney, 2003. 2

Overview Three Architecture Three- Architecture External Data Independence External Level Level Physical independence Logical independence Level 3 4 The architecture of a database management system refers to the design of the major components of the system and how they are related to each other. The commonest database architecture is the three-schema architecture, often called the ANSI-SPARC model. The three main components of the three-schema architecture describe three levels of abstraction within the database system: (1) external, (2) conceptual and (3) internal. The purpose of these abstraction levels is to provide data independence. That is, each level is separated from the level above it and the level below it. There are two types of data independence provided by the three-schema architecture: (1) physical independence and (2) logical independence. The three levels within the database architecture represent different views of the data. The data is not held in three different locations; it is held in only one place, that is, the database. The three levels (external, conceptual and internal) are only descriptions of data. When a user requests data by writing a database query, they use the structures contained in their view of the database (their external schema). The user s request must be converted from one of the external views to the conceptual view of the database and then to the internal view of the database. Therefore, it must be possible to convert between the different levels in the architecture. Each level is defined in terms of the level below it. For example, the contents of the external level are described using the information contained in the conceptual schema. This process of expressing one level in terms of another is called a mapping. A mapping converts the contents of one level into another, for example, a mapping between the conceptual level and the external level converts the contents of the conceptual level into one or more external level views. When the user requests data from the database using an external schema description it is mapped to the conceptual schema and then to the internal schema. (c) Stephen Mc Kearney, 2003. 3 (c) Stephen Mc Kearney, 2003. 4

Purpose External Separate the user s application from the implementation of the database. Example In SQL we write a query to retrieve data from a database. A query states the tables which contain the data. A query does not state the names or locations of the files in which the tables are stored. Applications Implementation Describes a subset of the data Focuses on user groups Could be many external schema Example Payroll managers may see salary and timesheet data but not job data. Project managers may see job and timesheet data but not salary data. 5 6 The main purpose of the three schema architecture is to separate each user s view of the database from other users. Connelly et al give the following reasons why separating the user views is desirable: 1. s should be able to view the data in the form that best suits their needs. The same information may be viewed in more than one way. 2. s are not concerned with how the database has been physically implemented but instead are interested only in the content of the database. 3. The physical implementation of the database can be changed by the database administrator without affecting how the users view the data. 4. Changing the physical structures used to implement the database should not affect the logical structures in the database, for example, the tables or relations. 5. The global view of the database can be changed without affecting the users. Hence, new data may be added to the database without affecting existing users. Elmasri et al defines the external schema as the part of the database that a particular user group is interested in. The external schema also hides the rest of the database from that user group. Connolly et al defines the external schema as the user s view of the database. The external level describes the part of the database that is relevant to particular groups of users. In an external view, a user will only see the entities, relationships and attributes that are of particular interest to them. For example, they may see an employee s address but not an employee s salary. External views may represent the same data in different formats. For example, in a multi-national company dates may be represented differently depending on the conventions of the country using the external schemas. The external schema may also contain data that is calculated from the database but not actually stored in the database. (c) Stephen Mc Kearney, 2003. 5 (c) Stephen Mc Kearney, 2003. 6

Describes all the data Describes the data Not how its stored Example All the data for a company may be described in a single entityrelationships model. Physical details of database Describes the implementation Example How the data will be represented in the computer as a set of files and indexes. Describes the access paths that must be used to retrieve data. 7 8 The conceptual schema is a description of what is in the database. Elmasri et al defines the conceptual schema as the structure of the whole database for a community of users. Connolly et al defines the conceptual schema as the community view of the database. The conceptual schema describes the content of the whole database. Its purpose is to hide the details of how the database has been implemented in a particular database management system. The conceptual schema presents a high level view of the database using entities, relationships and attributes. It will also describe the security and integrity constraints of the whole database. The external schemas are extracted from the conceptual schema by selecting which entities will be visible in an external schema. The internal schema describes how the database is implemented. Elmasri et al defines the internal schema as describing the physical storage structure of the database. Connolly et al defines the internal schema as the physical representation of the database on the computer. The internal schema will describe the set of operating files and index structures that are used to store the data. The purpose of the internal schema is to allow the database administrator to achieve the optimal implementation of the database, for example, the maximum query performance or the minimum storage space usage. The internal schema will describe the mapping between database relations and files, the types of indexes used, the allocation of disc blocks to the database, the method of record placement for each relation and any data compression or encryption techniques to be used. There must be a mapping between the internal schema and the conceptual schema. This mapping will describe the relationship between operating system file structures and the entities and relationships in the conceptual schema. (c) Stephen Mc Kearney, 2003. 7 (c) Stephen Mc Kearney, 2003. 8

Overview Three- Architecture External Data Independence Physical independence Logical independence Data Independence The three schema architecture provides data independence. Data independence Upper levels are unaffected by changes in the lower levels Achieved because Only the mappings between levels need to change. 9 10 The architecture of a database management system refers to the design of the major components of the system and how they are related to each other. The commonest database architecture is the three-schema architecture, often called the ANSI-SPARC model. The three main components of the three-schema architecture describe three levels of abstraction within the database system: (1) external, (2) conceptual and (3) internal. The purpose of these abstraction levels is to provide data independence. That is, each level is separated from the level above it and the level below it. There are two types of data independence provided by the three-schema architecture: (1) physical independence and (2) logical independence. The three level architecture is important because it helps to provide data independence. Elmasri et al define data independence as the capacity to change the schema at one level of a database system without having to change the schema at the next higher level. For example, when the internal schema of the database is changed (by adding a new index, for instance) it is not necessary to change the entity-relationship description of the conceptual model. Sometimes it is necessary to change the mapping between the internal schema and the conceptual schema. For example, when a file is split in two and an entity is split between two files. However, in this example it is not necessary to change the definition of an entity only the mapping between the internal level and the conceptual level. When the internal schema changes it is not necessary to change application programs that only access the external schemas. In the Oracle database management system, the SQL query language provides data independence between the relational schema and the file structures of the Oracle database. There are two types of data independence: (1) logical independence and (2) physical independence. (c) Stephen Mc Kearney, 2003. 9 (c) Stephen Mc Kearney, 2003. 10

Logical Data Independence Changes in the conceptual schema do not require changes to the external schema Example Adding a new entity should not affect existing external schemas. Logical Independence 11 Physical Data Independence Changes to the internal schema do not require changes to the conceptual schema Example Adding a new index should not affect the entities and relationships. Changes to the internal schema may affect the speed of the database. Physical Independence 12 Logical data independence is provided by the mapping between the conceptual schema and the external schema. Elmasri et al defines logical data independence as the capacity to change the conceptual schema without having to change the external schema or application programs. Connolly et al defines logical data independence as the immunity of the external schema to changes in the conceptual schema. When new data item is added to the conceptual schema it is not necessary to change the external schema or application programs because the data they use is unaffected by the new data. For example, adding a new attribute salary to the entity employee will not affect existing external schemas. However, the external schemas will not know that the salary attribute exists. If the external schema is to show the new data, or the application programs are to use the new data, then they must be changed. When a data item is deleted from the conceptual schema then the external schemas and application programs that use the data item must be changed. This is because the data item is no longer available. Physical data independence is provided by the mapping between the internal schema and the conceptual schema. Elmasri et al defines physical data independence as the capacity to change the internal schema without having to change the conceptual (or external) schema. Connolly et al defines physical data independence as the immunity of the conceptual schema to changes in the internal schema. When the internal schema changes it is not necessary to change the conceptual schema. For example, adding a new index should have no effect on the structure of the entities and relationships in the conceptual schema. Changing the internal schema will frequently affect the performance of the database. For example, removing an index may slow down the speed of some queries. If information is actually removed from the internal schema, for example, a file is deleted, then this will affect the conceptual schema because the data belonging to an entity will be missing. (c) Stephen Mc Kearney, 2003. 11 (c) Stephen Mc Kearney, 2003. 12

3 Architecture & Oracle Oracle - Views, synonyms, security Tables Tables, objects Tablespaces, indexes, clusters Files, segments, extents 13 Oracle Concepts Manual The three schema architecture is a reference architecture. That is, it is a guide to how best to structure a large multi-user database. Although the Oracle Management System does not explicitly implement the three schema architecture, it does have a number of features that can be used to achieve a similar structre. Features: Tablespaces, indexes and clusters are available to control and manage the way that data is physically stored on disc. For example, indexes can be used to improve the performance of queries without affecting the conceptual schema of the database. Clusters can be used to store related data close together to improve performance. Clusters do not affect the conceptual schema. The conceptual schema is the most visible part of Oracle and consists of sets of tables. External The external schema can be created by creating views of the database and controlling the access and security permissions of each user. (c) Stephen Mc Kearney, 2003. 13 (c) Stephen Mc Kearney, 2003. 14

Oracle - External Oracle - Views Oracle Concepts Manual Oracle Concepts Manual (c) Stephen Mc Kearney, 2003. 15 (c) Stephen Mc Kearney, 2003. 16

Oracle - Oracle Concepts Manual (c) Stephen Mc Kearney, 2003. 17