You are on page 1of 19

Unit 1: The Database Environment

Unit 1
The Database Environment
Introduction

Good decisions require good information derived from raw facts. Data
is managed most efficiently when stored in a database and databases
evolved from computer file systems and understanding file system
characteristics is important.
Databases solve many of the problems encountered in data management. It
is used in almost all modern settings involving data management in Business,
Research, and Administration. It is important to understand how databases
work and interact with other applications.

Data vs. Information


Data are meaningful facts, text, graphics, images, sound, video
segments
Information is the result of processing raw data to reveal its meaning.
It requires context to reveal meaning.
Raw data must be formatted for storage, processing and presentation.
Data are the foundation of information, which is the bedrock of
knowledge
• Data: building blocks of information
• Information produces by processing data
• Information used to revel meaning is the key to good decision
making
• Good decision making is the key to organizational survival
• Data management: focuses on proper generation, storage and
retrieval of data.

Metadata are data that describe the properties or characteristics of


other data.

Introducing the database

Database: shared, integrated computer structure that stored a


collection of:
- End-user data: raw facts of interest to end user

Instructor: SONNY BOY M. SASIS Page|1


Unit 1: The Database Environment

- Metadata: data that describes data


DBMS (Database Management System) – software package that
stores and manage databases.
- Manages structure and controls access to data
DBMS Architecture
The design of a DBMS depends on its architecture. It can be
centralized or decentralized or hierarchical. The architecture of a
DBMS can be seen as either single tier or multi-tier. An n-tier
architecture divides the whole system into related but independent n
modules, which can be independently modified, altered, changed, or
replaced.
In 1-tier architecture, the DBMS is the only entity where the user
directly sits on the DBMS and uses it. Any changes done here will
directly be done on the DBMS itself. It does not provide handy tools for
end-users. Database designers and programmers normally prefer to
use single-tier architecture.
If the architecture of DBMS is 2-tier, then it must have an application
through which the DBMS can be accessed. Programmers use 2-tier
architecture where they access the DBMS by means of an application.
Here the application tier is entirely independent of the database in
terms of operation, design, and programming.

3- tier Architecture

A 3-tier architecture separates its tiers from each other based on the
complexity of the users and how they use the data present in the
database. It is the most widely used architecture to design a DBMS.

Instructor: SONNY BOY M. SASIS Page|2


Unit 1: The Database Environment

• Database (Data) Tier − At this tier, the database resides along


with its query processing languages. We also have the relations
that define the data and their constraints at this level.
• Application (Middle) Tier − At this tier reside the application
server and the programs that access the database. For a user,
this application tier presents an abstracted view of the database.
End-users are unaware of any existence of the database beyond
the application. At the other end, the database tier is not aware
of any other user beyond the application tier. Hence, the
application layer sits in the middle and acts as a mediator
between the end-user and the database.
• User (Presentation) Tier − End-users operate on this tier and
they know nothing about any existence of the database beyond
this layer. At this layer, multiple views of the database can be
provided by the application. All views are generated by
applications that reside in the application tier.
Multiple-tier database architecture is highly modifiable, as almost all its
components are independent and can be changed independently.

Database Schema

A database schema is the skeleton structure that represents the


logical view of the entire database. It defines how the data is
organized and how the relations among them are associated. It
formulates all the constraints that are to be applied on the data.

A database schema defines its entities and the relationship among


them. It contains a descriptive detail of the database, which can be
depicted by means of schema diagrams. It’s the database designers
who design the schema to help programmers understand the
database and make it useful.

Instructor: SONNY BOY M. SASIS Page|3


Unit 1: The Database Environment

A database schema can be divided broadly into two categories −


• Physical Database Schema − This schema pertains to the
actual storage of data and its form of storage like files, indices,
etc. It defines how the data will be stored in a secondary storage.
• Logical Database Schema − This schema defines all the logical
constraints that need to be applied on the data stored. It defines
tables, views, and integrity constraints.

Database Instance

It is important that we distinguish these two terms individually.


Database schema is the skeleton of database. It is designed when the
database doesn't exist at all. Once the database is operational, it is
very difficult to make any changes to it. A database schema does not
contain any data or information.

A database instance is a state of operational database with data at any


