Vous êtes sur la page 1sur 17

COPPERBELT UNIVERSITY

COMPUTER SCIENCE DEPARTMENT

INTRODUCTION TO COMPUTING
UNIT 13: DATABASES

INTRODUCTION
Mankind has always relied upon data and information for its survival and growth. Numerous
techniques and devices have been developed to manage and organize the information. Earlier,
people used to store and process data with the help of papers, file folders, microfilms and so on.
About half a century ago, computer was developed. It was a revolutionary technology, and
almost instantly, the computers were employed to resolve the problem of information storage and
retrieval. They have replaced tons of papers, file folders and file cabinets as the principal media
for storing important information. With the advent of small, powerful personal computers,
databases have become more readily usable by the average computer user.

In today's changing technological environment, information is the power. Owing to the rapid
growth of information technology in the last few decades, organizations and institutions have
realized the value of information as a resource and the importance of the speed and ease with
which this resource can be managed. This eternal quest for data management has led to the
development of database technology. The term database refers to a collection of related data
from which the users can efficiently retrieve the desired information. In addition to the storage
and retrieval of data, certain other operations can also be performed on a database. These
operations include adding, updating and deleting data. All these operations on a database are
performed using a database management system (DBMS). Essentially, a DBMS is a
computerized record-keeping system. In this chapter, we will learn about databases, the
terminology used in the world of databases and various other aspects of database technologies.

DATA, INFORMATION AND KNOWLEDGE

Before defining database, we should know about the two terms, data and information, which are
used frequently with databases. Data can be anything such as a number, a person's name, images,
sounds and so on. Hence, data can be defined as a set of isolated and unrelated raw facts
(represented by values), which have little or no meaning because they lack a context for
evaluation. Usually, the values are represented in the forms of characters, numbers or any
symbol such as 'Monica', '35' and 'chef'. Note that although these words and numbers have
certain meaning, it is difficult to figure out exactly what these values signify. However, when the

1
data are processed and converted into a meaningful and useful form, it is known as information.
Hence, information can be defined as a set of organized and validated collection of data. For
example, 'Monica is 35 years old and she is a chef'.

Strictly speaking, data refer to the values physically recorded in the database, whereas
information refers to the conclusion or meaning drawn out of it. With respect to database, these
terms are synonymous. In reality, information in one sense may be data in another. Sometimes, it
is hard to make the difference between the two. For example, the bill at the grocery store can be
used as data as well as information. As information, the bill represents the amount you owe to
the store. However, when the store manager uses his computer to calculate total sales for the day
based on all purchases made, it is treated as data. In summary, whether something is data or
information depends on how it is used in relation to given context.

Other than data and information, one more term, knowledge, is frequently used with database
technology. Knowledge is the act of understanding the context in which the information is used.
It can be based on learning through information, experience and/or intuition. Based on the
knowledge, the information can be used in a particular context, for example, if an hotelier uses
the information about Monica (she is a chef) to hire her, he is using his knowledge. Hence,
knowledge can also be referred to as a person's capability and wisdom and how much that person
knows about a particular subject. Consequently, it can be said that data constitutes information,
and information constitutes knowledge.

Prerequisites of Information

Information is the processed data, on which decisions are taken and the subsequent actions are
performed thereafter. For the decisions to be meaningful and useful, the information must
possess the following qualities:

 Accurate: To be useful, information must be accurate at all levels because all further
developments are based on the available information. Accurate information provides a
reliable and valid representation of raw facts. The cost of inaccurate or distorted
information can be extremely high.
 Timely: Information is appreciated only if it is available on time. If the information is
available ahead of time, its value may be diminished because the information might get
archaic or the user may simply forget it. Obviously, any availability after the due time
simply has no significance.
 Complete: Complete information tends to be comprehensive in covering the issue or topic
of interest. Without complete information, a decision- maker may get a distorted view of
reality. For example, incomplete market information can lead businesses to introduce
products and services not desired by the customers. As a result, the organization may
incur huge losses.

2
 Precise: Apart from being complete, information must also be precise, that is, it should be
to the point, containing all the essential elements of the relevant subject areas. To provide
complete information, usually large amount of data are gathered. Important information
may be buried in the stacks of such data. One needs to work hard to get precise
information out of it.
 Relevant: Information is relevant if it can be applied to a specific situation, problem or
