Database System Concepts



Similar documents
Chapter 1: Introduction

Chapter 1: Introduction. Database Management System (DBMS)

Introduction to database management systems

Chapter 1: Introduction. Database Management System (DBMS) University Database Example

Introdução às Bases de Dados

Lesson 8: Introduction to Databases E-R Data Modeling

Chapter 1: Introduction

CSE 132A. Database Systems Principles

ECS 165A: Introduction to Database Systems

1 File Processing Systems

CSE 233. Database System Overview

æ A collection of interrelated and persistent data èusually referred to as the database èdbèè.

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

COMP5138 Relational Database Management Systems. Databases are Everywhere!

Chapter 2 Database System Concepts and Architecture

Foundations of Information Management

Foundations of Information Management

Author: Abhishek Taneja

Database System Architecture & System Catalog Instructor: Mourad Benchikh Text Books: Elmasri & Navathe Chap. 17 Silberschatz & Korth Chap.

DATABASE SYSTEM CONCEPTS AND ARCHITECTURE CHAPTER 2

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN INFORMATION AND COMMUNICATION TECHNOLOGY

Database Concepts. Database & Database Management System. Application examples. Application examples

Core Syllabus. Version 2.6 B BUILD KNOWLEDGE AREA: DEVELOPMENT AND IMPLEMENTATION OF INFORMATION SYSTEMS. June 2006

CS2Bh: Current Technologies. Introduction to XML and Relational Databases. Introduction to Databases. Why databases? Why not use XML?

Overview of Data Management

Principles of Database. Management: Summary

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur

Chapter 1 Databases and Database Users

Database System. Session 1 Main Theme Introduction to Database Systems Dr. Jean-Claude Franchitti

Copyright 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Chapter 1 Outline


DBMS Questions. 3.) For which two constraints are indexes created when the constraint is added?

IT2305 Database Systems I (Compulsory)

DATABASE MANAGEMENT SYSTEMS. Question Bank:

Overview of Database Management

City University of Hong Kong. Information on a Course offered by Department of Computer Science with effect from Semester A in 2014 / 2015

Course: CSC 222 Database Design and Management I (3 credits Compulsory)

Relational Database Systems 2 1. System Architecture

THE OPEN UNIVERSITY OF TANZANIA FACULTY OF SCIENCE TECHNOLOGY AND ENVIRONMENTAL STUDIES BACHELOR OF SIENCE IN DATA MANAGEMENT

Topics. Introduction to Database Management System. What Is a DBMS? DBMS Types

Database Management Systems

Database Systems. Session 1 Main Theme Introduction to Database Systems Dr. Jean-Claude Franchitti

Introduction. Introduction: Database management system. Introduction: DBS concepts & architecture. Introduction: DBS versus File system

14 Databases. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

INTRODUCTION DATABASE MANAGEMENT SYSTEMS

Database Systems Introduction Dr P Sreenivasa Kumar

2. Basic Relational Data Model

CSE 530A Database Management Systems. Introduction. Washington University Fall 2013

Introduction: Database management system

Objectives. Distributed Databases and Client/Server Architecture. Distributed Database. Data Fragmentation

DATABASE MANAGEMENT SYSTEM

BCA. Database Management System

COMPONENTS in a database environment

IT2304: Database Systems 1 (DBS 1)

Introduction to Databases

Lecture 1 Database Systems: An Introduction

Introductory Concepts

Chapter 3. Database Environment - Objectives. Multi-user DBMS Architectures. Teleprocessing. File-Server

Overview of Database Management Systems

Bridge from Entity Relationship modeling to creating SQL databases, tables, & relations

? Database Management

Textbook and References

Introduction to Database Systems

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

Week 1 Part 1: An Introduction to Database Systems. Databases and DBMSs. Why Use a DBMS? Why Study Databases??

Module 4 Creation and Management of Databases Using CDS/ISIS

BCS Higher Education Qualifications. Database Systems Syllabus

1. INTRODUCTION TO RDBMS

Demystified CONTENTS Acknowledgments xvii Introduction xix CHAPTER 1 Database Fundamentals CHAPTER 2 Exploring Relational Database Components

Conventional Files versus the Database. Files versus Database. Pros and Cons of Conventional Files. Pros and Cons of Databases. Fields (continued)

not necessarily strictly sequential feedback loops exist, i.e. may need to revisit earlier stages during a later stage

DATABASE DESIGN. - Developing database and information systems is performed using a development lifecycle, which consists of a series of steps.

Database Management. Chapter Objectives