given time. It contains a snapshot of the database. Database
instances tend to change with time. A DBMS ensures that its every
instance (state) is in a valid state, by diligently following all the
validations, constraints, and conditions that the database designers
have imposed.

DBMS-Data Independence
If a database system is not multi-layered, then it becomes difficult to
make any changes in the database system. Database systems are
designed in multi-layers as we learnt earlier.
Data Independence
Instructor: SONNY BOY M. SASIS Page|4
Unit 1: The Database Environment

- A database system normally contains a lot of data in addition to


users’ data. For example, it stores data about data, known as
metadata, to locate and retrieve data easily. It is rather difficult to modify or
update a set of metadata once it is stored in the database. But
as a DBMS expands, it needs to change over time to satisfy the
requirements of the users. If the entire data is dependent, it
would become a tedious and highly complex job.

- Metadata itself follows a layered architecture, so that when we


change data at one layer, it does not affect the data at another
level. This data is independent but mapped to each other.
Logical Data Independence
- Logical data is data about database, that is, it stores information
about how data is managed inside. For example, a table
(relation) stored in the database and all its constraints, applied
on that relation.
- Logical data independence is a kind of mechanism, which
liberalizes itself from actual data stored on the disk. If we do
some changes on table format, it should not change the data
residing on the disk.
Physical Data Independence
- All the schemas are logical, and the actual data is stored in bit
format on the disk. Physical data independence is the power to
change the physical data without impacting the schema or
logical data.
- For example, in case we want to change or upgrade the storage
system itself − suppose we want to replace hard-disks with SSD
– it should not have any impact on the logical data or schemas.

Instructor: SONNY BOY M. SASIS Page|5


Unit 1: The Database Environment

Topic 2: Traditional File Processing vs. Database


Approach

Traditional File Processing vs. Database Approach What


is A File Processing System
A file processing system is a method for storing and organizing
computer files and the data they contain to make it easy to find and
access them. File processing systems may use a storage device such
as a hard disk or CD-ROM and involve maintaining the physical
location of the files.

The traditional approach to information system design focuses


on data processing needs of individual department in an organization
without considering the organization as a whole. Each computer
application typically designed with its own set of data file and
application programs to meet the information requirements of particular
department or a user group.

Database approach overcomes the limitation of file oriented


system by supporting an integrated, centralized data structure which
allows to sharing database by different applications.

Instructor: SONNY BOY M. SASIS Page|6


Unit 1: The Database Environment

Instructor: SONNY BOY M. SASIS Page|7


Unit 1: The Database Environment

Traditional File Approach Database Approach


Use separate data file for each All Application shares a pool of
application related and integrated data.
Data redundancy – independent Minimal data redundancy –
data files included a lot of Separate data files are
duplicated data. integrated in to a single, logical
structure.
Same data is recorded and Each occurrence of a data item
stored in several files. is recorded only once.
Data inconsistency – several Single version of data exist
versions of the same data may
exist.
Same update must be done in all Single update is required.
occurrences of same data item
in each file.
Users have very little opportunity A database is developed to
to share data outside of their share the data among the user
own application. who access to it
There is no centralized control for There is centralized control for
overall data in different files. overall data in database.
Data dependence – description Data independence – the
of files, records and data items database system separates data
are embedded within individual descriptions from the application
application programs. programs that use the data in it
Modification to data files requires Data structure can be modified
the programs which access that without changing the programs
file to be modified. accessing the data
High program maintenance Less program maintenance
Lack of data integration – Data are organized in to a single
accessing data in several logical structure with logical
files are difficult relationships defined between
associated data
Difficult to manipulation data Easy to manipulation data

Traditional File System

Before the use of a computer, a manual file system was used to


maintain the records and files. Data were stored and processed using
a traditional file system and it makes it easy to find any information. In
this traditional file system, each file is independent of other file and
data in the different file can be integrated only by writing an individual

Instructor: SONNY BOY M. SASIS Page|8


Unit 1: The Database Environment

program for each application. The data and application program that
uses the data are arranged that any change to data requires
modification of all the programs that use the data. Sometimes, it is not
possible to identify all the programs using data and identified on trial
and error basis. All functional areas in the organization create,
processes its own files.
The files such as inventory and payroll generate separate files and do
not communicate with each other. The organization was simple to
generate and had better local control but the data of an organization is
dispersed throughout the functional subsystem.

