You are on page 1of 24

This chapter introduces the fundamentals

of data and information, where the


CHAPTER organizing of data in hierarchy is a step
before storing the data into database. The

1
reason for using database is its capability
to process the stored data into the huge
amount of useful information. With the
vast number of databases available
today, the focus here is made to use
Microsoft Access, which is also the most
popular database in use today.

INTRODUCTION TO
DATABASE
Subtopics:-
1.1 View of Data
1.1.1 Data vs Information
1.1.2 Data Hierarchy
1.1.3 Data Hierarchy in a Database
1.1.4 Data Hierarchy in a Database and Data Hierarchy in a
Database System.
1.2 File System vs Database System
1.2.1 Non-computerized System
1.2.2 Traditional File Processing approach
1.2.2.1 Disadvantages of File Based Approach
1.2.3 Database Approach
1.2.3.1 Definition of Database
1.2.3.2 Definition of Database Management System (DBMS)
1.2.3.3 Purpose of Using Database
1.2.3.4 Component of Database System Environment
1.2.3.5 Component of Database Management System
1.2.3.6 Elements of Database
1.2.3.7 Design Tools

1.1. View of Data


Before the learning of database, it is important to take a view of data in different
aspects. First of all, the differences between data and information are reviewed. Other
aspects of data are three: first, the data hierarchy, which transforms data onto a
hierarchical structure, second, the data hierarchy in database system and third, how
data hierarchy maps onto the data hierarchy in database systems. Finally, the data
types are reviewed.

1.1.1 Data Vs Information

Data consists of facts, text, graphics and figure that can be recorded and that have
implicit meaning.

Information is the data that have been processed and being made to be useful for
users or decision-makers.

1.2 DEFINITION OF INFORMATION

Information is stimuli that have meaning in some context for its receiver. When
information is entered into and stored in a computer; it is generally referred to as data. After
processing (such as formatting and printing), output data can again be perceived
as information.

Example of Data and Information:

Number of Student By States

400
350
300
250
200
150
100
50
0
Kedah Selangor KualaPerakNegeri
LumpurSembilan

Figure 1.1 Data and Information

Data :
 Zulaikha, 871212-14-5050, 19, CM2383, No 2, Jln. 3 Tmn.
4 Bandar 5, Kuala Lumpur, Selangor

 Syarifah, 860612-02-2144, 20, CM1524, M-04-01, Jalan ¾,


Bandar Baru Jaya, Selangor, Selangor

Process :

 Number of students is counted according to the College-branch.


Information :
 Number of students enrolled to different College-branch by state is presented.

1.1.2 Data Hierarchy


Data can be further organized into a hierarchy. The student enrollment data as shown in Figure
1.1 can be further organized into a hierarchy as in Figure 1.2.

Figure 1.2 Data Hierarchy for a Student

The data hierarchy is also referred as hierarchical data model. For every data hierarchy,
the place, at where the data is stored, is named as the node. The nodes for the data
hierarchy above are Students node, Names node, IC node, Age node, Student ID node,
Addresses node and the College-branch node.

For the data hierarchy, the data search is performed from top-down and then left to
right manner, that is the Student node first, then follow by these nodes: Names, IC, Age,
Student ID, Address and College-branch.

Another way to view this data hierarchy is every Student carries the data, such as Names,
IC, Age, Student ID, Addresses and College-branch.
1.1.3 Data Hierarchy in a Database System
The data hierarchy in a database is the hierarchical organization within a database
structure. This organized structure standardized the data storage pattern in a database.
The advantages of such doing are to ease the data retrieving while withholding the
capability of growth in data storages.

Below is the hierarchy of data in database systems:

Figure 1-3 Hierarchy of Data in Database Systems

Bit (Character) - a bit is the smallest unit of data representation (value of a bit may be a 0 or
1). Eight bits make a byte which can represent a character or a special symbol in a character
code.

Field - a field consists of a grouping of characters. A data field represents an attribute (a


characteristic or quality) of some entity (object, person, place, or event).

Record - a record represents a collection of attributes that describe a real-world entity. A


record consists of fields, with each field describing an attribute of the entity.

File - a group of related records. Files are frequently classified by the application for which
they are primarily used (employee file). A primary key in a file is the field (or fields) whose
value identifies a record among others in a data file.

Database - is an integrated collection of logically related records or files. A database


