You are on page 1of 26

CHAPTER 3

DATABASE MANAGEMENT
SYSTEM
(DBMS)
At the end of this unit, students will be able to:
 „ Define database
 „ Explain data models
 „ Describe data management approaches
 „ Recognize database entities, attributes and relationships
 „ Develop data models with Entity Relationship Diagram (ERD)
 „ Create and manage databases using Microsoft Access
Data Management Approaches
• Data management is an integral part of our daily lives.
Traditionally, data used to be managed manually using
physical papers.
• As the size of data that organizations manage become larger
and larger, computers have become instrumental for efficient
management of data The first computer-based data
management is a file-based data management approach.
• The database approach was introduced later and addressed
the inherent weaknesses of the file-based approach.
File based data management
• File-based data management is an approach in which data is stored in
separate files without explicit relationships (see Figure. 3.2).
• Data in different files is managed by different application programs. Any
change to data requires modification of the program that uses the data.
• Changes made on the program may also require change in the file
structure.
• In file-based data management approach, each department creates and
processes its own files separately. For example, procurement and
finance departments create and manage their own files.
• The file-based data management approach creates
problems of data duplication and data inconsistency.
For example, let us say employee data is stored both
in human resource and finance departments.
• When human resource department modifies the
employee records upon hiring new employees, it
may not communicate the information to the finance
department.
• As a result, different information about employees would be
found in one organization.
• Such types of contradictions are caused by the fact that data
in one file is not linked to data in other files of the same
organization in the file-based approach.
• The isolation of data also makes retrieval of data of the entire
organization a very difficult task.
• These problems led to the development of the database
approach.
Database approach to data management
• In the database approach to data management, data is
managed by a database using a database management system
(DBMS) software.
• A database is a collection of logically-related data. It stores all
organization’s data in one repository.
• A database is created to address the data requirements of
different user groups and application programs in an
organization.
• Database is an essential resource to every organization.
• It is used to maintain internal records of organizations such
as student records for schools, customer records and daily
sales records for supermarkets, patient database for
hospitals and the like (see Figure. 3.4).
• Data in the database are used to generate different
information that are used in the daily business activities.
• For example, the salesman in a supermarket uses
database to generate daily or monthly sales reports.
• Hospitals may generate report that shows the most
frequent disease types in the last year.
• DBMS is software that manages databases. DBMS is
used to add new data, modify data and delete data in
the database.
• It is also used to retrieve data from the database.
• DBMS essentially serves as an interface between the
database and end users or application programs.
• It ensures that data is easily accessed by potential
users.
• The database management process has three main
components (see Figure 3.5). At the bottom is the database
which stores the actual data.
• In the middle is a DBMS which manages the database. At the
top of the DBMS are application programs that use the
database.
• The application programs submit database query to the DBMS.
• Then, the DBMS retrieves data that matches the queries and
replies retrieved data to the application programs.
The database approach to data management provides
many advantages to the organization. Some of the
advantages are:
• Data independence: A database is created to store all
organization data and support all users of the
organization.Each user or department does not need to
manage its own isolated data.
• Data sharing: all organization’s data is stored in one central
database. DBMS allows this central database to be accessed by
different users.
• Avoiding data redundancy: Isolated departmental files are stored
in one central database. The DBMS can retrieve data from
multiple tables so as to meet the requirement of different
database users or application programs.
• Improved data security: Data in the database is accessed only by
authorized users. Only users who are given data access right can
access and modify data in the database.
DATA MODEL

• Data model of a database is the blue print of the database. It is used


as a guide to store data in a database.
• It shows database entities, attributes and the relationships between
the entities.
• It also specifies what data to store in the database. For example, a
school database stores data about students and teachers.
• It does not need to store data about patients or traffic accidents.
These data do not have relevance to the school’s day-to-day
activities.
• Likewise, hospitals store data about patients and physicians.
Basic Concepts in Data Modeling
The basic concepts of entity, relationship and attribute are
discussed below:
 Entities are basically people, places or events about which
you want to store data. For example, banks may keep data
about customers and bank account entities. Similarly, a
library may have entities like book, loan and borrower.
Entities are equivalent to tables when implemented in the
database.
 Attributes are properties of an entity that are used to
differentiate one entity from other entity. For
example, customer entity may have customer id,
name, sex and address as its attributes. On the other
hand, book entity may have author name, book title
and publication year as its attributes. The two
entities have different attributes because they are
different entities.
 A relationship is an association between entities. For
example, customer has account in a bank. The verb
‘has’ indicates the relationship between customer
and bank account entities.
The relationship between entities can take different forms:
• One-to-one relationship: An instance of an entity has
only one instance in the other entity with which it is
associated (see Figure 3.8). For example, a country and a
capital city. A country is associated with one capital city,
and a capital city is associated with only one country.
• One-to-many relation: An instance in one entity is
associated with many instances in the other related
entity (see Figure 3.8). For example, a department
called ‘Computer Science’ is associated with multiple
students.
• Many-to-many relationship: Instances on both sides of
the relationship are associated with multiple instances
of the other entity (see Figure 3.9). For example, an
employee may work in multiple projects. At the same
time, a project may have multiple employees assigned
to it.
Entity Relationship Diagram

You might also like