Você está na página 1de 31

MBA S0906 DATABASE

MANAGEMENT SYSTEMS
Unit 1 - INTRODUCTION

 Characteristics of data base approach


 Advantages of using a DBMS, Data Models
 Schemas and Instances
 DBMS architecture and Data Independence
 Database system environment,
 Classification of DBMS
E ntity Relationship model, Relational models
Characteristics of data base approach
Definitions
Database: A collection of related data.

Data: Known facts that can be recorded and have an implicit meaning.

Mini-world: Some part of the real world about which data is stored in
a database.
For example, student grades and transcripts at a university.

Database Management System (DBMS): A collection of software to


facilitate the creation and maintenance of a DB.

Database System: The DBMS software together with the data.


Sometimes, applications are also included.
Problems with files

– Redundancy
• number of files grows with
applications, and data is
duplicated
– Inconsistency
• data is updated in one
application’s files, but not
in another’s
– Maintenance problems
• changes to data structures
mean changes to many
programs
– Difficulty combining data
• business needs may mean
users want data from
different applications
DB Time Line
Web-based
Data Warehousing
Client-server

multimedia
heterogeneous
Data Management object-oriented
Capability expert, distributed

SQL Standard
Commercial DBMS

PC DBMS
ER model
network model

Relational Model: Codd

Hierarchical: IMS

file management
magnetic tape

1945 1961 1970 1976 1980 1985 1990 2000


Database Approach
Order Dept. Accounting Payroll
Dept. Dept.

Program Program Program

A B C

Ordering
Invoicing Payroll
filing
System System
System

Back Inventory Customer Inventory Employee


Orders Master Master Pricing Master
file file file file file
Main Characteristics of the Database Approach

• Self-describing nature of a database system:


A DBMS catalog stores the description of the database. The description is
called meta-data). This allows the DBMS software to work with different
databases.
• Insulation between programs and data:
Called program-data independence. Allows changing data storage
structures and operations without having to change the DBMS access
programs.
• Data Abstraction:
A data model is used to hide storage details and present the users with a
conceptual view of the database.
• Support of multiple views of the data:
Each user may see a different view of the database, which describes only
the data of interest to that user.
• Sharing of data and multi-user transaction processing:
Allowing a set of concurrent users to retrieve and to update the database.
Concurrency control within the DBMS guarantees that each transaction is
correctly executed or completely aborted.
• OLTP
(Online Transaction Processing) is a major part of database applications.
Advantages of Using the Database Approach
• More information from given • Providing backup and recovery
data services.
• Ad hoc queries can be • Providing multiple interfaces to
performed different classes of users.
• Redundancy can be reduced • Representing complex
• Inconsistency can be avoided relationships among data.
• • Enforcing integrity constraints
Security restriction can be
on the database.
applied
• Drawing Inferences and Actions
• Data independence
using rules
– more cost-effective: reduced
• Providing persistent storage for
development time, flexibility, program objects
economies of scale
• Providing storage structures for
• Controlling redundancy in data efficient query processing
storage and in development
and maintenance.
• Sharing of data among multiple
users.
Data Model
• Data model
– A data model is a particular way of conceptually organizing multiple
data files in a database
• Other common models
– Hierarchical
– Network
– Relational
– Object
Network model
Network data model
Relationships:
• one-to-one
• one-to-many Class
• many-to-one
• many-to-many

• Advantages Student Instructor


– flexible, fast,
efficient
• Disadvantages
– Complex
– Restructuring can Grade ID Department
be difficult
because of
changing all the
pointers
Hierarchical database model

Class

Student Instructor

Grade ID Department

• Advantages
• Parent-child relationship: – easy to search
– one-to-one – add new branches easily
• Disadvantages
– one-to-many
– Must establish the types of search prior to
development of the hierarchical structure
Relational database model

• Stores both
– Data about real
world objects
(entities) in tables
– Relationships
between the
tables
Relational database

• Fields (columns) in the table


store attributes.
– Each attribute has a specific
domain.
• Tuples (or records or rows) in
the table store information.
– Each tuple is a unique
instance of an object.
• Tables are composed of a set
of tuples.
– A table is also called a
relation.
Object DBMS

• ODBMS have the


advantage that objects
can be stored directly
• Object databases are
closely linked to
programming
languages with ways of
navigating through the
database
DBMS Schema
• Ultimately data in databases is stored in
files, but their structure is hidden

External Schema The view on data used by


application programs.

Conceptual Schema The logical model of data that is


separate from how it is used.

Internal Schema The physical storage of data in


