Sunteți pe pagina 1din 45

DATABASE DESIGN AND

MANAGEMENT
CHAPTER 1
THE DATABASE AND ITS ENVIRONMENT
INTRODUCTION :
File: A collection of records or documents
dealing with one organization, person,
area or subject. (Rowley)
 Manual (paper) files
 Computer files

Database: A collection of similar records


with relationships between the records.
(Rowley)
 bibliographic, statistical, business data, images, etc.
FILE ORGANIZATION
File Access Method - The way by which information/data can be
retrieved. There are two methods of file access:

1. Direct Access - In this access method the information/data


stored on a device can be accessed randomly and immediately
irrespective of the order it was stored. For example Hard disk,
Flash Memory

2. Sequential Access – In this access method the


information/data stored on a device is accessed in the exact
order in which it was stored. Sequential access methods are
seen in older storage devices such as magnetic tape.
FILE ORGANIZATION
File Organization Method - The process that involves how
data/information is stored so file access could be as easy and
quickly as possible. Three main ways of file organization:

1. Sequential - All records are stored in some sort of order


(ascending, descending, alphabetical). The order is based on
a field in the record. For example a file holding the records of
employeeID, date of birth and address. The employee ID is
used and records stored is group accordingly
(ascending/descending). Can be used with both direct and
sequential access.
FILE ORGANIZATION
2. Index-Sequential Organization - The records is stored in some
order but there is a second file called the index-file that indicates
where exactly certain key points. Cannot be used with sequential
access method.

3. Random File Organization - The records are stored randomly but


each record has its own specific position on the disk (address). With
this method no time could be wasted searching for a file. Instead it
jumps to the exact position and access the data/information. Can only
be used with direct access method.
DATABASE

A Database is a collection of stored operational


data used by the application systems of
some particular enterprise.

 File-Based Data Processing Systems


 Early batch processing of (primarily) business data

 Database Management Systems (DBMS)


DATABASE
TERMS AND CONCEPTS
1. In heap file organization, the records are inserted at the file's
end. ... The heap file is also known as an unordered file. In the
file, every record has a unique id, and every page in a file is of
the same size. It is the DBMS responsibility to store and
manage the new records.
TERMS AND CONCEPTS
2. Sequential File Organization: Every file record contains a
data field (attribute) to uniquely identify that record. In
sequential file organization mechanism, records are placed
in the file in the some sequential order based on the unique
key field or search key.•
TERMS AND CONCEPTS
3. Hash File Organization: This mechanism uses a Hash function
computation on some field of the records. As we know, that
file is a collection of records, which has to be mapped on
some block of the disk space allocated to it. This mapping is
defined that the hash computation. The output of hash
determines the location of disk block where the records may
exist.
TERMS AND CONCEPTS
3. Clustered File Organization: Clustered file organization is not
considered good for large databases. In this mechanism,
related records from one or more relations are kept in a same
disk block, that is, the ordering of records is not based on
primary key or search key. This organization helps to retrieve
data easily based on particular join condition. Other than
particular join condition, on which data is stored, all queries
become more expensive.
DBMS provides the following to a particular enterprise
 Collection of interrelated data
 Set of programs to access the data
 An environment that is both convenient and efficient to use
 Metadata
Data about data
In DBMS means all of the characteristics describing the attributes of an entity,
E.G.:
name of attribute
data type of attribute
size of the attribute
format or special characteristics
Characteristics of files or relations
name, content, notes, etc.
Database Applications:
1. Banking: transactions
2. Airlines: reservations, schedules
3. Universities: registration, grades
4. Sales: customers, products, purchases
5. Online retailers: order tracking, customized recommendations
6. Manufacturing: production, inventory, orders, supply chain
7. Human resources: employee records, salaries, tax deductions

Application Program Examples


1. Add new students, instructors, and courses
2. Register students for courses, and generate class rosters
3. Assign grades to students, compute grade point averages (GPA) and generate
transcripts
HISTORY/DEVELOPMENT OF DBMS
1950s and early 1960s:
Data processing using magnetic tapes for storage
Tapes provided only sequential access
Punched cards for input
Late 1960s and 1970s:
Hard disks allowed direct access to data
Network and hierarchical data models in widespread use
Ted Codd defines the relational data model
Would win the ACM Turing Award for this work
IBM Research begins System R prototype
UC Berkeley begins Ingres prototype
High-performance (for the era) transaction processing
HISTORY/DEVELOPMENT OF DBMS
1980s:
Research relational prototypes evolve into commercial systems
SQL becomes industrial standard
Parallel and distributed database systems
Object-oriented database systems
1990s:
Large decision support and data-mining applications
Large multi-terabyte data warehouses
Emergence of Web commerce
Early 2000s:
XML and XQuery standards
Automated database administration
Later 2000s:
Giant data storage systems
Google BigTable, Yahoo PNuts, Amazon, ..
FROM FILE SYSTEM TO DBMS

Application File
Delivery Toys
List Addresses

Coal
Estimation Naughty

Just what
asked for Nice Toys
Problems in a File-based System

1. Data redundancy and inconsistency


2. Multiple file formats, duplication of information in different
files
3. Difficulty in accessing data
4. Need to write a new program to carry out each new task
5. Data isolation
6. Multiple files and formats
7. Integrity problems
Integrity constraints (e.g., account balance > 0) become
“buried” in program code rather than being stated explicitly
8. Hard to add new constraints or change existing ones
FROM FILE SYSTEMS TO DBMS
9. Atomicity of updates
10. 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
11. Concurrent access by multiple users
12. Concurrent access needed for performance
13. Uncontrolled concurrent accesses can lead to inconsistencies
Example: Two people reading a balance (say 100) and updating it
by withdrawing money (say 50 each) at the same time
14. Security problems
15. Hard to provide user access to some, but not all, data
DBMS BENEFITS
Minimal Data Redundancy

