Professional Documents
Culture Documents
1-Database Systems
1-Database Systems
Why databases?
Imagine trying to operate a business without knowing who your customers are, what products
you are selling, who is working for you, who owes you money, and whom you owe money. All
businesses have to keep this type of data and they must have those data available to decision
makers when they need them. Depending on the type of information system and the
characteristics of the business, these data could vary from a few megabytes on just one or two
topics to terabytes covering hundreds of topics within the business's internal and external
environment.
Telecommunications companies are known to have systems that keep data on millions of phone
calls, with new data being added to the system at speeds up to 1,000 calls per second. Not only
do these companies have to store and manage these immense collections of data, they have to be
able to find any given fact in that data quickly. Consider the case of Internet search engines like
Google, yahoo. Purchase from the supermarket, using a local library, studying at collcge,
depositing/withdrawing money in the bank etc.
How can these businesses process this much data? How can they store it all, and then quickly
retrieve just the facts that decision makers want to know, just when they want to know it? The
answer is that they use databases.
File-Based Systems
This is a collection of application programs that perform services for the end-users. Each
program dehnes and manages its own data. The computer fiies within the hle system were
similar to the manual files.
A Ffll*:'$ysterm
.-.rttt iliiii:iilit .;::i;;;;.., -...... : tt.:l
tt;;t:r :llf 11l r.
l]}
:t ,:rr : 1 l'1.
A,&:&ffi.A
&.
* s
WM
eWl'
il# ',fu,
.|li?t:iit |
l ttll r
nhn..L
=tltl.lw.ii.=$iit
.: ':..;itr)
Although the file-based approach is iargely obsolete. there are good reasons for studying it.
o Understanding the problems inherent in the file-based systems may prevent us from
repeating the same problems in the database systems.
o If you wish to converl a file-based system to a database system, understanding how file
system work will be extremely useful.
Duplication of data
Owing to the decentralized approach taken by each department, the file-based approach may
encourage the uncontrolled duplication of data eg finance deparlment and Human Resource
Dept. Duplication of data is undesirable due to the following reasons:
r Duplication is wasteful. It costs time and money to enter the data more than once.
o it takes up additional storage space
o Duplication can lead to loss of data integrity ie data is no longer consistent
Data dependence
The physical structure and storage of the data files and records are defined in the application
code. This means that changes to an existing structure are difficult to make. This characteristic of
file-based system is known as program-data dependence.
Incompatible file formats
Because the structure is embedded in the application programs, the structures are dependent on
the application programming language. Eg the structure of a file generated by a COBOL
program may be different from the structure of a file generated by a C++ program.
Fixed queries
There is no facility for asking unplanned queries either about the data itself or about which types
of data were available.
Lack of security and limited data sharing
Sharing data among multiple geographically dispersed users introduces a lot of secr-rrity risks.
What is a database?
A database is a collection of logically related data.
Database Management System (DBMS): software that enables users to define, create, maintain
and control access to the database.
DBMS provides the following facilities:
o It allows users to define the database (create, drop), usually through a Data Definition
Language (DDL)
. It allows users to insert, update, delete and retrieve data from the database, usually
through aData Manipulation Language (DML). The most common query language is
the structured Query Language (SQL).
'/ A security system, which prevent unauthorized users accessing the database;
Database systems are widely used in different areas because of their numerous advantages. Some
of the most common database applications are listed here.
. Airlines and railways: Airlines and railways use online databases for reservation, and for
displaying the schedule information.
. Banking: Banks use databases for customer inquiry, accounts, loans, and other
transactions.
. Education: Schools and colleges use databases for course registration, result. and other
information.
. Telecommunications: Telecommunication departments use databases to store information
about the communication network, telephone numbers, record of calls. for generating
monthly bills, etc.
. Credit card transactions: Databases are used for keeping track of purchases on credit
cards in order to generate monthly statements.
. E-commerce: Integration of heterogeneous information sources (fbr example. catalogs)
for business activity such as online shopping, booking of holiday package, consulting a
doctor, etc.
. Health care information systems and electronic patient record: Databases are used for
maintaining the patient health care details.
. Digital libraries and digitat publishing: Databases are used for management and delivery
of large bodies of textual and multimedia data.
. Finance: Databases are used for storing information such as sales, purchases of stocks
and bonds or data useful for online trading.
. Sales: Databases are used to store product, customer and transaction details.
. Human resources: Organrzations use databases for storing information about their
employees, salaries, benefits, taxes, and for generating salary checks.
ADVANTAGES OF A DBMS
DISADVANTAGES OF A DBMS
Complexify: The provisions of the functionality that we expect of a good DBMS makes the
DBMS an extremely complex piece of software.
Size: The complexity and breadth of functionality makes the DBMS an extremely large piece of
software, occupying many megabytes of disk space and requiring substantial amount of memory
to run efficiently.
Greater impact of a failure: The centraltzation of resources increases the vulnerability of the
system. Because all users and applications rely on the availability of the DBMS, the failure of
cerlain components can bring operations to a halt.
Cost of DBMSs: the cost of alarge multiuser DBMS that service hundreds of users can be
extremely expensive.
Additional hardware costs: The disk storage requirements for the DBMS and the database rnay
necessitate the purchase ofadditional storage space.
DATABASE SYSTEM
The term database system refers to an organization of components that define and regulate the
collection, storage, management, and use of data within a database environment.
A':fiatah;rsq $lstrrn
Components of the DBMS environment
There are five major components in the DBMS environment namely hardware, software, data,
procedures and people.
,'' Data
Hardwre Software Procedures People
Bridge
Machine Human
Hardware: The DBMS and the applications require hardware to run. The hardware can range from a
single PC to a network of computers. A DBMS requires a minimum amount of main memory and disk
space to run.
Software: The software component comprises the DBMS software itself and the application programs,
together with the operating system, including the network software if the DBMS is being used over a
network. Application programs in 3GL such as C, C++, C#, Java etc are used or 4GL such as SQL. The
target DBMS may have its own fourth-generation tools that allow rapid development of applications
through provision of nonprocedural query languages, report generators, form generators etc.
Data: lt acts as a bridge between the machine components and the human components. The database
contains both the operational data and the metadata (data about data).'lhe structure of the database is
Procedures: refers to the instructions and rules that govern the design and use of the database.
The users of the system and the staff who manage the database required documented procedures
on how to use or run the system. These may include instructions on how to:
People: Consists of users of the system andthe staff who manage the database. There are four
types of people who participate in the DBMS environment: data and database administrators.
database designers, application developers and end-us ers. Write brief notes on the following:
Data administrator
Database administrators :
Database designers:
Application developers:
End-users: