+ All Categories
Home > Education > 01 dbms-introduction

01 dbms-introduction

Date post: 18-Oct-2014
Category:
View: 1,910 times
Download: 0 times
Share this document with a friend
Description:
 
43
1 DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew Database Management Systems Overview of Database Systems
Transcript
Page 1: 01 dbms-introduction

1DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Database Management Systems

Overview of Database Systems

Page 2: 01 dbms-introduction

2DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Overview of DB Systems• Objectives and Outline

– to study …• The definition of database systems• The importance of database systems• Data abstraction and database models• Database languages• Database system components• Users and creators of database systems• Database products and applications• Database research and trends

Page 3: 01 dbms-introduction

3DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Database Systems: Definition• A Database System (DBS) consists of

– A Database (DB) and– A Database Management System (DBMS)

– A Database is• a collection of well-organized and interrelated data

– A Database Management System is• a set of programs to manipulate those data

Page 4: 01 dbms-introduction

4DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Goals of DBMSs• To provide a way to store and retrieve database

information conveniently and efficiently.• DBMSs must meet the following requirements:

– Data Persistency• The data must outlast their creators

– System Reliability• The system must be able to recover correctly and promptly, if

crash– Scalability

• The system must be able to handle large numbers of dataand lots of users

Page 5: 01 dbms-introduction

5DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Management of Data

• DBMSs are responsible for management of data, which involves– defining structures for storing information (DDL)– providing mechanisms for manipulating information (DML)– ensuring the safety of the information stored, despite

system crashes (System Reliability) or attempts at unauthorized access (System Security)

– avoiding possible anomalous results if / when data are to be shared among several users (Concurrency Control)

– supporting large amount of data and concurrent users (Scalability)

Page 6: 01 dbms-introduction

6DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

The Importance of DB Systems• Before the advent of DB Systems

– File systems are used to store data.– File systems do not provide mechanisms for data

management– Programmers need to do a lot of data management

tasks• Defining data structures• Manipulating data: inserting, searching, updating,

deleting• Maintaining data consistency and data integrity• Handling data access permission• Controlling concurrent data access

Page 7: 01 dbms-introduction

7DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

File Systems vs. Database Systems

Data independenceTightly-couple data-program relationship

Data consistencyData redundancy

Short developmentLong development

Integrity constraintIntegrity problem

Concurrency controlConcurrent access anomaliesAuthorization mechanismSecurity problem

Ensure atomicityAtomicity problem

Simple data accessDifficult data access

Database SystemsFile Systems

Page 8: 01 dbms-introduction

8DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Disadvantages of DB Systems• Do not use a DB system if

– the DBMS does not support the types of queries or functionality required by the applications

• since the DBMS cannot fulfill the needs

• e.g., presentation, calculation– transaction support,

persistent storage, and many other dominant features that the DBMS provides are not needed

• since the DBMS imposes too high overhead

• e.g., data caching, logging

• Overhead of using a DB system– installation / configuration

overhead• difficult to setup

– operating overhead• concurrency control,

atomicity and durability guarantee, etc.

– price• hardware, software,

maintenance, and support

Page 9: 01 dbms-introduction

9DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Data Abstraction• A major purpose of a database system is to

provide users with an abstract view of the data. • The system hides certain details of how the data

are stored and maintained.• For ease of use, simple user interfaces are

provided to users.• For efficiency, complex data structures are

used to represent data in the database.

Page 10: 01 dbms-introduction

10DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

View of Data• There are multiple levels of data abstraction.• E.g., Data of a person can be viewed as …

– High-level: medical records, academic background– Intermediate-level: name (alphabetic), age (numeric),

gender (enumeration: Male/Female)– Low-level: sequences of bits, bytes, and blocks

• In 1978, “ANSI/SPARC” architecture defines three levels of data abstraction– External Level (View)– Conceptual Level (Logical) – Internal Level (Physical)

Page 11: 01 dbms-introduction

11DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

ANSI/SPARC Architecture

• In ANSI/SPARC Architecture, a database contains– View schemas

• describe different views of the database (External Level)– Logical schema

• describes the design at the logical level (Conceptual Level)– Physical schema

• describes the design at the physical level (Internal Level)• A Schema of a database

– Is the overall structures of the data in the database and their relationships

– Schemas change infrequently while data change consistently.

Page 12: 01 dbms-introduction

12DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Levels of Data Abstraction• View Level

– only parts of the entire database

• Logical Level– what data are stored in

the database and– what relationships exist

among those data.• Physical Level

