Transcript Document
Institute of Water and Flood Management (IWFM)
BUET
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
WFM-6103: Hydrologic Information System (HIS)
Lecture-5: Database Management System
Akm Saiful Islam
Institute of Water and Flood Management (IWFM)
Bangladesh University of Engineering and Technology (BUET)
April-October, 2006
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Outline
Database Management System
Introduction to Databases
File System Vs. Databases
Advantages of using databases
Database Management System
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Introduction to Databases
Information Systems process and manage
data.
Data Management involves “Capturing”,
“Retrieval,” and “Storage” of data.
Database Management Systems (DBMSs)
are Computer systems that manage data in
databases.
Today’s DBMSs are based on sophisticated
software and powerful computer hardware.
Well known DBMS software includes
ORACLE, Microsoft SQL Server, Sybase and
MySQL(free download) among others.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Data Storage: Terminology
A collection of data entities is typically known as a file.
An individual data entity is typically known as a record.
Different attributes of a record are typically known as fields.
A key is a field or a set of fields that uniquely identifies a record.
File (table)
Fields
Records
Key
Product Category
+ Product Type
+ Year
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
A Word on Keys
A Key maybe:
A field or set of fields that are used to identify the record.
A Primary key is a minimal set of fields that uniquely identifies
the record.
A Foreign key is a field that is a primary key in another relation
Primary Key
Foreign Keys
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
File Organisation
Sequential Files
records are stored in a fixed sequence
records can only be read in that sequence, starting
from the first record
records can only be added at the end of the file
(append)
sequential files are not efficient
Indexed Files
Use an index to access records in a random fashion.
Records can be sorted according to an attribute or
preference. (e.g Alphabetically, Ascending,
Descending, etc.)
Indexed files are efficient, and faster to access.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
The File Systems Approach
General
Ledger
Personnel
File
File
Production
Planning
Payroll
File
File
Invoicing
Inventory
File
File
Despatch
Order
Entry
File
File
Redundant Data
Storage.
One file is used in each
application.
No data sharing.
Cross-application
transfers are difficult to
manage and achieve.
File Systems are rarely
used for data processing
anymore.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
The Database Approach
General
Ledger
Production
Planning
Personnel
Payroll
Invoicing
Despatch
Inventory
Order
Entry
Compactness. Data is
stored in a single logical
“place.”
Data can be shared and
related between
applications
Data transfer between
applications is easier
Used for a wide range
of applications.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Database Characteristics
• Amount
Database
size depends on the number of records
or files it contains.
Complexity
Database
complexity depends on the number of
relations between the files.
Volatility
A measure
of the changes typically required in a
given period of time.
Immediacy
A measure
to data.
of how rapidly changes must be made
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Advantages of using a Database
Approach
Flexible Data Access. DBMSs have various tools to
manipulate, query, or report data, such as Structured
Query Language (SQL), and Report Generators.
Hence:
Selected data is easily retrieved
A DBMS can accommodate different data views for
different users
Improved Data Integrity. Modern DBMSs consist of
various tools and methods to:
ensure that data is correct, consistent, and current
verify data input and check whether data is
‘reasonable’.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Advantages of DBs (continued)
Improved Data Security. Tools such as password
access, and encryption, ensure that data is not:
deliberately or accidentally damaged or changed
accessed without proper authorisation
Data Independence.
Problems arising from the interdependence of data and
programs are kept to a minimum.
Reduced Data Redundancy.
Single version of the truth.
Efficient data storage.
Efficient time management of Hardware (CPU),
programmer(s), analyst(s) and user(s).
Relational DBs use Normalisation to reduce data
redundancy.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Advantages of DBs (continued)
Ability to Share and Relate Data.
Different user groups can use the same data.
Data in different (physical or logical) parts of the
system can be related for a certain application.
Standardisation of Data.
In general data items have common names and
storage format.
Increased Productivity.
The various tools reduce the complexity that is
otherwise associated with DB maintenance when
changes are required to the system. For example Law
changes, Economy Changes, User Changes.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
Costs of Database Approach
The implementation and use of DBMSs is normally
associated with various costs. Such as:
Initial expenses involve planning costs, and
consultancy fees.
Computer hardware costs.
Software costs.
Database Administrator costs, and staff training
costs.
Conversion costs of an existing system.
Various operational costs.
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
DataBase Management System
(DBMS)
A DBMS is a set of computer “programs” that control:
Database creation
Database maintenance
Database access
A DBMS typically includes:
a Data Definition Language or DDL
a Data Manipulation Language or DML
a Query Language. Quite often this is Structured
Query Language (SQL) , or a derivative
a Report Generator
Bangladesh University of Engineering and Technology © Dr. Akm Saiful Islam
The DBMS Manages the Interaction
Between the End User and the Database
WFM 6103: hydrologic Information System © Dr. Akm Saiful Islam
References
Alex Berson, and Stephen J. Smith, Data Warehousing Data
Mining, and OLAP, McGraw Hill, 1997. Chapters 1,13(13.113.4 inc.). ISBN 0-07-006272-2
C. J. Date, An Introduction to Database Systems, 3rd Ed. (or
later), Addison-Wesley, 1981. Chapter 1.
J. A. Senn, Analysis and Design of Information Systems, 2nd
Ed. (or later), McGraw-Hill 1989. Chapter 12 (“Design of DB
Interactions”). ISBN 0-07-100606-0
E. Turban J. Aronson, Decision Support Systems and
Intelligent Systems, 5th Ed., Prentice-Hall, 1998. Chapter 4.
ISBN 0-13-791675.