issue of interest. For example, operation managers need information on cost and
productivity, whereas marketing managers need information on sales projections and
advertising rates. In contrast, product inventory information is not relevant to a payroll
manager.

Need for Information

Information is an important part of our day-to-day life. Almost all activities are affected by the
quantity as well as the quality of information. If you are well informed, then the chances of your
success increases manifold. Some of the common usages of information are discussed as follows.

Information and Decision-making: Every job or task involves decision-making. Decision-making


is the process of identifying, selecting and implementing the best possible alternative. The right
information, in the right form and at the right time is essential to make correct decisions. For
example, based on the information about customers, competitors and production capabilities, a
manager may decide to inform top executives that a strategic decision needs to be made. Top
executives would use this information to identify alternatives for consideration. Each alternative
would then be evaluated based on feasibility, cost, time and other criterions. Based on their
assessment, top executives would select the alternative that makes the best business sense and
begin its implementation.

Information and Communication: Information is vital for communication and is a critical


resource for performing work in organizations. Business managers spend most of their day in
communicating with other managers, subordinates, customers, vendors and so on. Indeed,
management in itself is an information process, which involves collecting, processing and
distributing information. A manager must keep track of the information flow from the sources
inside and outside the organization.

Information and Knowledge: Information plays a vital role in the accumulation of knowledge.
Within a corporation, the importance of efficient use of information (or knowledge), for normal
functioning of the corporation, has gained so much importance that it has become a major
constituent for the growth and survival of corporation in a competitive environment. The future
is shaped by our actions today, and these actions are based upon our knowledge. Therefore, for
achieving higher levels of success, one must be well informed and should have clarity of
information.

3
Information and Productivity: Information helps in making sense of our environment, which
assists in achieving the performance objectives. In fact, productivity is directly related to the
availability and value of the information and its application in the related context. Individuals
and organizations need to ensure that their information-processing systems are properly
integrated. They should also ensure that necessary information is being supplied to the right
people at the right time in the organization. For example, it makes sense to share customer
complaint data about a specific product with the members of the product development team
responsible for redesign, thereby increasing the efficiency as well as productivity.

DATABASE: DEFINITION

A database can be defined as a collection of related data in an organized way. The organized
information (i.e. database) serves as a base from which the desired information can be retrieved,
conclusions can be drawn and decisions can be made, by further reorganizing or processing these
data. In essence, a database not only stores information, but the information is integrated so that
when the database is interrogated, users can get something useful from it. A database can be
anything from a simple collection of roll numbers, names, addresses and phone numbers of the
students to a complex collection of sound, images and even video or film clippings. Although
databases are generally computerized, instances of non-computerized databases from everyday
life can be cited in abundance. A dictionary, a phone book, a collection of recipes and a TV
guide are all common examples of non-computerized databases. The examples of computerized
databases include customer files, employee rosters, books catalog, equipment inventories and
sales transactions.

Fundamentals of Database

Within the database, the data are organized into storage containers, called tables. Tables are
made up of columns and rows. In a table, columns represent individual fields and rows represent
records of data. The following are the basic database terms.

Field

A field represents one related part of a table and is the smallest logical structure of storage in a
database. It holds one piece of information about an item or a subject. For example, in a database
maintaining information about employee, the fields can be Code, Deptt, Name, Address, City
and Phone (see Figure 1).

4
Figure 1: Fields and Records in a Table
Record

A record is a collection of multiple related fields that can be treated as a unit. For example, fields
Code, Deptt, Name, Address, City and Phone for a particular employee form a record. Figure 1
contains nine records (0101–0109) and each record has six fields. In database terminology, each
row is a record. However, database experts prefer to use the word row, since record sometimes
has other connotations outside the databases.

Table

A table is a named collection of logically related multiple records. For example, a collection of
all the employee records of a company form employee table. Note that every record in a table has
the same set of fields. Depending on the database software, a table can also be referred to as a
file. The collection of multiple related files (tables) forms the database.

NOTE: The database software can save each collection of records (table) in a separate file or
saved in a single database, which is logically separated in tables.

Data Type

A data type determines the type of data that can be stored in a column. Although many data types
are available, the four most commonly used data types are Character, Numeric, Boolean and
DateTime. Character data types are used to store characters, numbers, special characters or
combinations of any of these. Note that if a numeric value is stored in an alphanumeric field, the
value is treated as a character, not as a number. Numeric data types are used to store only
numeric values. Boolean data types store only logical values, either true or false. DateTime data
type is used to store date and time values. The values for this data type vary widely depending on
the database management software being used.