consolidates records previously stored in separate files into a common pool of data records
that provides data for many applications. The data is managed by systems software called
database management systems (DBMS). The data stored in a database is independent of the
application programs using it and of the types of secondary storage devices on which it is
stored.
1.1.4 Data Hierarchy and Data Hierarchy in a Database System

A relationship can be established for every node on the data hierarchy to the
data hierarchy in database system. Developing the data hierarchy is the
preliminary stage for developing the data hierarchy of a database system.
Therefore, the data hierarchy can directly map onto the data hierarchy of a
database system.

For example, the student enrollment data, of which its data hierarchy is as
shown in Figure 1.2, can map onto the data hierarchy in a database system,
which is as shown in Figure 1-3. The mapping is as shown in Figure 1.4.

Figure 1-4 The Relation of Data Hierarchy and the Database’s Elements

1.1.5 Data Types


The data type of a data possesses the natural characteristic of the data. They can be in
many forms and they are, therefore, typed according to the natural characteristic. This is
as described in the table below:
(a) Text: – Any combination of letters, numbers and spaces.

– Text fields can be from 1 to 255 characters long.

– A text data type can be any alphanumerical/numerical


data you desire, but it can not be used do any
mathematical calculation. For example, 3 is treated as
“3”, 100 is treated as “100” and 9999 is treated as
“9999”. In this case, “3” + “100” = “3100”, which is a
concatenation of the two text data
type.

– Example: Amir Husin, Block 3, Pertaling Jaya.

(b) Numeric: – Any number with or without decimals.

– Two kinds of numeric:


Integer:
A two-byte whole number from – 32, 768 to 32, 767.
Example: 0, +1, -1
Real:
The number with decimal places.
(e.g. 1.5 cm, 48.5 kg, RM 20.50, 36.7).

(c ) Boolean – A two-byte true or false value.

(d) Currency: – A field that has special properties to store monetary


values accurately.

– Dollar signs are automatically added.


Example: $2000.00.

(e) Date/Time: – Date and time values for the years 100 through 9999.

Example:
General Date and Time: 4/5/99, 05:20:00 PM and
4/5/99.
Long Date: Wednesday, September 20, 2000.

1.2 File Systems Vs Database Systems


They are two types of commonly used systems, of which they are the file
systems and the database systems. When comparing file systems to database
systems, the differences turn out to be many. However, the overview of
file systems and database systems, including the advantages and
disadvantages of using them, are to be explained in great detail.

1.2.1 Non-computerized System


Non-computerized systems basically are all records or data that store
manually in different file locations. The non-computerized systems include
telephone books, dictionaries, recipe books, encyclopedias and anything
else which has organized and collected data. To make the data useful,
additional information is designed based on the data to solve a problem
with a purpose. Usually, a data is organized and sorted alphabetically,
numerically, extracted or combined with other data to produce the useful
information.

Example

E-Book is a bookstore that sells different kinds of books such as


Engineering, Multimedia, Health, Management, Computer and others. When
a new book is arrived, it is assigned with a reference number manually.
Then, the information about books, the publisher and author as described in
Figure 1-3 are recorded and kept in different cabinet in an alphabetical order,
as shown in Figure 1-4.
Figure 1-5 Book Information

Figure 1-6 E-Book: filed into the cabinet

The whole process, which includes assigning reference numbers to books and

recording the detail of books, is called non-computerized system.

Problem: Non-computerized System (or unprocessed information) is not efficient


because it consumes a lot of time to find and modify the information

Solution: E-Book bookstore has to create a new system called “Book Information
System” using the database. The process for creating the new system is known as
“Computerized System”.

1.2.2 Traditional File Processing Approach

Figure 1-7 Traditional File Processing Approach

As shown in Figure 1-7, information generated from the three departments, which are
personnel, sales and accounting, is submitted to the file processing system that process the
data into files: employee, customer and sales. The files are used by a collection of
applications that performs services for the end users (e.g. reports). The file processing
systems are still widely used today, especially for backing up database systems.

1.2.2.1 Disadvantages of File Based Approach


Because of the business applications evolved over time, the traditional file
processing had a number of shortcoming and limitations.

1.2.2.1.1 Duplication of Data


Same data is held by different programs and stored in several
locations. This situation requires additional space and maintaining
and updating data in several locations is expensive.
1.2.2.1.2 Data Integrity Problem
Files are stored within each application program that accesses a
given data. The problem occurs if updates are not applied in every
file. Changing the data in only one of the system will cause
inconsistent data and result in the other system because of
duplication of data.

 Limited Data Sharing


