You are on page 1of 7

Database Concepts:

What Is a Database?
A database can be summarily described as a repository for data. This makes clear that building
databases is really a continuation of a human activity that has existed since writing began; it can be
applied to the result of any bookkeeping or recording activity that occurred long before the advent of the
computer era. However, this description is too vague for some of our purposes, and we refine it as we go
along. The creation of a database is required by the operation of an enterprise. We use the term
enterprise to designate a variety of endeavors that range from an airline, a bank, or a manufacturing
company to a stamp collection or keeping track of people to whom you want to write New Year cards.
Throughout this book we use a running example that deals with the database of a small college. The
college keeps track of its students, its instructors, the courses taught by the college, grades received by
students, and the assignment of advisors to students, as well as other aspects of the activity of the
institution that we discuss later. These data items constitute the operational data — that is, the data that
the college needs to function. Operational data are built from various input data (application forms for
students, registration forms, grade lists, schedules) and is used for generating output data (transcripts,
registration records, administrative reports, etc.) Note that no computer is necessary for using such a
database; a college of the 1930’s would have kept the same database in paper form. However, the
existence of computers to store and manipulate the data does change user expectations: we expect to
store more data and make more sophisticated use of these data.

A database system is a computer based record keeping System whose overall purpose is to record and
maintain information that is relevant to the organization necessary for making decisions.
With the growth of the database, these systems are used in various applications of real world such as
• Banking System and ATM's machines.
• Stock Trading Systems.
• Flight Reservation Systems.
• Computerized Library Systems.
• Super Market Product Inventory System.
• Credit Card/Credit Limit Check System.
Database can range from those of a single user with a desktop computer to those on mainframe
computers with thousands of users.

COMPONENTS OF DATABASE SYSTEM


A database system is composed of four components;
• Data
• Hardware
• Software
• Users
which coordinate with each other to form an effective database system.
Fig. 1.1 Data Base System

1. Data - It is a very important component of the database system. Most of the organizations generate,
store and process 1arge amount of data. The data acts a bridge between the machine parts i.e. hardware
and software and the users which directly access it or access it through some application programs.
Data may be of different types.
• User Data - It consists of a table(s) of data called Relation(s) where Column(s) are called fields of
attributes and rows are called Records for tables. A Relation must be structured properly.
• Metadata - A description of the structure of the database is known as Metadata. It basically means
"data about data". System Tables store the Metadata which includes.
- Number of Tables and Table Names
- Number of fields and field Names
- Primary Key Fields
• Application Metadata - It stores the structure and format of Queries, reports and other applications
components. '

2.Hardware - The hardware consists of the secondary storage devices such as magnetic disks (hard
disk, zip disk, floppy disks), optical disks (CD-ROM), magnetic tapes etc. on which data is stored together
with the Input/Output devices (mouse, keyboard, printers), processors, main memory etc. which are
used for storing and retrieving the data in a fast and efficient manner. Since database can range from
those of a single user with a desktop computer to those on mainframe computers with thousand of users,
therefore proper care should be taken for choosing appropriate hardware devices for a required
database.

3.Software - The Software part consists of DBMS which acts as a bridge between the user and the
database or in other words, software that interacts with the users, application programs, and database
and files system of a particular storage media (hard disk, magnetic tapes etc.) to insert, update, delete
and retrieve data. For performing these operations such as insertion, deletion and updation we can
either use the Query Languages like SQL, QUEL, Gupta SQL or application softwares such as Visual 3asic,
Developer etc.

4. Users - Users are those persons who need the information from the database to carry out their
primary business responsibilities i.e. Personnel, Staff, Clerical, Managers, Executives etc. On the basis of
the job and requirements made by them they are provided access to the database totally or partially.
The various types of users which can access the database are:-
• Database Administrators (DBA)
• Database Designers
• End Users
• Application Programmers

Advantages of Database Management System:


The DBMS has a number of advantages as compared to traditional computer file processing approach.
The DBA must keep in mind these benefits or capabilities during designing databases, coordinating and
monitoring the DBMS.
The major advantages of DBMS are described below.
1. Controlling Data Redundancy:
In non-database systems (traditional computer file processing), each application program has its own
files. In this case, the duplicated copies of the same data are created at many places. In DBMS, all the data
of an organization is integrated into a single database. The data is recorded at only one place in the
database and it is not duplicated. For example, the dean's faculty file and the faculty payroll file contain
several items that are identical. When they are converted into database, the data is integrated into a
single database so that multiple copies of the same data are reduced to-single copy.
In DBMS, the data redundancy can be controlled or reduced but is not removed completely. Sometimes,
it is necessary to create duplicate copies of the same data items in order to relate tables with each other.
By controlling the data redundancy, you can save storage space. Similarly, it is useful for retrieving data
from database using queries.
2. Data Consistency:
By controlling the data redundancy, the data consistency is obtained. If a data item appears only once,
any update to its value has to be performed only once and the updated value (new value of item) is
immediately available to all users.
If the DBMS has reduced redundancy to a minimum level, the database system enforces consistency. It
means that when a data item appears more than once in the database and is updated, the DBMS
automatically updates each occurrence of a data item in the database.
3. Data Sharing:
In DBMS, data can be shared by authorized users of the organization. The DBA manages the data and
gives rights to users to access the data. Many users can be authorized to access the same set of
information simultaneously. The remote users can also share same data. Similarly, the data of same
database can be shared between different application programs.
4. Data Integration:
In DBMS, data in database is stored in tables. A single database contains multiple tables and
relationships can be created between tables (or associated data entities). This makes easy to retrieve
and update data.
5. Integrity Constraints:
Integrity constraints or consistency rules can be applied to database so that the correct data can be
entered into database. The constraints may be applied to data item within a single record or they may be
applied to relationships between records.
Examples:
The examples of integrity constraints are:
(i) 'Issue Date' in a library system cannot be later than the corresponding 'Return Date' of a book.
(ii) Maximum obtained marks in a subject cannot exceed 100.
(iii) Registration number of BCS and MCS students must start with 'BCS' and 'MCS' respectively etc.
There are also some standard constraints that are intrinsic in most of the DBMSs. These are;
Constraint
Description
Name
PRIMARY Designates a column or combination of columns as Primary Key and
KEY therefore, values of columns cannot be repeated or left blank.
Relates one table with another table.
FOREIGN KEY

Specifies that values of a column or combination of columns cannot be


UNIQUE
repeated.
NOT NULL Specifies that a column cannot contain empty values.
CHECK Specifies a condition which each row of a table must satisfy.
Most of the DBMSs provide the facility for applying the integrity constraints. The database designer (or
DBA) identifies integrity constraints during database design. The application programmer can also
identify integrity constraints in the program code during developing the application program. The
integrity constraints are automatically checked at the time of data entry or when the record is updated. If
the data entry operator (end-user) violates an integrity constraint, the data is not inserted or updated
into the database and a message is displayed by the system. For example, when you draw amount from
the bank through ATM card, then your account balance is compared with the amount you are drawing. If
the amount in your account balance is less than the amount you want to draw, then a message is
displayed on the screen to inform you about your account balance.
6. Data Security:
Data security is the protection of the database from unauthorized users. Only the authorized persons
are allowed to access the database. Some of the users may be allowed to access only a part of database
i.e., the data that is related to them or related to their department. Mostly, the DBA or head of a
department can access all the data in the database. Some users may be permitted only to retrieve data,
whereas others are allowed to retrieve as well as to update data. The database access is controlled by the
DBA. He creates the accounts of users and gives rights to access the database. Typically, users or group of
users are given usernames protected by passwords.
Most of the DBMSs provide the security sub-system, which the DBA uses to create accounts of users and
to specify account restrictions. The user enters his/her account number (or username) and password to
access the data from database. For example, if you have an account of e-mail in the "hotmail.com" (a
popular website), then you have to give your correct username and password to access your account of
e-mail. Similarly, when you insert your ATM card into the Auto Teller Machine (ATM) in a bank, the
machine reads your ID number printed on the card and then asks you to enter your pin code (or
password). In this way, you can access your account.
7. Data Atomicity:
A transaction in commercial databases is referred to as atomic unit of work. For example, when you
purchase something from a point of sale (POS) terminal, a number of tasks are performed such as;
 Company stock is updated.
 Amount is added in company's account.
 Sales person's commission increases etc.