5
Keys

Key is one of the important concepts of database. It can be of three types—primary key,
candidate key, and foreign key.

 Primary Key: A field or a set of fields that uniquely identify each record in a table is
known as a primary key. This implies that no two records in the relation can have same
value for the primary key. In addition, the field chosen as primary key cannot accept null
value. The primary key should be chosen by the database designer in such a way that its
values must not change. For example, in the table shown in Figure 1, the field 'Code' can
be designated as the primary key, because the value of code for all the records is unique.
Note that there can be only one primary key in a relation.
 Candidate Key: In a table, there can be more than one field that can uniquely identify
each record. All such fields are known as candidate keys. One of these candidate keys is
chosen as a primary key; the other keys that are not chosen as primary key are known as
alternate keys. For example, in the table shown in Figure 1, the field Name can also
uniquely identify all the records as no two persons share the same name (however, in real
life, names of two persons can be similar). Thus, there are two candidate keys, i.e. Code
and Name in the table. If the field Code is chosen as a primary key, the field Name
becomes the alternate key.
 Foreign Key: A field of a table that references the primary key of another table is referred
to as foreign key. Figure 2 illustrates how a foreign key constraint is related to a primary
key constraint. Here, the field Item_Code in the PURCHASE table references the field
Item_Code in the ITEM relation. Thus, the attribute Item_Code in the PURCHASE
relation is the foreign key.

NOTE:The key composed of more than one field is known as composite key. Sometimes, it is also
known as concatenated key or structured key.

Figure 2: Foreign Key

6
Data Dictionary

Apart from the data, the database also stores metadata, which describes the tables, columns,
indexes, constraints and other items that make up the database. In simple words, metadata is the
data about data. This metadata is stored in an area called the data dictionary. Hence, a data
dictionary defines the basic organization of a database. It contains the list of all files in the
database, the number of records in each file and the names and types of each field. Data
dictionaries do not contain any actual data from the database, but only the information for
managing it.

Most database systems keep the data dictionary hidden from users to prevent them from
accidentally destroying its contents. Different users use the dictionary in different ways. The
database administrator (DBA) needs a dictionary to ensure consistency among the data items, to
educate users about the database content and to help ensure that different department defines the
same data in the same way. The programmers may use it to ensure that they have the name and
coding of the data items or segments correct in their programs. Managers may use it as a guide to
decide what data could be made available to them.

LOGICAL DATA CONCEPTS

The overall database design and implementation process starts with requirements gathering and
specifications. Once the requirements of the user have been specified, the next step is to
construct an abstract or conceptual model of a database based on the requirements of the user.
The conceptual model represents various pieces of data and their relationships at a very high
level of abstraction. It mainly focuses on what data are required and how it should be organized
rather than what operations are to be performed on the data. The conceptual model can be
represented using Entity-Relationship model (E-R model). The E-R model views the real world
as a set of basic objects (known as entities), their characteristics (known as attributes) and
associations among these objects (known as relationships). The entities, attributes and
relationships are the basic constructs of an E-R model.

Entity

An entity is an object that has an independent existence in the real world. It includes all those
'things' about which the data are collected. An entity may be a tangible object such as a student, a
place or a part. It may also be intangible such as an event, a job title or a customer account.
Diagrammatically, entities are represented in rectangles.

Attributes

Attributes are the properties of an entity that characterize and describe it. In a database, entities
are represented by tables and attributes by columns. For example, a CUSTOMER entity might
have numerous attributes such as Code, Name and Address. Similarly, the ITEMS entity may

7
have attributes like Item_Id and Price. They are drawn in elliptical shapes along with the entity
rectangles (see Figure 3).

Figure 3: Attributes

Figure 4: Entities, Attributes and Relationship

Relationship

Relationship is an association, dependency or link between two or more entities and is


represented by a diamond symbol. A relationship describes how two or more entities are related
to each other. For example, the relationship Buys (shown in Figure 4) associates the
CUSTOMER entity with ITEMS entity.

Types of Relationship

Even though a relationship may involve more than two entities, the most commonly encountered
relationships are binary, involving exactly two entities. Generally, such binary relationships are
of three types—one-to-one, one-to-many and many-to-many.

8
One-to-one Relationship (1:1)

In one-to-one relationship, one record in a table is related to only one record in another table. For
example, a department cannot be headed by more than one department head and a department
head can be head of only one department.

One-to-many Relationship (1:M)

In one-to-many relationship, one record in a table (parent table) can be related to many records in
another table (child table). For example, a father may have more than one child but the child has
only one father.

Many-to-many Relationship (M:M)

In many-to-many relationship, one record in a table can be related to one or more records in a
second table, and one or more records in the second table can be related to one or more records
in the first table. For example, a customer can buy many items and same item can be bought by
many customers.

PHYSICAL DATA CONCEPTS

Physical concepts of data refer to the manner in which the data are physically stored on the
hardware (like hard disk). Fundamentally, it involves the physical organization of the records of
a file for the convenience of storage and retrieval of data. The physical organization is much
more related with optimizing the use of the storage medium when a particular logical structure is
stored on, or in it. Usually, the files are organized in three fashions— sequential, direct and
indexed sequential.

Sequential Files

In sequential files, the data are stored and/or retrieved in a logical order, that is, in a sequence.
The records are stored one after the other in an ascending or descending order, based on the key
field (which is unique for each record) of the records. Generally, these files are stored on
sequential storage devices such as magnetic tapes and punched cards. In such files, to retrieve a
record, all the records must be traversed sequentially before reaching to the desired record. An
analogy to sequential files may be taken as an audio cassette. If you are at the first song and want
to listen to the fourth song, you will have to traverse through the second and third song,
respectively.

Sequential files are easy to organize and maintain. The hardware associated with sequential
organization is also relatively cheaper as compared to the other file organizations. However,
sequential search takes a very long time. If there are N records in the file, on an average, the user
will have to go through N/2 records before finding the right one. Similarly, making changes
9
(such as adding, deleting and updating records) to a sequential file is also a difficult operation.
For example, to add a record in the middle of a sequential file, the entire file has to be sorted,
rewritten and stored on the storage device again.

Direct Files

Direct files facilitate accessing any record directly or randomly without having to traverse the
sequence of records. These files are also known as random or relative files. Even though only
one item can be accessed at a time, that item may be stored anywhere in the file. For example, in
case of CDs, any song can be played randomly. Generally, these files are stored on direct access
storage devices such as hard disks and CDs.

When the records are stored, the program itself generates the address for the record by applying
certain techniques to its key field. The relationship between the key field and the corresponding
address of the location of the record on the storage device can be given in the form of equation
as: F (key value) = Record Address. The same formula is used again to retrieve the desired
record.

Direct access method facilitates speedy and direct retrieval of information. Any record can be
accessed within a fraction of time because unlike sequential files, this method does not have to
traverse a sequence of records. As a result, updating, addition and deletion of record become
much faster. However, this method is expensive than sequential, because usually the direct files
are stored on direct access devices, which are expensive as compared to sequential storage
devices. Moreover, direct access is less storage efficient, because it tends to generate wide gaps
in between any two records. In addition, address generation overhead is also involved for
accessing records due to addressing functions.

Indexed Sequential Files

Before discussing the indexed sequential file organization, let us first know about indexes. You
might have used indexing many times while going through a book. At the back pages of most of
the books, certain key words (topics), along with the page numbers on which these topics are
discussed, are given. In similar fashion, an indexed file includes an index table (also known as
reference table) that relates key field values to storage locations of the corresponding records.
Hence, indexing can be defined as a technique of ordering the records in a table without making
any modification in the table.

Essentially, indexed sequential technique is a hybrid of sequential and direct file organization. It
provides a combination of access types that are supported by a sequential and a direct file. The
indexed file organization uses a separate index file, which contains the key values and the
location of the corresponding record. The records are organized in an orderly sequence and the
index table is used to access the records without searching through the entire file. The records
may be in random sequence, but the index table is stored in sorted sequence on the key values.

10
Since the index table is in sorted sequence, the file management system simply accesses the
records in the order of the index values. To access a particular record, a search is made in the
index table to determine the address of the first record of the segment in which the data are
placed. Then, a direct access is made to that address. After that, a sequential search is invoked
until the desired record is located.

Index file requires considerably less space than the data file as it requires only two fields—the
key field and the address of records location, even if the record may have numerous fields.
However, it is still an overhead, as other file organizations do not use any extra file. Indexes do
not affect the file organization of records physically, that is, various indexes can use the same file
without rearranging its records. Indexing speeds up the data retrieval, but it may slow down the
update process because indexes also need to be maintained along with the data file, while adding
and deleting. Since the index sequential files require direct access storage devices, they are an
expensive means of file organization.

DATABASE MANAGEMENT SYSTEM

As discussed earlier, a database is a collection of well-organized data. To carry out operations


like insertion, deletion and retrieval, the database needs to be managed by a software package.
This software is called a database management system (DBMS). Hence, DBMS can be defined
as a collection of interrelated data and a set of programs to access that data. The primary goal of
a DBMS is to provide an environment that is congenial and efficient to retrieve and store
information. It allows a user to store, update and retrieve data in abstract terms. DBMS eases the
maintenance and retrieval of information from a database. A DBMS also relieves the user from
having to know about the exact physical representations of data and from specifying detailed
algorithms for storing, updating and retrieving the data.

Principally, a database system is a computerized record-keeping system whose overall purpose is


to maintain information and to make it available on demand. The management of data involves
defining the structures for information storage and provision of mechanisms for its manipulation.
DBMS also provides mechanisms for the security of the stored information from unauthorized
access and recovery of the data during system failures. In addition, the database system avoids
possible anomalous results in case the data are to be shared among several users.

Need for Database Management System

Historically, information systems employed stand-alone systems for separate applications each
with their own set of files (file based systems). This meant that data such as addresses may be
duplicated in many separate systems such as an employee's address may be held once in the
payroll system and again in the personnel system. This causes waste of space and inconsistency.

11
There may be a possibility for the address to be updated in one system but not in the other,
hence, making the data inconsistent.

The problems described above led to the development of the database approach. In the database
approach, an organization attempts to build an integrated corporate database to support all the
data requirements of the organization (in this context database means all the data held by the
organization, whether held in computerized or non-computerized database applications). DBMSs
are very good at organizing and managing large collections of persistent data. A DBMS is like a
suitcase where all the stuff (data) are put so that it is in one place and easy to reach. DBMSs
protect data from unauthorized access and accidental corruption or loss due to hardware (like
power outages) and software failures (like operating system crashes). They allow concurrent
access, which means that a single data set can be accessed by more than one user at a time.
Although concurrent access may introduce unwanted problems, DBMSs provide mechanisms to
prevent concurrent access problems.

File-Oriented Approach versus DBMS Approach

Traditionally, data was stored and processed on multiple files with the help of a program (or a
group of programs) for each application. This is known as file-oriented/based approach of
database management. A file may be defined as systematized self-containing collection of
records. It may consist of data (data file) or may contain a sequence of basic statements
(program). Each user works with a different program that handles its own independent data.

Each program maintains its own set of data and users of one program may not be aware of
potentially useful data held by other programs. Since the file structure is defined in the program
code, the data used for that file is dependent on it. Usually, programs are written in different
languages that lead to incompatible file formats and one program file may not easily access other
files. Since programs are written to comply with particular functions, only a fixed number of
queries can be performed and any new requirement will need a new program.

DBMS is a software system that enables users to define, create and maintain the database and
provides controlled access to this database. This approach has a database engine placed between
the applications and the data. The engine is the central component of a DBMS and it provides
access to the database. It also coordinates all the other functional elements (manipulate, add,
delete, search, select and store data) of the DBMS. Only the engine knows how the data are
physically stored and applications pass requests to the engine to read and write the data. The
definition of data is embedded in application programs, rather than in separate and independent
files. The data are logically related, which comprises entities, attributes and relationships of the
information. The definition and structure of the data (metadata) is defined and stored in the data
dictionary. Since the dictionary provides the description of the data, the programs are based on it,
and hence the data become independent of the programs.

12
In general, the data in a DBMS are integrated as well as shared.

 Integrated: A database can be considered as a unification of several data files (tables),


with any redundancy among those files eliminated (either wholly or partly). For example,
a database might contain both the EMPLOYEE and the ALLOWANCE files. To process
the ALLOWANCE file, one need not include the redundant field in this database as it can
easily be extracted by referring to the EMPLOYEE table.
 Shared: Shared data means that individual pieces of data in the database can be shared
among numerous users. Each user can have access to the same piece of information and
every user can use it for different purpose. In the above example, department information
in the EMPLOYEE file can be shared by users in the personnel department and the
accounts department.

Benefits of Database Management System

Let us discuss some of the major advantages provided by the DBMS.

 Reduction in Data Redundancy: Data redundancy refers to duplication of data. In non-


database systems, each application has its own separate files. This can often lead to
redundancy in stored data, which results in wastage of space. For example, in case of file-
based system of a magazine publishing house, the customer department keeps a separate
customer details file. A similar file is also kept with the postage-handling department.
Hence, the same data are duplicated in two separate places. The other problem with this
system is that the data may not be updated consistently. Suppose a customer requests for
change in his/her posting address to the customer department and the changed address is
reflected in his/her record. However, it is not guaranteed that the same change is also
done in the postage-handling department's file. If the database system forgets or delays to
update this file, this may lead to postage of the subscribed magazine to the old address.

A DBMS does not maintain separate copies of the same data. All the data are kept at one
place and various applications refer to the data from this centrally controlled system. As a
result, when the customer demands the change in address, it is done at one place from
where the concerned department's application uses the data for processing.

 Reduction in Inconsistency: This is a corollary of the previous point. Suppose that the
customer's xyz address is represented by two distinct entries in the stored database and
the database system is not aware of this duplication (i.e. redundancy is not controlled),
then there will be some occasions on which the two entries will not agree, that is, when
only one of the two entries has been updated. At such times, the database is said to be
inconsistent. As a result, inconsistent or contradictory information will be supplied to the
users.

13
It is obvious that if the given fact is represented by a single entry, then such
inconsistencies may not occur. Alternatively, even if the redundancy is not removed but
is controlled, then the DBMS ensures that the database is always consistent by ensuring
that any change made to either of the two entries is automatically applied to the other one
also. This process is known as propagating update. Note that recent DBMS packages like
Oracle and Sybase are built with capabilities of propagating updates automatically.

 Sharing of Data: Sharing of data allows the existing applications to use the data in the
database simultaneously. It also helps in developing new applications, which will use the
same stored data. Due to shared data, it is possible to satisfy the data requirement of new
applications without having to create any additional stored data or with marginal
modification. For example, in the banking corporation, the account holder's name and
address can be shared by all the applications. As a result, any changes in the current
account policies can be implemented with virtually no changes in the table's structure.

 Enforcement of Standards: Since access to the database must be through the DBMS,
standards are easier to enforce. Standards may relate to the naming of the data, the format
of the data, the structure of the data and so on. Standards may include the yardsticks laid
by the company or organization using the database. There may be certain industry,
national or international standards that must be satisfied by the data. Standardization of
data particularly helps in migrating or interchanging data between different systems.

 Improvement in Data Security: In conventional systems, applications were developed in


an impromptu manner. Usually, different systems of an organization would access
different components of the operational data. In such an environment, enforcing security
can be quite difficult. Setting up of a DBMS makes it easier to enforce security
restrictions since the data are stored centrally. DBMS can ensure that the only means of
accessing the database is through the authorized channel. Hence, data security checks can
be carried out whenever access is attempted to sensitive data. To ensure security, DBMS
provides security tools such as user codes and passwords. Different checks can be
established for each type of access (i.e. addition, modification and deletion) to each piece
of information in the database.

 Maintenance of Data Integrity: Data integrity refers to ensuring that the data in the
database are accurate. Since, in DBMS, the data are centralized and is used by a number
of users at a time, it is essential to enforce integrity controls. Integrity may be
compromised in many ways. For example, someone might input the salary data of a full-
time employee as 50,000 rather than 5000.

14
If many users are allowed to update the same data item at the same time, there is a
possibility of incorrect and inconsistent updates. For example, in an airline reservation
DBMS, there could be a situation where the number of bookings made is larger than the
capacity of the aircraft. Therefore, appropriate controls must be introduced to prevent
occurrence of such errors because of concurrent updating activities. However, since all
data are stored only once, it is often easier to maintain integrity than in conventional
systems.

 Better Interaction with Users: As compared to traditional database systems, a DBMS