files and indexes.
Schemas versus Instances
• Database Schema:
– The description of a
database.
– Includes descriptions of the
database structure, data
types, and the constraints on
the database.
• Database State:
– The actual data stored in a
database at a particular
moment in time. This
includes the collection of all
the data in the database.
– Also called database instance
– It changes very frequently
(every update of the DB)

16
DBMS Architectures
Centralized DBMSs
Terminals Display monitor Display monitor
... Display monitor

Application
Programs
Terminal
display control
Tex editors
...
SOFTWARE
DBMS Compilers
...
OPERATING SYSTEM

CPU Controller Controller Controller


...
HARDWARE/FIRMWARE
Memory Disk I/O devices
...
17
Basic Client/Server Architecture
 Applied for network with
 PCs, workstations, printers, file servers, database servers, web
servers, etc
 Specialized server with specific functionalities
 Many clients access specialized server
 Client machine provide interfaces
 Utilizes processing power of the clients

Diskless client Client with disk Server Server and client

...
SERVER SERVER

CLIENT CLIENT CLIENT

Site 1 Site 2 Site 3 Site n

Communication Network
18
Two-Tier Architecture

 Relational DataBase Management Systems (RDBMS)


 Query Server/Transaction Server/SQL Server
 Open DataBase Connectivity (ODBC)
 Application Program Interface (API)

 Client/server approach in OO-DBMS: Data Server

Controller Controller Controller


...
Network

Memory Disk I/O devices


...
19
Three-Tier Architecture
GUI Web
Client
 User interface Interface

 Application rules
 Middle tier Application Application
 Application server/Web Server or Web Programs, Web
server Server Pages

 Data access
Database
Database Server Management
System

20
DBMS Classifications
DBMS Classification Based on Data Model
 Relational data model
 Object data model
 Object-relational data model
 Extended-relational model
 XML Model
 Hierarchical data model
 Network data model

21
DBMS Classification Based on Number of
Users

 Single-user systems
 Multi-user systems

22
DBMS Classification Based on Number of
Sites

 Centralized systems
 Distributed DBMSs (DDBMS)
Homogeneous DDBMS
Heterogeneous DBMS (Federated DBMS/multi-
database systems)

23
DBMS Classification – More Criteria
 Cost
 Type of access path
 Purpose
General purpose
Special purpose
E.g. Airline system (OLTP – Online transaction
processing systems)

24
Database System Environment

Users/Programmers

Application Programs/Queries

DBMS
Software
Software to Process Queries/Programs

Software to Access Stored Data

Stored DB
Stored
Definition
Database
(Meta-Data)
Classification of DBMS
• Based on the data model used
– Traditional: Relational, Network, Hierarchical.
– Emerging: Object-oriented, Object-relational.
• Other classifications
– Single-user (typically used with personal computers)
vs. multi-user (most DBMSs).
– Centralized (uses a single computer with one database)
vs. distributed (uses multiple computers, multiple databases)
– Distributed DBMS (database and software distributed over many sites

Variations of Distributed DBMSs

• Homogeneous DDBMS
– DDBMS uses the same DBMS over many sites.
• Heterogeneous DDBMS
– Applications accessing databases on different DBMS.
• Federated or Multidatabase Systems
– Participating DBMS are loosely coupled.
• Distributed Database Systems have become client-server based database
systems because:
– They do not support a totally distributed environment, but rather a set
of database servers supporting a set of clients. 26
RDBMS Features
• Data Definition Language (DDL)
• Data Manipulation Language
(DML)
• Integrity Constraints
• Transaction Management
• Concurrency
• Security
• Tuning of Storage

Relationships
• Link between entities.
• A relationship may define constraints.
– E.G, a person can only have one SSN.
Advantages of RDBMS
• Eliminate unnecessary duplication of data
• Enforce data integrity through constraints
• Changes to conceptual schema need not affect
external schema
• Changes to internal schema need not affect the
conceptual schema
• Many tools are available to manage the database
Disadvantages of RDBMS
• To store objects (e.g., drawings) in a relational
database, the objects have to be ‘flattened’ into
tables
– e.g., a digital representation of a parcel must be separated
from the behaviour of other parcels
• Complex objects have to be taken apart and the parts
stored in different tables
• When retrieved from the database, the object has to
be reassembled from the parts in different tables
Other Types of DBMS
• Object DBMS
– store objects as objects
– designed to handle complex nested objects for
graphical and multimedia applications
• Object-relational DBMS
– hybrid databases that can store data in tables but
can also store objects in tables
Summary

Common Textbook Alternate Object word


word word word
Table Relation File or Data set Object class
(old)
Column Attribute Field Object field
Domain Domain Range of Datatype,
possible values subtype
Row Tuple Record Object instance
Primary key Primary key Key of the Object identifier
record

Você também pode gostar