Components of Traditional File System

Hardware, Software, data manager, DB Engine, User, Data, Database,


Database access language, Server, Run Time Manager.

Applications of Traditional File System

The application is developed for a specific purpose and they will


access the database only.

Uses of Traditional File System

• Language-specific run-time libraries


• User programs use file system APIs to make requests of the file
system  Data transfer  Positioning.
• Updating metadata
• Managing directories.
• Managing access specifications.
• Removal

Instructor: SONNY BOY M. SASIS Page|9


Unit 1: The Database Environment

Advantages of Traditional File System

• Simple to use.
• Less complex.
• Minimal investment (Not make the investment in software
because it allows us to transport files from one to another
computer).
• No requirement of the specialist.

Disadvantages of Traditional File System

• Data redundancy (Each application has its own data file so,
same data may have to be recorded and stored in many times).
• Data inconsistency (Due to the same data items that appear in
more than one file do not get updated simultaneously in each
and every file).
• Data dependence (Program and application in the file
processing system are data dependent but, the problem is
incompatible with file format).
• Limited data sharing.
• The problem with security.
• Retrieval (retrieval is not easy).
• Time-consuming.
• Inefficient to maintain the record of the big firm having a large
number of items.
• Required Lots of labor work to do.

Topic 3: The Range of Advanced Database Application

Presentation of Contents
The range of database application:
Databases range from those for a single user with a desktop computer
to those on mainframe computer with thousands of user. The range of
database application can be divided into four categories from simplest
to most complex.

1. Personal Computer Database: Personal computer (PC)


databases are designed to support one user with a standalone
personal computer (for example: a desktop or a laptop computer).
For example; consider a company that has a number of sales
persons who call on actual or prospective customers. Each
salesperson might carry a laptop computer with a simple database

Instructor: SONNY BOY M. SASIS P a g e | 10


Unit 1: The Database Environment

application to record customer information and the details of


contacts with each customer.

Some of the key decisions that must be made in developing


personal computer databases are the following:
• Should the application be purchased from an outside vendor or
developed within the organization?
• If the database application is developed internally, should it be
developed by the end user or by a professional within the
information systems department?
• What data are required by the user and how should the
database design?
• What commercial DBMS product should be used for the
application?
• Who is responsible for accuracy of the data in the personal
computer database?

2. Workgroup Databases: A workgroup is a relatively small team of


people who collaborate on the same project or application. A
workgroup typically comprise fewer than 25 persons. These
persons might be engaged with a construction project or with
developing a new computer application. A workgroup database is
designed to support the collaborative efforts of such a team.

Figure: Workgroup database with LAN

The method of sharing the data in this database is shown in the above
figure. Each member of the workgroup has a desktop computer and
the computers are linked by means of Local Area Network (LAN). The
database is stored on a central device called the database server.
Thus each member of the workgroup has access to the shared data.
Instructor: SONNY BOY M. SASIS P a g e | 11
Unit 1: The Database Environment

In establishing a workgroup database, the organization must answer


the same questions that applied to personal computer databases. In
addition, the following database management question arise:
• How can the design of the database be optimized for a variety of
group members’ information requirement?
• How can the various members’ use the database concurrently
without comprising the integrity of the database? 
• Which database processing operations should be performed at a
workstation and which should occur on the server? 

3. Department Database: A department is a functional unit within an


organization. Typical examples of departments are personnel,
marketing, manufacturing & accounting. A department is generally larger than a
workgroup (typically between 25 & 100 persons)

Department databases are designed to support the various functions &


activities of a department. For examples; consider a personnel
database that is designed to track data concerning implies, jobs, skills
and job assignments.

Typical questions that must be addressed when designing and


implementing department databases include the following:
• How can the database and its environment be designed to
produce adequate performance give the large number of users
and user transaction?
• How can adequate security be provided to protect against
unauthorized disposer or distribution of sensitive data? 
• What database and application development tools should be
used in this complex environment?
• Do other departments maintain the same type of data, and if so,
how can data redundancy and consistency of database
managed?