often provides better service to the users. In conventional systems, usually the
information is poorly arranged and, as a result, the availability of up-to-date information
becomes poor. However, in case of DBMS, the availability of up-to-date information
improves since the data can now be shared and the DBMS makes it easy to respond to
unforeseen information requests. Centralizing the data in a database also means that users
can obtain new and combined information that would have been impossible to obtain
otherwise. In addition, use of a DBMS allows the users, who do not know programming,
to interact with the data more easily.

 Efficient System: It is very common to change the contents of the stored data. These
changes can easily be made in a DBMS than in a conventional system as these changes
do not need to have any impact on application programs. The cost of developing and
maintaining systems is also lower. It is much easier to respond to unforeseen requests
when the data are centralized in a database than when it is stored in file-based systems.
Although the initial cost of setting up of a DBMS can be high, its overall cost is less than
that of similar service using conventional systems.

Components of a DBMS

Usually, a DBMS is a large software package that carries out diverse tasks including the
provision of facilities to enable the user to access and modify information in the database. On
one hand, it is an intermediate link among the physical database, the computer and the operating
system, and on the other hand, the users. Essentially, this system involves data, the hardware that
physically stores that data, the software that utilizes the hardware's file system to store the data
and provide a standardized method for retrieving or changing the data and, finally, the users who
turn the data into information.

 Data: Data stored in a database includes numerical data including whole numbers and
floating-point numbers, and non-numerical data such as characters, date or logical values
(true or false). More advanced systems may include more complicated data entities such
as pictures and images as data types.

15
 Hardware: Hardware of the system can range from a PC to a network of computers. It
also includes various storage devices (like hard disks) and input and output devices (like
monitor and printer).
 Software: Software of a DBMS includes the DBMS operating system, network software
(if necessary) and the application programs.
 Users: In DBMS, generally three broad classes of users are considered. These are
application programmers, end users and DBA. The application programmers develop the
application programs. These programs can manipulate the database in all possible ways.
The end users access the database from a terminal using a query language provided by
the database system or through application programs developed by application
programmers. The DBA is the person who is responsible for the design, construction and
maintenance of a database.

Database Administrator

One of the main reasons for having DBMSs is to have central control of both data and programs
accessing that data. The person having the central control over the system is called database
administrator (DBA). The DBA is an information technology expert or a well-trained, computer
literate who is responsible for the technical operations of a database or all databases in an
organization. In reality, the DBA may be a department or group rather than one person. They are
the custodian of database accuracy, efficiency, maintenance and development. Largely, they
control access to information, ensuring that it is updated accurately and regularly. As part of a
database team, they collaborate in the design and development of databases to meet ongoing user
needs.

A DBA needs to stay abreast of emerging technologies and new design approaches. Typically, a
DBA either has a degree in computer science and some on-the-job training with any database
product or more extensive experience with a range of database products. Usually one should be
experienced in major database management products such as Structured Query Language (SQL),
SAP and Oracle-based database management software. DBAs should have an excellent
knowledge of computers and organizational structures.

The DBA has many different responsibilities, but the overall goal of a DBA is to maintain the
database system and to provide users with access to the required information when they need it.
The DBA makes sure that the database is protected and that any chance of data loss is
minimized. Typical responsibilities of the DBA include the following:

Ensuring regular backups of a database, and in case of failure (or disaster like fire or flood),
suitable recovery procedures are used to restore the database services with as little down time as
possible.

16
 Granting different types of authorization to regulate which parts of the database various
users can access.
 Ensuring regular and accurate update of database(s).
 Collaborating in the design and development of databases to meet new user needs and
respond to anticipate technological innovations.
 Communicating regularly with internal technical applications and operational staff to
ensure the database integrity and security.
 Identifying and resolving user's problems.
 Facilitating sharing of common data by overseeing proper key management and data
dictionary maintenance.
 Procuring and maintaining database software and related documents and tools.

DATABASE LANGUAGES

A DBMS mainly provides two database languages—data definition language (DDL) and data
manipulation language (DML) to implement the databases.

Data Definition Language: DDL is used to create and delete database and its objects. These
commands are primarily used by the DBA during the building and removal phases of a database
project.

Data Manipulation Language: DML is used to retrieve, insert, modify and delete database
information. These commands will be used by all database users during the routine operation of
the database.

Usually, a database provides its own query/programming language to utilize these languages.
However, nowadays, every DBMS supports the universal query language, named SQL to
perform the definitive and manipulative functions.

17

Vous aimerez peut-être aussi