Each application has it owns private files and users have little
opportunity to share data outside their own application.

 Lengthy Development Time


Each new application requires that the developer essentially start
from scratch by designing new file formats. It takes time to
manipulate the data.

 Security
The security does not exist for data structure and data integrity is
not applicable to data of two related data structures.

1.2.3 Database Approach


A properly designed database offers a solution to the problems of file processing. A
database provides an overall framework that avoids data redundancy and supports a real-
time, dynamic environment. In file-processing environment, data files are designed to fit
individual business system. In contrast, in a database environment, several systems can be
built around a single database.

1.2.3.1 Definition of Database


Database is a collection of related data, designed to meet the information
needed in an organization and stores it in one specific location.

1.2.3.2 Definition of Database Management System (DBMS)


DBMS is a collection of programs that enable users to create and maintain
a database and provide control access to the database.
Example:

User uses an Application (Book Information System) in order to add


information about book. This application is created by using DBMS
(Microsoft Access).
DBMS is the way to access all information on book, publisher and author in
the database.

Figure 1-8 Database Management System

1.2.3.3 Components of Database System Environment

Database system refers to an organization of components that define and regulate the
collection, storage, management and use of data within a database environment.

Figure 1-9 Component of Database System Environment

Components of DBMS
A database management system (DBMS) consists of several components. Each component
plays very important role in the database management system environment. The major
components of database management system are:

 Software
 Hardware
 Data
 Procedures
 Database Access Language

Software
The main component of a DBMS is the software. It is the set of programs used to handle the
database and to control and manage the overall computerized database

1. DBMS software itself, is the most important software component in the overall
system
2. Operating system including network software being used in network, to share the data
of database among multiple users.
3.
4. Application programs developed in programming languages such as C++, Visual
Basic that are used to to access database in database management system. Each
program contains statements that request the DBMS to perform operation on
database. The operations may include retrieving, updating, deleting data etc . The
application program may be conventional or online workstations or terminals.

Hardware
Hardware consists of a set of physical electronic devices such as computers (together with
associated I/O devices like disk drives), storage devices, I/O channels, electromechanical
devices that make interface between computers and the real world systems etc, and so on. It
is impossible to implement the DBMS without the hardware devices, In a network, a
powerful computer with high data processing speed and a storage device with large storage
capacity is required as database server.

Data

Data is the most important component of the DBMS. The main purpose of DBMS is to
process the data. In DBMS, databases are defined, constructed and then data is stored,
updated and retrieved to and from the databases. The database contains both the actual (or
operational) data and the metadata (data about data or description about data).
Procedures

Procedures refer to the instructions and rules that help to design the database and to use the
DBMS. The users that operate and manage the DBMS require documented procedures on hot
use or run the database management system. These may include.

 Procedure to install the new DBMS.


 To log on to the DBMS.
 To use the DBMS or application program.
 To make backup copies of database.
 To change the structure of database.
 To generate the reports of data retrieved from database.

1.2.3.4 Components of Database Management System (DBMS)

Figure 1-10 The Components of Database System

1.2.3.5 Elements of Database

Database contains four elements: user data, metadata, indexes and application
metadata.

(a) User Data


– Database represents user data as relations. Relation is a table of
data.
(b) Metadata
– Data concerning the structure of data in a database that is
stored in the data dictionary (data dictionary stores the
description of all objects that interact with the database).
– Metadata is used to describe tables, columns, constraints and
indexes.

Example

Figure 1-11 User Data


And Metadata

(c) Indexes
– Data are stored by ascending or descending order in the database,
to improve the performance and accessibility of the database.

Example
Figure 1-12
Indexes

(d) Application Metadata


– Used to store the structure and format of user forms, reports,
queries and other application created by user.
– User or developer cannot retrieve application metadata.
– They use tools in DBMS to process the data.

1.2.3.6 Design tools

A design tool has a set of tools to design and create the application database. It includes tools
for creating tables, forms, queries and reports.

a) Table
- Store information about specific topic.
- A table consists of fields and records.
- You can have more than one table in any database
Example

Figure 1-15
A Table
b) Forms
– Forms present information in a database in an attractive way.
– Provide a quick way to view, enter and change 1
information.
Example

Figure 1-16 A publisher