– how data are actually stored

Page 13: 01 dbms-introduction

13DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Data Independence• Data Independence

– Lower-level schema changes will not effect upper-level schemas and applications

• Physical Data Independence– if physical schema changes do not affect application

programs.– That is, application programs do not depend on physical

schema (but depend on a logical schema or a view schema).• Logical Data Independence

– if logical schema changes do not affect application programs.– That is, application programs do not depend on logical

schema (but depend on some views).

DBMS

Page 14: 01 dbms-introduction

14DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DB Models and History• 1961, Charles Bachman (1973 Turing Award) designed GE’s

Integrated Data Store: IDS – the predecessor of Network Model.• Late 1960s, IBM built “Information Management System: IMS”

Hierarchical Model.• Late 1960s, CODASYL group defined/standardized Network Model.• 1969, Relational Model by Edgar Codd [IBM] (1981 Turing Award).• 1970s, SEQUEL (SQL), QBE; QUEL, System R (DB2), Ingres• 1976, Entity-Relationship Model by Peter Chen• 1980s, DB2, Oracle, Sybase, Informix, DBase, Paradox, …• 1986, SQL Standard• 1980s, distributed databases• 1998, James Gray received Turing Award in Transaction Management.• 1990s-2000s, OODB, ORDB (Postgres); Data Warehouse, OLAP,

Data Mining, GIS, Mobile DB, Multimedia DB, Web DB, XML DB, …

Page 15: 01 dbms-introduction

15DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Data Models

• Hierarchical Model – the first DB model – e.g., IMS, System 2000

• Network Model – DBTG standard; after IDS– e.g., IDMS, Total, …

• Relational Model – the most widely used now– e.g., System R, Ingres, …

• Entity-Relationship Model – a conceptual model

• Object-Oriented Model – mostly for special purposes– e.g., ObjectStore, Gemstone,

Ontos, O2, Jasmine, Cache, …

• Object-Relational Model – extends the relational model– e.g., Postgres, Informix, DB2,

Oracle, …• *Semi-structured Data*

– focus on data in XML format

Page 16: 01 dbms-introduction

16DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Data Models – DiagramsHierarchical and Network

customer account

custlinkname address number balance

dummyacctlink

customer accountname address number balance

Network data-structure diagram

DBTG data-structure diagram

own

customer accountname address number balance

Hierarchical tree-structure diagram

virtual customervirtual account

Page 17: 01 dbms-introduction

17DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Data Models – DiagramsRelational, ER, OO

customer accountown

name balanceaddress number

Entity-Relationship diagram# name

address# number

balance# name# number

Relational schema diagram

customer accountowner

customernameaddress

accountnumberbalance

UML class diagram (OO Model)

0..*1..*

Page 18: 01 dbms-introduction

18DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Database Languages• Data Definition Language (DDL)

– to specify the database schema.– Database schemas are stored in the data dictionary.– The data dictionary contains metadata.– Metadata: data about data, e.g. schema.

• Data Manipulation Language (DML)– to express database queries and updates (include

insertion, deletion, and modification)– Procedural DMLs -and- Declarative DMLs

Page 19: 01 dbms-introduction

19DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DB Languages: Examples

Hierarchical Model (DL/I):DML:get first customer where customer.name:=“Henry”;

Network Model (DBTG):DDL:set name is custlink

owner is customer member is dummy;

DML:customer.name := “Newton”;find any customer using name;get customer;print(customer.address);

Relational Model (SQL):DDL:create table customer (

name char(30),address char(60));

DML:select address from customerwhere name likes “Robert”;

Object-Oriented Model (ODMG):DDL:class customer:public object {

string name;string address;set<ref<account>> accounts;

};

Page 20: 01 dbms-introduction

20DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Data Manipulation Languages

• Procedural DMLs– require a user to specify what data are needed and how to get

those data– e.g., relational algebra; (C, Pascal, Java, etc.)

• Declarative DMLs (nonprocedural DMLs)– require a user to specify what data are needed without specifying

how to get those data– e.g. relational tuple calculus, relational domain calculus,

SQL (core), Quel, QBE, Datalog; (Prolog)• A Query Language

– is a part of DML that involves only retrieval of information (without updates)

– However, a query language often means DML

Page 21: 01 dbms-introduction

21DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

What are the components of DBMSs?

• A database system – is partitioned into modules that deal with each of the

responsibilities of the overall system.• The functional components of a database system can be

broadly divided into – the Query Processor Component: to simplify and facilitate

access to data (convenient and efficient)– the Storage Manager Component: to minimize the need to