Chapter 1 File Organization 1.0 OBJECTIVES 1.1 INTRODUCTION 1.2 STORAGE DEVICES CHARACTERISTICS

CS 4604: Introduc0on to Database Management Systems

CSE 562 Database Systems

B.Com(Computers) II Year RELATIONAL DATABASE MANAGEMENT SYSTEM Unit- I

Objectives of Lecture 1. Labs and TAs. Class and Office Hours. CMPUT 391: Introduction. Introduction

Course Notes on Databases and Database Management Systems

Application of XML Tools for Enterprise-Wide RBAC Implementation Tasks

How To Manage Data In A Database System

Carnegie Mellon Univ. Dept. of Computer Science Database Applications. Outline. We ll learn: Faloutsos CMU SCS

Chapter 2: Entity-Relationship Model. E-R R Diagrams

Database Design. Marta Jakubowska-Sobczak IT/ADC based on slides prepared by Paula Figueiredo, IT/DB

II. PREVIOUS RELATED WORK

Contents RELATIONAL DATABASES

Introduction to Databases

Module 3: File and database organization

Databases What the Specification Says

Database Management System

Files. Files. Files. Files. Files. File Organisation. What s it all about? What s in a file?

Modern Databases. Database Systems Lecture 18 Natasha Alechina

The Structured Query Language. De facto standard used to interact with relational DB management systems Two major branches

DISTRIBUTED AND PARALLELL DATABASE

Introduction to Database Systems. Module 1, Lecture 1. Instructor: Raghu Ramakrishnan UW-Madison

Gestão e Tratamento da Informação

History of Database Systems

Commercial Database Software Development- A review.

Elena Baralis, Silvia Chiusano Politecnico di Torino. Pag. 1. Query optimization. DBMS Architecture. Query optimizer. Query optimizer.

Transcription:

s Design Chapter 1: Introduction Departamento de Engenharia Informática Instituto Superior Técnico 1 st Semester 2008/2009 Slides (fortemente) baseados nos slides oficiais do livro c Silberschatz, Korth and Sudarshan.

Outline s Design 1 s What is a DBMS? 2 Data Abstraction Levels Data Models Languages 3 DBMS Components 4 Design Design Users of s

Outline s What is a DBMS? Design 1 s What is a DBMS? 2 3 4 Design

(DBMS) s What is a DBMS? Design DBMS contains information about a particular enterprise Collection of interrelated data Set of programs to access the data An environment that is both convenient and efficient to use Applications: Banking: all transactions Airlines: reservations, schedules Universities: registration, grades Sales: customers, products, purchases Online retailers: order tracking, customized recommendations Manufacturing: production, inventory, orders, supply chain Human resources: employee records, salaries, tax deductions s touch all aspects of our lives

Why s? s What is a DBMS? Design In the early days, database applications were built directly on top of file systems Drawbacks of using file systems to store data: Data redundancy and inconsistency Multiple file formats, duplication of information in different files Difficulty in accessing data Need to write a new program to carry out each new task Integrity problems Integrity constraints (e.g. account balance > 0) become buried in program code rather than being stated explicitly Hard to add new constraints or change existing ones

Why s? (cont.) s What is a DBMS? Design Drawbacks of using file systems (cont.) Atomicity of updates Failures may leave database in an inconsistent state with partial updates carried out Example: Transfer of funds from one account to another should either complete or not happen at all Concurrent access by multiple users Concurrent accessed needed for performance Uncontrolled concurrent accesses can lead to inconsistencies Example: Two people reading a balance and updating it at the same time Security problems Hard to provide user access to some, but not all, data systems offer solutions to all the above problems

Outline s Data Abstraction Levels Data Models Languages Design 1 s 2 Data Abstraction Levels Data Models Languages 3 4 Design

Levels of Abstraction s Data Abstraction Levels Data Models Languages Design We can separate the way we view a database in several levels Physical level: describes how a record (e.g., customer) is stored. Logical level: describes data stored in database, and the relationships among the data. View level: application programs hide details of data types. Views can also hide information (such as an employee s salary) for security purposes.

View of Data s An architecture for a database system Data Abstraction Levels Data Models Languages Design

Data Independence s Data Abstraction Levels Data Models Languages Physical Data Independence - the ability to modify the physical schema without changing the logical schema Applications depend on the logical schema In general, the interfaces between the various levels and components should be well defined so that changes in some parts do not seriously influence others. Design