c) Queries
- Queries allow you to find information of interest in a database.

Example

Figure 1-17 A Query

d) Reports

- Reports are documents that summarize data in a database.


- You can perform calculations in a report to help you analyze your data.
Example
Figure 1-18 A Report

1.2.3.7 Advantages of Database Approach

The database approach has several advantages when comparing to the


traditional file processing system. The advantages are:

Minimal Data Redundancy – because data is stored in a single database, data item do
not need to be duplicated in separate files for various systems.
Sharing of data – data can be shared across the enterprise, allowing more users to
access more data.
Economy in distributing database – database design allows better utilization of
hardware.
For example, company does not need to use expensive mainframe but using distributed
databases on smaller computers.
Improved Data Consistency – by eliminating data redundancy, the data inconsistency
also reduced. For example, if a customer address is stored only once, we cannot have
disagreement on the stored values. Updating values is greatly simplified when each value
is stored in one place only.
1.3 Evolution of Database Systems
Database Management Systems were first introduced during the 1960s and it
continue to evolve during the subsequent decades. The evolutionary of the
database technologies is highlighted in Figure 1-19.

Figure 1-19 Database System Evolution

SUMMARY FOR CHAPTER 1: INTRODUCTION TO DATABASE

 Data consists of facts, text, graphics, figure that can be recorded along with

 Thei implicit meaning.

 Information is data that have been processed to make it useful.

 Hierarchy of data in database systems:

Bits Using binary digits, 1 or 0


Bytes Combination of bits and used to represent one data
character
Fields A set of related characters (byte) and each column of the
table represents a field
Records Record is the full set of data in a row
Files A collection of related records
Database A collection of data in related files

 Data Types are Text, Numeric, Boolean, Date/time and Currency.

 Components of Database System Environment:


Procedure
Da
Use
ta Components of Database

Software
System Environment
Hardware

 Design tools in database:

Table
Forms

Design tools in database

Queries Reports

 Database is a collection of related information.

 DBMS - A set of programs used to define, administer and process the


database and its application. Example: Microsoft Access, Oracle.

 Why we need database:

Business use Personal use

 Functions of Database Application:



Analyze and Print
Find Information Store Information
Information

 Components of Database System:


 Evolution of Database System:
- 1960: The traditional model, which is the file processing system.
- 1970: Three DBMSs models: Hierarchical, Network and Relation Model were
introduced.
- 1980: Relation Model had emerged to second generation and SQL to forth
generation for rational data retrieving.
- 1990: The Object-Oriented Database (OODB) emerged to third generation of
DBMS. At the same time, object-oriented modeling language – UML (Unify
Modeling Langauge) – was emerged. Object-Relational Database (ORDB) was
first invented due to client/server and internet technologies and multimedia data.
The ORDB can handle structure and object-oriented databases.
- 2000+: The emerge and mature of Data Warehouse, Universal Server, Distributed
Database, Content-Addressable Storage and combination of database and other
technologies.
Exercise
Choose the correct answer
1

1) Which one is the correct order of hierarchical data?


a) Bits – Bytes- Files – Fields - Records – Database
b) Bits – Bytes- Records – Fields - Files – Database
c) Bytes – Bits- Files – Fields - Database – Records
d) Bytes – Bits- Records – Files - Fields – Database
e) Bits – Bytes- Files – Fields - Database – Records

2) 5 components of database system environment are as follows except:


a) Procedure
b) User
c) Run Time
d) Hardware
e) software

3) DBMS is
a) the instructions and rules to design and use the database
b) a collection of programs that enable users to create and maintain a database
c) is used to present information in a database in an attractive way
d) an application components that are developed using the design tools
e) physical device to control the process of input and output

4) The disadvantages of file processing approach are as follows, except:


a) Information is entered many times in many formats due to the
output, which is required
b) Takes time to manipulate data
c) Takes time to execute complex calculations
d) Duplication of data
e) Sharing of data
5) 4 elements of database are as follows except:
a) Metadata
b) Indexes
c) User data
d) Design Tools
e) Application Metadata

6) Which one of these is an extended data?


a) 48.5 kg
b)
L
o
t

2
9
7

c
)

1
2
/
8
/
2
0
0
6
d) -3.6 Celsius
e) Suria KLCC
24 | P a g e C h a p t e r 1 : I N T R O D U C T I O N T O D A T A B A S E

You might also like