move data between disk and main memory– the Transaction Manager Component: to handle atomicity

and concurrency of transactions and consistency and durability of the databases

Page 22: 01 dbms-introduction

22DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Query Processor Component• Query Processor:

– A program module that provides the interface between the database and the application programs/queries

• Components include:– DDL interpreter

• interprets DDL commands and records them in the data dictionary

– DML compiler• translates DML commands into query evaluation

plans – Query evaluation engine

• executes queries according to the plans

Page 23: 01 dbms-introduction

23DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Storage Manager Component• A Storage Manager is

– A program module that provides the interface between the low-level data stored in the database and the application programs/queries submitted to the system

• Components include:– Authorization and integrity manager– File manager– Buffer manager

• Structures maintained: – data files, data dictionary, indices

Page 24: 01 dbms-introduction

24DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Transaction Manager Component• Transaction:

– a collection of operations that performs as a single logical function in a database application.

• Transaction Properties: ACID–– A A tomicity: either all operations succeed or all of them fail–– C C onsistency: the database is changed from one consistent

state to another consistent state–– I I solation: no transaction interfere other transactions in the

middle–– D D urability: operations of successful transactions must persist

• Components include– Transaction Manager– Lock Manager– Recovery Manager

Page 25: 01 dbms-introduction

25DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DB System Structure

storagemanager

buffermanager

concurrency control

lock manager

transaction managerrecoverymanager

DDL interpreterquery processor and optimizer

DML compilerAPI module

data

index

data dictionary

applicationprograms

queries schemas

Page 26: 01 dbms-introduction

26DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Who interact with DBMSs?

• Database Administrators (DBAs)• Database Operators• Database Designers• DB Application Developers/Programmers • End Users

– Sophisticated End Users– Naïve End Users

• DB System Designers and Implementers• Database Tool Developers

Page 27: 01 dbms-introduction

27DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DB Administrators (DBAs)and DB Operators

• DBAs are responsible for– Starting up and shutting down the databases– Loading, importing, exporting data to/from the

databases– Granting of authorization for using resources– Monitoring the use of the resources– Backing up the databases periodically and restoring

the databases as needed– Tuning the system performance – Considering software and hardware upgrades

• DB Operators are responsible for– {Helping DBAs maintaining normal DB operations}

Page 28: 01 dbms-introduction

28DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DB Designers andDB Developers / Programmers

• Database Designers are responsible for– Analyzing data requirements– Designing the database structures

• View, logical, and physical structures– Creating the databases

• DB Application Developers / Programmers– Analyzing functional requirements– Developing program specifications from the

requirements– Implementing those application programs

Page 29: 01 dbms-introduction

29DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

End Users

• Sophisticated End Users– Writing ad hoc queries to answer their own needs– Running ad hoc reports for executives/managers

• Naïve End Users– Using customized applications developed by

developers/programmers• Data entry operators, …• Executives, managers, …

Page 30: 01 dbms-introduction

30DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Participants on the implementation side of the database systems

• DB System Designers and Implementers– Designing the structures and the functions of each

component of the DBMSs– Implementing database components

• File organizations, index structures, query processing, transaction management, DB API, user interface, …

• DB Tool Developers– Designing and implementing tools for databases

• Database design tools, application development tools, performance tuning tools, database administration tools, …

Page 31: 01 dbms-introduction

31DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Very Important Participants

• Leaders in DB Industry– Oracle

• ORACLE, RDB

– IBM• DB2, Informix

– Microsoft• SQL Server, Access, FoxPro• ODBC, ADO

– Sybase• Sybase

• Leaders in DB Research– Leading Universities

• Stanford U.• UC Berkeley {Ingres, Postgres}• U of MD - College Park • U of Wisconsin - Madison

– Research Labs• IBM {System R, SQL, …}• Microsoft• Bell Lab

– Conferences/Journals• SIGMOD/POD, VLDB, EDBT,

ICDE, RIDE, TKDE, …

Page 32: 01 dbms-introduction

32DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DBMS Market Share

32.0%33.8%33.8%31.4%ORACLE

–3.0%?Informix2.6%3.2%?Sybase

14.9%30.1%

20008.8 B

16.3%13.1%Microsoft34.6%34.6%29.9%IBM

20018.8 B

19997.9 B

Revenue35.4%19.9%38.1%38.1%

20002.4 B

39.9%39.9%20.7%34.0%

20012.5 B

35.2%Microsoft15.2%IBM40.4%ORACLE

1999WindowsRevenue

