Introduction to Database Management Systems

17
Introduction to Database Management Systems

description

 

Transcript of Introduction to Database Management Systems

Page 1: Introduction to Database Management Systems

Introduction to Database Management Systems

Page 2: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 2

Chapter 1: Introduction

Evolution of Database Management SystemsOverview of Database Management SystemsDatabase-System Design

Page 3: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 3

Database Management System (DBMS)

Databases touch all aspects of our lives DBMS:

Collection of interrelated dataSet of programs to access the data

Convenient and efficient processing of dataDatabase Applications

Page 4: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 4

Evolution of Database Systems

Early days: database applications built on top of file systemsDrawbacks of using file systems to store data:

Data redundancy and inconsistencyDifficulty in accessing dataAtomicity of updates Concurrency controlSecurityData isolation — multiple files and formatsIntegrity problems

Page 5: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 5

Abstraction

View level: application programs hide details of data types. Logical level: what data are type employee = record

name : string;address : string;salary: real;

end;Physical level: how data are stored

Page 6: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 6

Data Models

A collection of tools for describing Data Relationships among data itemsSemantics of stored dataDatabase constraints

Page 7: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 7

Data Models

Entity-Relationship modelRelational modelOther models:

Network HierarchicalObject-orientedSemi-structured

Page 8: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 8

Database Management Systems

Smaller and smaller systemsPast: large and expensive DBMSPresent: DBMS in most personal computers

More and more data storedPast: few MBPresent: terabyte (1012 bytes), petabyte (1015 bytes)

Page 9: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 9

Application Architectures

Two-tier architecture Three-tier architecture

Page 10: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 10

Database Users

Users are differentiated by the way they interact with the system

Database Administration: responsible for the structure or schema of the database (DDL), coordinates all activities regarding the databaseApplication programmers – interact with system through DML callsSophisticated users – form requests in a database query languageNaive users – invoke one of the permanent application programs that have been written previously

Page 11: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 11

Data Definition Language (DDL)

Defines the database schema and constraintsDDL compiler data dictionary Metadata – data about data

Page 12: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 12

Data Manipulation Language (DML)

Accessing and manipulating the dataDML – query language

Query Languages Procedural – user specifies what data is required and how to get those data Nonprocedural – user specifies what data is required without specifying how to get those data

SQL: nonprocedural query language

Page 13: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 13

Transaction Management

Transaction: unit of work to be executed atomically and in isolation from other transactionsTransaction-manager: ensures that the database remains in a consistent

system failures transaction failures

Concurrency-control: interaction among the concurrent transactions to ensure consistency

Page 14: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 14

ACID Properties

Atomicity: all-or-nothing of the transaction’s effect will take placeConsistency: each transaction leaves the system in a consistent stateIsolation: each transaction must appear to be executed as if no other transactions are executed at the same timeDurability: effect of a transaction must never be lost after the transaction is completed

Page 15: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 15

Transaction Processing

Logging:Log managerRecovery manager

Concurrency controlMultiple transactionsLocking protocols

Deadlock resolution

Page 16: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 16

Database System Studies

Design of the databaseWhat to store, structure, semanticsFunctionality requirementTrade offsSecurity

Database programmingHow to express database operations, capability requirements, etc.

Database implementationQuery, transaction processing, storage, efficiency

Page 17: Introduction to Database Management Systems

Farkas CSCE 520 - Spring 2003 17

Next Class: Entity Relationship Model (Cont.)

E-R model of real worldEntities (objects) Attributes of entitiesRelationships between entities

Widely used for database designE-R model usually converted to design in the relational model