Consistency of Data

Integration of Data

Sharing of Data

Ease of Application Development

Uniform Security, Privacy, and Integrity Controls

Data Accessibility and Responsiveness

Data Independence

Reduced Program Maintenance


TERMS AND CONCEPTS
Data Independence

 Physical representation and location of data and the use of that


data are separated
 The application doesn’t need to know how or where the
database has stored the data, but just how to ask for it.
 Moving a database from one DBMS to another should not
have a material effect on application program
 Recoding, adding fields, etc. in the database should not
affect applications
DATABASE COMPONENTS

DBMS
===============
Design tools
Table Creation
Form Creation
Query Creation
Report Creation Application
Procedural
Database language
Programs
compiler (4GL)
=============
Run time
Database contains:
Form processor
User’s Data Query processor
User
Metadata Report Writer Interface
Indexes Language Run time Applications
Application Metadata
TYPES OF DATABASE SYSTEMS
PC Databases

Centralized Database

Client/Server Databases

Distributed Databases
DATABASE ENVIRONMENT

CASE User Application


Tools Interface Programs

Repository
DBMS Database
PC DATABASES

E.G.
Access
FoxPro
Dbase
Etc.
CENTRALIZED DATABASES

Cental
Computer
CLIENT SERVER DATABASES

Client

Client
Network

Database
Server
Client
DISTRIBUTED DATABASES

Location B
Location C

computer
computer

Homogeneous
computer Databases
Location A
DISTRIBUTED DATABASES

Heterogeneous Client
Or Federated Remote
Databases Comp.
Database
Server
Local Network

Comm
Server
Remote
Client Comp.
RANGE OF DATABASE APPLICATIONS
PC databases
 Usually for individual

WorkGroup databases
 Small group use where everyone has access to the
database over a LAN

Departmental databases
 Larger than a workgroup – but similar

Enterprises databases
 For the entire organization over an intranet (or
sometimes the internet)
USERS IN A DATABASE ENVIRONMENT

Database Users
PERSONNEL IN A DATABASE ENVIRONMENT
DA
 Data Adminstrator - person responsible for the Data
Administration function in an organization
 Sometimes may be the CIO -- Chief Information Officer

DBA
 Database Administrator - person responsible for the Database
Administration Function
TERMS AND CONCEPTS
Data Administration
 Responsibility for the overall management of
data resources within an organization
Database Administration
 Responsibility for physical database design and
technical issues in database management
Data Steward
 Responsibility for some subset of the
organization’s data, and all of the interactions
(applications, user access, etc.) for that data
TERMS AND CONCEPTS
Models
 (1) Levels or views of the Database
 Conceptual, logical, physical

 (2) DBMS types


 Relational, Hierarchic, Network, Object-Oriented,
Object-Relational
TERMS AND CONCEPTS
DATA MODELS are collection of tools for describing
 Data
 Data relationships
 Data semantics
 Data constraints
1. Relational model
2. Entity-Relationship data model (mainly for database design)
3. Object-based data models (Object-oriented and Object-
relational)
4. Semi-structured data model (XML)
Other older models:
 Network model
 Hierarchical model
MODELS (1)
Application 1 Application 2 Application 3 Application 4
External External External External
Model Model Model Model
Application 1
Conceptual
requirements
Application 2
Conceptual
requirements Internal
Conceptual Logical Model
Application 3
Conceptual
Model Model
requirements
Application 4
Conceptual
requirements
DATA MODELS(2): HISTORY
Hierarchical Model (1960’s and 1970’s)
 Similar to data structures in programming languages.

Books
(id, title)

Authors
Publisher Subjects
(first, last)
DATA MODELS(2): HISTORY
Network Model (1970’s)
 Provides for single entries of data and navigational
“links” through chains of data.

Authors

Subjects Books

Publishers
DATA MODELS(2): HISTORY
Relational Model (1980’s)
 Provides a conceptually simple model for data as
relations (typically considered “tables”) with all data
visible. pubid pubname Authorid Author name
1 Smith
1 Harper
Book ID Title pubid Author id 2 Wynar
1 Introductio 2 1 2 Addison 3 Jones
2 The history 4 2 3 Oxford 4 Duncan
5 Applegate
3 New stuff ab 3 3 4 Que
4 Another title 2 4
5 And yet more 1 5
Book ID Subid Subid Subject
1 2 1 cataloging
2 1
3 3 2 history
4 2 3 stuff
4 3
DATA MODELS(2): HISTORY
Object Oriented Data Model (1990’s)
 Encapsulates data and operations as “Objects”

Books
(id, title)

Authors
Publisher Subjects
(first, last)
DATA MODELS(2): HISTORY
Object-Relational Model (1990’s)
1. Combines the well-known properties of the Relational Model with such OO
features as:
User-defined datatypes
User-defined functions
Inheritance and sub-classing
2. Extend the relational data model by including object orientation and constructs to
deal with added data types.
3. Allow attributes of tuples to have complex types, including non-atomic values
such as nested relations.
4. Preserve relational foundations, in particular the declarative access to data, while
extending modeling power.
5. Provide upward compatibility with existing relational languages.
DATABASE ARCHITECTURE
The American National Standards Institute/Standards Planning and
Requirements Committee (ANSI/SPARC) has established a three-
level architecture for a DBMS: internal, conceptual and external.
The architecture of a database systems is greatly
influenced by the underlying computer system on which
the database is running:
1. Centralized
2. Client-server
` (multi-processor)
3. Parallel
4. Distributed

S-ar putea să vă placă și