Tree File Structures

Download Report

Transcript Tree File Structures

DATABASE SYSTEMS
Overview
File Processing - Database Overview
MVNC
1
DATABASE SYSTEMS

A database may be defined as a collection of
interrelated data stored together without
harmful or unnecessary redundancy to serve
multiple applications
» the data are stored so that they are independent of
programs which use the data
» a common and controlled approach is used in
adding new data and in modifying and retrieving
existing data within the data base.
» The data is structured so as to provide a
foundation for future application development.
File Processing - Database Overview
MVNC
2
DATABASE SYSTEMS

Components
App. 1
Students
App. 2
Database
system
Classes
App. 3
Payroll
Teachers
App. 4
Database
File Processing - Database Overview
MVNC
3
DATABASE SYSTEMS

Important considerations
»
»
»
»
»
»
Sharing
Data Integraty
Redundancy
Growth
Logical data independence
Physical data independence
File Processing - Database Overview
MVNC
4
DATABASE SYSTEMS

Redundancy
» A database should minimize redundancy.
– controlled or minimal redundancy


for capability to recover from loss
some redundancy may exist in order to give improved
access time or simpler address methods
– harmful redundancy



cost of storing multiple copies
necessary to update multiple copies
system may be inconsistent when in different stages of
updating
File Processing - Database Overview
MVNC
5
DATABASE SYSTEMS

Constant Growth - a data base is not a static
entity
» to allow for change over time, with possible
restructuring of the physical data.
» new data and applications may be added
» data independence
File Processing - Database Overview
MVNC
6
DATABASE SYSTEMS

Logical data independence
» the overall logical structure of the data may be
changed without changing the application
programs.
» The changes must not, of course, remove any of
the data the application programs use.)
File Processing - Database Overview
MVNC
7
DATABASE SYSTEMS

Physical data independence
» the physical layout and organization of the data
may be changed without changing either the
overall logical structure of the data or the
application programs.
File Processing - Database Overview
MVNC
8
DATABASE SYSTEMS

Data Views
» External View
– View of data from a partiular program.
– Multiple views may exist for multiple needs
» Conceptual View
– Complete discription of data stored
» Internal View
– Physical organization of actual data
File Processing - Database Overview
MVNC
9
DATABASE SYSTEMS

Conceptual View
» While the programmer's view of data change and
the physical storage and organization change, the
conceptual model remains stable or grows to
incorporate more data types.
» Describes the entire set fields and relationships in
the data
» Called the schema
File Processing - Database Overview
MVNC
10
DATABASE SYSTEMS

Conceptual View
» The Schema is the underlying view of the data,
from which all external views can be derived
» A well designed conceptual model will only need to
grow, a badly designed model will have to be
modified and changed later.
File Processing - Database Overview
MVNC
11
DATABASE SYSTEMS

External View
» Each use of the data may require a different
external view
» Permits access to subsets of the data
– Security - some data is hidden, readonly
– Flexibility - schema changes shouldn't affect programs
– Understanding - programers and users need not
understand the complexities of the underlying data
File Processing - Database Overview
MVNC
12
DATABASE SYSTEMS

Internal View
» Only the database management system need
know this
» indexes, file structures, access techniques, etc.
» DB administrator may modify parameters for
performance.
File Processing - Database Overview
MVNC
13
DATABASE SYSTEMS

The Objectives of a Data-Base organization
» The ultimate objective is to make application
development easier, cheaper, faster, and more
flexible.
» A data-base should be a repository of the data
needed for an organization data processing.
» The conceptual view should reflect the "true
properties of the data."
File Processing - Database Overview
MVNC
14
DATABASE SYSTEMS

Primary Objectives of Data-Base Organization
» The Data Base is the Foundation Stone of Future
Application Development
– It should make application development easier, cheaper,
faster and more flexible.
» The Data Can Have Multiple Uses
– Different users who perceive the same data differently
can employ them in different ways.
» Intellectual Investment is Protected
– Existing programs and logical data structures
(representing many man-years) will not have to be redone
when changes are made to the data base.
File Processing - Database Overview
MVNC
15
DATABASE SYSTEMS

