You are on page 1of 6

MODULE 10: DATABASE SYSTEMS

CHAPTER 22: DATABASE MANAGEMENT SYSTEMS


LESSON 1: CONCEPTS OF DATABASE (DATA, INFORMATION AND KNOWLEDGE)
INTRODUCTION

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 topic we will be
introduced to the basic terminology used in a database management system (such as
normalisation, entities, attributes, keys, relational database management systems,
structured query language).

1.1 Definitions
Data can be defined as a set of isolated and unrelated raw facts (represented by values),
which have little or no meaning.
Information can be defined as Processed data. When the data are processed and
converted into a meaningful and useful form, it is known as information.
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.
Data Model: A data model is a representation of a real-world situation about which data
is to be collected and stored in a database.
A database is a collection of information which is managed such that it can be updated
and easily accessed. The main purpose of the database is to operate a large amount of
information by storing, retrieving, and managing data
A database management system is a software package which can be used to
manipulate, validate and retrieve this database.

1.2 Flat file database or file system


 A flat-file database is a database stored in a file called a flat file.
 Records follow a uniform format, and there are no structures for indexing or
recognizing relationships between records.
 A flat file can be a plain text file, or a binary file.
Problems with the file system
 data redundancy and inconsistency
 difficulty of accessing data
 data isolation
 problems with concurrent access and anomalies
 integrity problem
 poor data security
1.3 Stages in creating a Database
The process of creating a database can be broadly divided into two main stages:
1. Data analysis: This involves using a formalised methodology to create a database
design. Two widely used methods are Entity Relationship Modelling (ER) and
Normalization.
2. Physical implementation of that design in a database system

1.4 Database terminologies

Database store data in large 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.
(i) 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.
(ii) Record: A record is a collection of multiple related fields that can be treated as a unit.
(iii)Table: A table is a named collection of logically related multiple records. 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.
(iv) Data type: determines the type of data that can be stored in a field. Example Character,
Numeric, Boolean and DateTime.
(v) Data Dictionary: A Data Dictionary is a collection of names, definitions, and attributes
about data elements that are being used or captured in a database.

1.5 Computerize and non-computerize database


(i) Computerize database: A computerized database is one which contains well-organized
electronic files that are stored in a location that is designed and modeled to allow easy
storage and retrieval of data by the user.
(ii) Non-Computerized database: Non-computerize databased systems are systems of
organizing data, which are non-electronic in nature. It is a database which is based on paper
that is data is written on paper. Example telephone books.

1.6 Data validation and verification

Once data is collected, we need to ensure the data is accurate and correct. There are 2
techniques which we use to ensure that our data is accurate and correct.
(i) Data validation:
 Validation is one way of trying to reduce the number of errors in the data being
entered into your system.
 Validation is performed by the computer at the point when you enter data.
 It is the process of checking the data against the set of validation rules.
 Validation aims to make sure that data is sensible, reasonable, complete and within
acceptable boundaries.
 Data validation can be performed by using a number of validation checks. Range
Check, Data type check, Digit check, Length check, Format check, Presence check.

(ii) Data verification:


 Verification means to check that the data on the original source document is identical
to the data that you have entered into the system.
 Verification can be performed in two ways; double entry method and proofreading
(visual check)

LESSON 2: Types of Database Systems (database models)


A database model defines the logical design of data. The model also describes the
relationships between different parts of the data. In the history of database design, four models
have been in use: the hierarchical model, the network model, object oriented and the
relational model.
Hierarchical database model
In the hierarchical model, data is organized as an inverted tree. Each entity has only one
parent but can have several children. At the top of the hierarchy, there is one entity, which is
called the root.

An example of the hierarchical model representing a university

Network database model


In the network model, the entities are organized in a graph, in which some entities can
be accessed through several paths.

An example of a network model representing a university


Relational database model
In the relational model, data is organized in two-dimensional tables called relations.
The tables or relations are, however, related to each other, as we will see shortly.

An example of an entity relational model representing a university


Object-oriented databases
An object database is a system in which information is represented in the form of
objects as used in object-oriented programming. Object oriented databases are different from
relational databases which are table-oriented. Object-oriented data model is based on the
object-oriented programming language concept which is now in wide use.

Professor Courses
Department Student
ID = A1 No = A1
No = 101 Name = John Doe Id = 1
Dept No = Csc
Dept No = Csc Name = Csc
Name = Csc Prof id = A1
Courses = Dba Courses = csc
Unit = 5

An example of a school object oriented database


Lesson 3: Data concept
3.1 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. Usually, the files are organized in three fashions: sequential, direct and indexed
sequential.

3.1.1 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.

3.1.2 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
3.1.3 Indexed Sequential Files
Essentially, indexed sequential technique is a hybrid of sequential and direct file
organization. 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.

3.2 Logical Data Concepts (Conceptual Model)


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 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).

3.2.1 Entity
An entity is any object in the system that we want to model and store information about.
Some specific examples of entities are Employee, Student, Lecturer. An entity is analogous to a
table in the relational model. An entity can be represented using a rectangle.
3.2.2 Attributes
An attribute is an item of information which is stored about an entity. For example, the
entity 'lecturer' could have attributes such as staff id, surname, forename, date of birth,
telephone number, etc. By convention, an attribute is represented by a diamond linked to the
corresponding entity:

3.2.3 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
CHAPTER 23 RELATIONAL DATABASE MANAGEMENT SYSTEM
LESSON 2: Logical Data Concepts

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).
III.2.1 Entity
An entity is any object in the system that we want to model and store information about.
Entities are usually recognizable concepts, either concrete or abstract, such as person,
places,
things, or events which have relevance to the database. Some specific examples of entities
are
Employee, Student, Lecturer. An entity is analogous to a table in the relational model.
An entity occurrence is an instance of an entity. For example, in the student entity, the
information about each individual student details is an entity occurrence, An entity
occurrence can also be referred to as a record. By convention, entities are represented by
rectangles:
III.2.2 Attributes
An attribute is an item of information which is stored about an entity. For example, the
entity 'lecturer' could have attributes such as staff id, surname, forename, date of birth,
telephone number, etc. By convention, an attribute is represented by a diamond linked to the
corresponding entity:
III.2.3 Relationship

You might also like