–6.7%Informix24.7%63.3%63.3%

20013.0 B

14.4%IBM66.2%66.2%ORACLE

20003.6 B

UnixRevenue

Source: Gartner DataquestGartner Dataquest

New LicensesRevenue in Billion USD

Page 33: 01 dbms-introduction

33DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Some Database Related Products

• Commercial Products– Relational: Access, DB2, DBASE, FoxPro, Informix, Interbase,

ORACLE, Paradox, RDB, SQL Server, Sybase, ThinkDB, UniSQL, etc.

– OO: Cachè, Exodus, Gemstone, Iris, Jasmine, O2, Objectivity, ObjectStore, ODE, ONTOS, Orion, Versant, etc.

– Hierarchical: IMS

• Free/Open Source Products– Ingres, mSQL, MySQL, Postgres, etc.

• Database APIs– ODBC, JDBC, ADO, …

Page 34: 01 dbms-introduction

34DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Examples of DB System Applications

• Accounting• Airlines• Banking• Finance• Hospitals• Human Resources• Inventory

• Manufacturing• Telecommunication• Tourism• Transportation• Sales• Universities• … (you name it) …

Page 35: 01 dbms-introduction

35DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Trends of Database Products

• Past and Present: to support large amount of data and concurrent users– data management of

well-structured data– on-line transaction

processing (OLTP)

– “Scalability”

• Present and Future: A Complete System– multimedia/complex data

management– advanced OLTP: workflow– application development tools – data repository: warehouse, data

mart– data analysis tools:

• Online Analytical Processing (OLAP)

• Data Mining– a well-rounded system

• web-enable, network-enable, • XML-compliant, multi-model

Page 36: 01 dbms-introduction

36DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DBMS Architectures• Based on the number of users:

– Single-user Systems• Only one user (one session) uses the system at a time

– Multi-user Systems• Multiple users use the system at the same time

• Based on the locations of the databases and their users– Stand-alone DBMSs

• One DBMS supports its user(s) on the same machine– Client-Server (Centralized) DBMSs

• One database server serves multiple clients– Distributed DBMSs

• Coordination of multiple DBMSs

Page 37: 01 dbms-introduction

37DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Distributed DB Systems• Distributed DBMSs

– Homogeneous Database Systems• Multiple subsystems which are of the same

architectures spread around multiple remote sites – E.g., A system of multiple ORACLE on multiple computers at

multiple remote sites

– Heterogeneous Database Systems • Multiple systems which are of different architectures

– E.g., A system of one DB2 + one SQL Server

– Federated Database Systems– Also known as Multidatabase Systems

• A kind of Heterogeneous Database Systems where each DBMS of the whole system has their own autonomy

Page 38: 01 dbms-introduction

38DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Distributed DBMSs

ORACLEDB2ORACLE

ORACLE

ORACLE

SQL Server

Homogeneous

Heterogeneous

Federated DBMS

Page 39: 01 dbms-introduction

39DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

DB Application Architectures• Client-Server (C/S)

– Client machine: the database users work– Server machine: the database system runs

• C/S: Two-tier architecture: small systems– Client: the DB users and the DB application– Server: the DB system

• C/S: Three-tier architecture: large systems, web– Client sends requests to the application server– Application Server runs the application as a server for

the client and as a client of the database server– Database Server runs the DBMS

Page 40: 01 dbms-introduction

40DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Client/Server Architecture

Database Layer

Business Logic Layer

PresentationLayer1

43

2

Database Layer Application Layer1

2Three-TierArchitecture

Two-Tier Architecture

Page 41: 01 dbms-introduction

41DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

What architectures are they?• A DBMS on a mainframe with multiple users; one on

each terminal?

• A DBMS on a PC running a web server that accesses the DBMS to provide services to its users?

• A system connecting DBMSs of multiple companies together?

• A system with a java application running on a web browser that sends requests to the web server which accesses a database on another machine?

Page 42: 01 dbms-introduction

42DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Specialized/Advanced DBMSs

• Active DB Systems• Data Warehouses• Deductive DB Systems• Genome DB Systems• Geographic Information

Systems• Main Memory DB

Systems• Mobile DB Systems

• Multimedia DB Systems• Parallel DBMSs• Text DB Systems• Temporal DB Systems• Spatial DB Systems• Spatio-temporal DB

Systems• XML DB Systems

Page 43: 01 dbms-introduction

43DBMS: Overview of DB Systems Dr. Kriengkrai Porkaew

Conclusion

Questions and AnswersQuestions and Answers


Recommended