Primary Objectives of Data-Base Organization
» Clarity
– Users can easily know and understand what data are
available to them.
» Ease of Use
– Users can gain access to data in a simple fashion.
– Complexity is hidden from the users by the data-base
management system.
» Flexible Usage
– The data can be used or searched in flexible ways with
different access paths.
File Processing - Database Overview
MVNC
16
DATABASE SYSTEMS

Primary Objectives of Data-Base Organization
» Unanticipated Requests for Data Can Be Handled
Quickly
– Spontaneous requests for data can be handled without
application programs having to be written (a timeconsuming bottleneck), by means of high-level query or
report generation languages.
» Change Is Easy
– The data base can grow and change without interferring
with established ways of using the data.
» Low Cost
– Low cost of storing and using data, and minimization of
the high cost of making changes.
File Processing - Database Overview
MVNC
17
DATABASE SYSTEMS

Primary Objectives of Data-Base Organization
» Less Data Proliferation
– New application needs may be met with existing data
rather creating new files.
» Performance
– Data request can be satisfied with speed suitable to the
usage of the data.
» Accuracy and Consistency
– Accuracy controls will be used.
– The system will avoid having multiple versions of the
same data item available to users in different stages of
updating.
File Processing - Database Overview
MVNC
18
DATABASE SYSTEMS

Primary Objectives of Data-Base Organization
» Protection from Loss or Damage
» Privacy
– Unauthorized access to the data will be prevented.
– The same data may be restricted in different ways from
different uses.
– Data will be protected from failures and catastrophes,
and from criminals, vandals, incompetents, and
persons who might falsely update them.
» Availability
– Data are quickly available to users at almost all times
when they need them.
File Processing - Database Overview
MVNC
19
DATABASE SYSTEMS

Secondary Objectives (to help achieve the
primary objectives)
» Physical Data Independence
– Storage hardware and physical storage techniques can
be changed without causing application program
rewriting.
» Logical Data Independence
– New data items can be added, or the overall logical
structures expanded, without existing programs having to
be rewritten.
» Controlled Redundancy
– Data items will be stored only once except where there
are technical or economic reasons for redundant storage.
File Processing - Database Overview
MVNC
20
DATABASE SYSTEMS

Secondary Objectives
» Suitably Fast Access
– Access mechanisms and addressing methods will be fast
enough for the usage in question.
» Suitably Fast Searching
– The need for fast spontaneous searching of the data will
grow as interactive systems usage spreads.
» Data Standardization Within a Corporation
– Interdepartmental agreement is needed on data formats
and definitions.
– Standardization is needed between departments who
would otherwise have created incompatible data.
File Processing - Database Overview
MVNC
21
DATABASE SYSTEMS

Secondary Objectives
» Data Dictionary
– A data dictionary, defining all data items used, is needed.
» High-level Programmer Interface
– Application programmers should use simple, powerful
data requests and be insulated from the complexities of
file layout and addressing.
» End User Language
– A high-level query or report-generation language should
permit some end users to bypass the application
programming step.
File Processing - Database Overview
MVNC
22
DATABASE SYSTEMS

Secondary Objectives
» Integrity Controls
– Range checks and other controls should detect data
inaccuracies where possible.
» Fast Recovery from Failures
– Automatic recovery without loss of transactions.
» Tunability
– The data base should be tunable, to improve performance
without causing application program rewriting.
File Processing - Database Overview
MVNC
23
DATABASE SYSTEMS

Secondary Objectives
» Design and Monitoring Aids
– Aids which permit the designer of data administrator to
predict and optimize performance.
» Automatic Reorganization or Migration
– Data migration or other automatic physical reorganization
designed to improve performance.
» Evolution to Distributed Data Base Operation
– The system should be designed so that distributed
processing and computer network operations can evolve.
File Processing - Database Overview
MVNC
24