Instances and Schemas s Data Abstraction Levels Data Models Languages Design Similar to types and variables in programming languages Schema - the logical structure of the database Example: The database consists of information about a set of customers and accounts and the relationship between them) Analogous to type information of a variable in a program Physical schema: database design at the physical level Logical schema: database design at the logical level Instance - the actual content of the database at a particular point in time Analogous to the value of a variable

Data Models s Data Abstraction Levels Data Models Languages Design A collection of tools for describing Data Data relationships Data semantics Data constraints Examples: Relational model Entity-Relationship data model (mainly for database design) Semistructured data model (XML) Object-based data models (Object-oriented and Object-relational)

Relational Model s Data Abstraction Levels Data Models Languages Example of tabular data in the relational model Design

The Entity-Relationship Model s Data Abstraction Levels Data Models Languages Models an enterprise as a collection of entities and relationships Entity: a thing or object in the enterprise that is distinguishable from other objects Described by a set of attributes Relationship: an association among several entities Represented diagrammatically by an entity-relationship diagram: Design

XML: Extensible Markup Language s Data Abstraction Levels Data Models Languages Design Defined by the WWW Consortium (W3C) Originally intended as a document markup language The ability to specify new tags, and to create nested tag structures made XML a great way to exchange data XML has become the basis for all new generation data interchange formats A wide variety of tools is available for parsing, browsing and querying XML documents/data <bank> <account> <account_number> A-101 </account_number> <branch_name> Downtown </branch_name> <balance> 500 </balance> </account>...

Data Manipulation and Definition Languages s Data Abstraction Levels Data Models Languages Design Data Manipulation Language (DML) Language for accessing and manipulating the data organized by the appropriate data model Also known as query language SQL is the most widely used query language Data Definition Language (DDL) Specification notation for defining the database schema DDL compiler generates a set of tables stored in the database

SQL s Data Abstraction Levels Data Models Languages Design SQL: widely used non-procedural language Example: find the name of the customer with customer-id 192-83-7465 select customer.customer_name from customer where customer.customer_id = 192-83-7465 Example: creating the account table create table account ( account-number char(10), balance integer ) Application programs generally access databases through A language extension to allow embedded SQL An application program interface which allow SQL queries to be sent to a database

Outline s DBMS Components Design 1 s 2 3 DBMS Components 4 Design

Overall Structure s DBMS Components Design

s s DBMS Components Design The architecture of a database systems is greatly influenced by the underlying computer system on which the database is running: Centralized Client-server Parallel (multi-processor) Distributed

Storage s DBMS Components Design Storage manager is a program module that provides the interface between the low-level data stored in the database and the application programs and queries submitted to the system. The storage manager is responsible to the following tasks: Interaction with the file manager Efficient storing, retrieving and updating of data Issues: Storage access File organization Indexing and hashing

Query Processing s 1 Parsing and translation 2 Optimization 3 Evaluation DBMS Components Design

Query Processing (cont.) s DBMS Components Design Cost difference between a good and a bad way of evaluating a query can be enormous Need to estimate the cost of operations Depends critically on statistical information about relations which the database must maintain Need to estimate statistics for intermediate results to compute cost of complex expressions Alternative ways of evaluating a given query Equivalent expressions Different algorithms for each operation

Transaction s DBMS Components Design A transaction is a collection of operations that performs a single logical function in a database application Transaction-management component ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures. Concurrency-control manager controls the interaction among the concurrent transactions, to ensure the consistency of the database.

Outline s Design Design Users of s 1 s 2 3 4 Design Design Users of s

Design s Design Design Users of s The process of designing the general structure of the database: Logical Design - Deciding on the database schema. design requires that we find a good collection of relation schemas. What attributes should we record in the database? What relation schemas should we have and how should the attributes be distributed among the various relation schemas? Physical Design - Deciding on the physical layout of the database

Application s s Design Design Users of s

Users s Design Design Users of s Users are differentiated by the way they expect to interact with the system Application programmers - interact with system through DML calls Sophisticated users - form requests in a database query language Specialized users - write specialized database applications that do not fit into the traditional data processing framework Naïve users - invoke one of the permanent application programs that have been written previously Examples, people accessing database over the web, bank tellers, clerical staff

Administrator s Design Design Users of s Coordinates all the activities of the database system; the database administrator has a good understanding of the enterprise s information resources and needs. administrator s duties include: Schema definition Storage structure and access method definition Schema and physical organization modification Granting user authority to access the database Specifying integrity constraints Acting as liaison with users Monitoring performance and responding to changes in requirements

s End of Chapter 1 Design Design Users of s