All these tasks collectively are called an atomic unit of work or transaction. These tasks must be
completed in all; otherwise partially completed tasks are rolled back. Thus through DBMS, it is ensured
that only consistent data exists within the database.
8. Database Access Language:
Most of the DBMSs provide SQL as standard database access language. It is used to access data from
multiple tables of a database.
9. Development of Application:
The cost and time for developing new applications is also reduced. The DBMS provides tools that can be
used to develop application programs. For example, some wizards are available to generate Forms and
Reports. Stored procedures (stored on server side) also reduce the size of application programs.
10. Creating Forms:
Form is very important object of DBMS. You can create Forms very easily and quickly in DBMS, Once a
Form is created, it can be used many times and it can be modified very easily. The created Forms are also
saved along with database and behave like a software component.
A Form provides very easy way (user-friendly interface) to enter data into database, edit data, and
display data from database. The non-technical users can also perform various operations on databases
through Forms without going into the technical details of a database.
11. Report Writers:
Most of the DBMSs provide the report writer tools used to create reports. The users can create reports
very easily and quickly. Once a report is created, it can be used many times and it can be modified very
easily. The created reports are also saved along with database and behave like a software component.
12. Control Over Concurrency:
In a computer file-based system, if two users are allowed to access data simultaneously, it is possible
that they will interfere with each other. For example, if both users attempt to perform update operation
on the same record, then one may overwrite the values recorded by the other. Most DBMSs have sub-
systems to control the concurrency so that transactions are always recorded" with accuracy.
13. Backup and Recovery Procedures:
In a computer file-based system, the user creates the backup of data regularly to protect the valuable
data from damaging due to failures to the computer system or application program. It is a time
consuming method, if volume of data is large. Most of the DBMSs provide the 'backup and recovery' sub-
systems that automatically create the backup of data and restore data if required. For example, if the
computer system fails in the middle (or end) of an update operation of the program, the recovery sub-
system is responsible for making sure that the database is restored to the state it was in before the
program started executing.
14. Data Independence:
The separation of data structure of database from the application program that is used to access data
from database is called data independence. In DBMS, database and application programs are separated
from each other. The DBMS sits in between them. You can easily change the structure of database
without modifying the application program. For example you can modify the size or data type of a data
items (fields of a database table).

On the other hand, in computer file-based system, the structure of data items are built into the individual
application programs. Thus the data is dependent on the data file and vice versa.
15. Advanced Capabilities:
DBMS also provides advance capabilities for online access and reporting of data through Internet. Today,
most of the database systems are online. The database technology is used in conjunction with Internet
technology to access data on the web servers.

Disadvantages of Database Management System (DBMS):


Although there are many advantages but the DBMS may also have some minordisadvantages. These
are:
1. Cost of Hardware & Software:
A processor with high speed of data processing and memory of large size is required to run the DBMS
software. It means that you have to upgrade the hardware used for file-based system. Similarly, DBMS
software is also Very costly.
2. Cost of Data Conversion:
When a computer file-based system is replaced with a database system, the data stored into data file
must be converted to database files. It is difficult and time consuming method to convert data of data
files into database. You have to hire DBA (or database designer) and system designer along with
application programmers; Alternatively, you have to take the services of some software houses. So a lot
of money has to be paid for developing database and related software.
3. Cost of Staff Training:
Most DBMSs are often complex systems so the training for users to use the DBMS is required. Training is
required at all levels, including programming, application development, and database administration.
The organization has to pay a lot of amount on the training of staff to run the DBMS.
4. Appointing Technical Staff:
The trained technical persons such as database administrator and application programmers etc are
required to handle the DBMS. You have to pay handsome salaries to these persons. Therefore, the system
cost increases.
5. Database Failures:
In most of the organizations, all data is integrated into a single database. If database is corrupted due to
power failure or it is corrupted on the storage media, then our valuable data may be lost or whole
system stops.

Types of Databases:
• Document-oriented database: A document-oriented database is a computer program designed
for storing, retrieving, and managing document-oriented, or semi structured data, information

 Embedded database: These databases consist of data developed by individual end-users.


Examples of these are collections of documents, spreadsheets, presentations, multimedia, and
other files.
 Graph database: Graph database is a kind of No SQL database that uses graph structures with
nodes, edges, and properties to represent and store information.

 Hypertext database: Hypertext databases are particularly useful for organizing large amounts
of disparate information. For example they are useful for maintaining online encyclopedias.

 Operational database: These database store detailed data about the operations of an
organization.

 Flat-File database: The flat-file style of database are ideal for small amounts of data that needs
to be human readable or edited by hand

 Distributed database: A distributed database is a database in which storage devices are not all
attached to a common processing unit such as the C.P.U. It may be stored in multiple computers
located in the same physical location, or may be dispersed over a network of interconnected
Concept of Normalization:
What is Normalization? _
The process by which we efficiently organize data to achieve these goals: _
 Eliminating redundancy _
 Ensuring data is stored in the correct table _
 Eliminating need for restructuring database when data is added. _
Five levels of normal form:
_ In order to achieve one level of normal form, each previous level must be met
However third normal form is sufficient for most typical database applications
(1) First Normal Form (1NF) :_
There are no repeating or duplicate fields. Each cell contains only a single value. Each record is unique. _
Identified by primary key
(2) Second Normal Form (2NF) :
_ All non-key fields depend on all components of the primary key. Guaranteed when primary key is a single
field.
(3) Third Normal Form (3NF) : _
No non-key field depends upon another. All non-key fields depend only on the primary key.

You might also like