4. Enterprise Database: An enterprise database is one whose scope


is the entire organization or enterprise. Such databases are
extended to support organization-wide operation and decision
making. Arguably the most important type of enterprise database.
Today is called a data warehouse. A data warehouse is an
integrated decision support database whose content is derived from
the various operational databases (such personal computer
workgroup & department databases).

Instructor: SONNY BOY M. SASIS P a g e | 12


Unit 1: The Database Environment

Figure: An Enterprise Database

Several questions that often arise in the context of an enterprise


database are the following:

As shown in the above figure each of this medical center has a


separate database. These databases contains data concerning patient,
physician, medical services, business operation etc.

• How should the data be distributed among the various locations


in the corporate structure?
• How can the organization develop and maintain standards
concerning data names, definitions, formats & related issues? 

Database System Application:


Databases are widely used. Some representative applications are
as follows:

1. Banking: For customer information, accounts, loans and


banking transaction.
2. Airlines: For reservations schedules information.
3. Universities: For student information, course, registration and
results with grades.
4. Credit Card Transaction: For purchases on credit cards and
generation of monthly statements.
5. Telecommunication: For keeping records of calls made,
generating monthly bills, maintaining balances on prepaid calling
cards and storing information about the communication
networks.
6. Finance: For storing information about holdings, sales,
purchases of financial instruments such as stocks and bonds;

Instructor: SONNY BOY M. SASIS P a g e | 13


Unit 1: The Database Environment

also for storing real time market data to enable online trading by
customers and automated trading by the firm.
7. Sales: For customer, product and purchase information.
8. Online Retailers: For sales data noted above plus online order
tracking, generation of recommendation lists and maintenance
of online product evaluations.
9. Manufacturing: For management of the supply chain and
tracking production of items in factories, inventories of items in
warehouse and stores and orders for items.
10. Human Resources: For information about employees, salaries,
payroll taxes, benefits and for generation of pay checks.

Presentation of Contents

Organizations produce and gather data as they operate. Contained in a


database, data is typically organized to model relevant aspects of
reality in a way that supports processes requiring this information.
Knowing how this can be managed effectively is vital to any
organization.
What is a Database Management System (or DBMS)?

Organizations employ Database Management Systems (or DBMS) to


help them effectively manage their data and derive relevant information
out of it. A DBMS is a technology tool that directly supports data
management. It is a package designed to define, manipulate, and
manage data in a database.

Some general functions of a DBMS:


• Designed to allow the definition, creation, querying, update, and
administration of databases
• Define rules to validate the data and relieve users of framing

Instructor: SONNY BOY M. SASIS P a g e | 14


Unit 1: The Database Environment

programs for data maintenance


• Convert an existing database, or archive a large and growing
one
• Run business applications, which perform the tasks of managing
business processes, interacting with end-users and other
applications, to capture and analyze data
• Some well-known DBMSs are Microsoft SQL Server, Microsoft
Access, Oracle, SAP, and others.
Components of DBMS
DBMS have several components, each performing very significant
tasks in the database management system environment. Below is a list
of components within the database and its environment.

Software. This is the set of programs used


to control and manage the overall database. This includes the DBMS
software itself, the Operating System, the network software being used
to share the data among users, and the application programs used to
access data in the DBMS.

Hardware Consists of a set of physical


electronic devices such as computers, I/O devices, storage devices,
etc., this provides the interface between computers and the real world
systems.

Data DBMS exists to collect, store, process


and access data, the most important component. The database
contains both the actual or operational data and the metadata.

Procedures These are the instructions and


rules that assist on how to use the DBMS, and in designing and running
the database, using documented procedures, to guide the users that
operate and manage it.

Database Access Language This is used to access the data to


and from the database, to enter new data, update existing data, or
retrieve required data from databases. The user writes a set of
appropriate commands in a database access language, submits these

Instructor: SONNY BOY M. SASIS P a g e | 15


Unit 1: The Database Environment

to the DBMS, which then processes the data and generates and
displays a set of results into a user readable form.

Query Processor This transforms the user queries into a series of low
level instructions. This reads the online user’s query and translates
it into an efficient series of operations in a form capable of being
sent to the run time data manager for execution.

Run Time Database Manager Sometimes


referred to as the database control system, this is
the central software component of the DBMS that interfaces with user-
submitted application programs and queries, and handles database
access at run time. Its function is to convert operations in user’s
queries. It provides control to maintain the consistency, integrity and
security of the data.

Data Manager Also called the cache


manger, this is responsible for handling of data in the database,
providing a recovery to the system that allows it to recover the data
after a failure.

Database Engine The core service for storing, processing, and


securing data, this provides controlled access and rapid transaction
processing to address the requirements of the most demanding data
consuming applications. It is often used to create relational databases
for online transaction processing or online analytical processing data.

Data Dictionary This is a reserved space


within a database used to store information about
the database itself. A data dictionary is a set of read-only table and
views, containing the different information about the data used in the
enterprise to ensure that database representation of the data follow one
standard as defined in the dictionary.

Report Writer Also referred to as the report


generator, it is a program that extracts information from one or more
files and presents the information in a specified format. Most report
writers allow the user to select records that meet certain conditions and

Instructor: SONNY BOY M. SASIS P a g e | 16


Unit 1: The Database Environment

to display selected fields in rows and columns, or also format the data
into different charts.

Topic 5: Advantages and Disadvantages of Database

Presentation of Contents
Roles and Advantages of the
DBMS Roles:

DBMS is the intermediary between the user and the database o
Database structure stored as file collection o Can only access
files through the DBMS

DBMS enables data to be shared

DBMS integrates many users’ views of the data Advantages:

• End users have better access to more and better-managed


data
– Improved data sharing
– Improved data security
– Better data integration
– Minimized data inconsistency
– Improved data access, thereby producing quick answers
to ad hoc queries
– Improved decision making
– Increase end-user productivity

Advantages of database processing system:


1. Backup:
• It is possible to take faster and automatic back-up of database

stored in files of computer-based systems.


• computer systems provide functionalities to serve this purpose.it
is also possible to develop specific application program for this
purpose.
2. Compactness:
• It is possible to store data compactly.
3. Data Retrieval:
• Computer-based systems provide enhanced data retrieval
techniques to retrieve data stored in files in easy and efficient
way.
4. Editing:
Instructor: SONNY BOY M. SASIS P a g e | 17
Unit 1: The Database Environment

• It is easy to edit any information stored in computers in form of


files.
• Specific application programs or editing software can be used
for this purpose.
5. Remote Access:
• In computer-based systems, it is possible to access data

remotely.
• so, to access data it is not necessary for a user to remain
present at location where these data are kept.
6. Sharing:
• Data stored in files of computer-based systems ca be shared

among multiple users at a same time. 



Disadvantages of database processing system:

1.
Data Redundancy:
• It is possible that the same information may be duplicated in
different files. this leads to data redundancy results in memory
wastage.
2.
Data Inconsistency:
• Because of data redundancy, it is possible that data may not be
in consistent state.
3.
Difficulty in Accessing Data:
• Accessing data is not convenient and efficient in file processing
system.
4.
Limited Data Sharing:
• Data are scattered in various files. also different files may have
different formats and these files may be stored in different
folders may be of different departments.
• So, due to this data isolation, it is difficult to share data among
different applications.
5.
Integrity Problems:
• Data integrity means that the data contained in the database in
both correct and consistent for this purpose the data stored in
database must satisfy correct and constraints.
6.
Atomicity Problems:
• Any operation on database must be atomic.
• this means, it must happen in its entirely or not at all.
7.
Concurrent Access Anomalies:

Instructor: SONNY BOY M. SASIS P a g e | 18


Unit 1: The Database Environment

• Multiple users are allowed to access data simultaneously this is


for the sake of better performance and faster response.
8.
Security Problems:
• Database should be accessible to users in limited way.
• Each user should be allowed to access data concerning his
requirements only.

References:
https://tutorialink.com/dbms/advantage-and-disadvantages-of-file-oriented-
system.dbms
https://www.includehelp.com/dbms/dbms-vs-traditional-file-system.aspx
Database System concepts, Written by Abraham Silbierschatz (Page no- 1-2)

Instructor: SONNY BOY M. SASIS P a g e | 19

You might also like