Database Resource Management
Database Resource Management
Introduction
Today’s organizations cannot survive or succeed without quality data about their internal operations and
external environment. Organizations typically make use of databases (both internal and external) to store
data related to their operations.
Data resource management is an activity that applies information systems technologies to the task of
managing an organization‘s data resources to meet the information needs of their business stakeholders.
1. What is data?
Data are pieces of information or fact related to the object being considered. For example, examples of
data relating to an individual would be the person‘s name, age, height, weight, ethnicity, hair, colour, and
birthday. Data is not limited to the facts themselves, as pictures, images, and files are also considered data.
Each data is associated with an attribute that tells a computer system how to interpret its value. This
attribute is called a data type. Understanding data types ensures that data is collected in the preferred
format and that the value of each property is as expected. The following are the common Data types:
Floating point It is used to store numbers that may have a fractional component. -32.345; 234.002
Character It is used to store a single letter, digit, punctuation mark, symbol or ‗A‘; ‗7‘; ‗?‘; ‗ ‘
blank space
Boolean It is used to stored data with only two possible values. True or false; 1
or 0; yes or no.
Date It is used to store date generally a date in the YYYY-MM-DD format 2021-10-03
Date time Stores values containing both date and time together in the YYYY- 2021-10-23
MM-DD hh:mm:ss format. 11:20:55
2. What is a database?
A database refers to a collection of logically related information organized so that it can be easily accessible,
managed, and updated. Databases are generally accessed electronically from a computer system and are
usually controlled by a database management system. (DBMS). The database administrator (DBA) is the
individual responsible for managing the databases, including database security, access control, backup, and
disaster recovery.
1
©MR. NYONGA HERMAN B.
ICT
Operational: store detailed data needed to support the business processes and operations of a
company.
Distributed: databases that are replicated and distributed in whole or in part to network servers at a
variety of sites.
External: refer to databases external to an organization and generally accessed over the internet and owned
by other organizations.
Internal: typically include operational databases and data warehouse
Data warehouses contain data collected from several sources, and the data contained within are generally
not used for routine activities. Instead, data warehouse are usually used for business intelligence purposes.
b. Components of a Database
The five major components of a database are:
Hardware: refers to physical, electronic devices such as computers and hard disks
Software: refer to set programs used to manage and control the database and includes the database
software, operating system, network software.
Data: refer to raw facts and information that need to be organized and processed to make it more meaningful.
Procedures: refer to instruction used in the DBMS and encompass everything from instructions to
setup and install, login and logout.
Database Access Language: It is a language used to write commands to access, update and delete data
stored in a database.
2
©MR. NYONGA HERMAN B.
ICT
Remark:In Traditional file processing, data were organized, stored, and processed in independent files of data
records. Some problems of traditional file processing are:
Data Redundancy: duplicate data requires an update to be made to all files storing that data.
Lack of Data Integration: data stored in separate files require special programs for output making ad hoc
reporting difficult.
Data Dependence: programs must include information about how the data is stored so a change in storage
format requires a change in programs.
Note: Data mining refers to the process of analyzing massive volumes of data from different angles in order to
identity relationships between data and transforms them into actionable information.
3
©MR. NYONGA HERMAN B.
ICT
DATABASES
COMPETENCES
Identify Models of databases.
Use a database application to create a simple relational database.
Populate a simple database.
Create simple queries to demonstrate data integrity and consistency.
Introduction
Organizations work on vast amount of data and information on daily bases thus, there is need for data
and information to be organized logically. These data may not make meaning if not organized into an
appropriate structure. A database is application software for such a task and is one of the core/main parts
of most/all applications/software in use today.
A database is a structured collection of data in a computer system which allows for arranging, modifying,
and extracting information easily in different logical orders. It is a tool that stores data, and lets you create,
read, update, and delete the data in some manner. The management of these data can be computerized or
not.
A computerized database is a database that stores and manages its data by the use of application software
called database management system (DBMS) in the computer.
A non-computerized computer is a database that files are grouped in folders or envelops and stored in
drawers or filing cabinets. Both types of database have advantages and disadvantages. An advantage for
one is probably a disadvantage to the others.
Note: Data are raw facts that have no meaning. It needs treatment (processing) to become useful
(information).
This table is made up of six fields (columns) i.e. serial number, registration number, surname, first
name, sex and class and four records (rows). 4
©MR. NYONGA HERMAN B.
ICT
A table is the database object that contains the basic data or information to be stored about an entity of
the database. For example, the registration of students in a school form a database called student table
which is a database entity.
A field or (attribute) represents one related column of a table and is the smallest logical structure of
storage in a database. It holds one piece of information about an entity or a subject represented by the
table. For example, in the above table we have the following fields; registration no, surname, firstname,
sex, and class.
A record or tuple is a collection of multiple related fields that can be treated as a unit or a record is a
row of the table for a database which contains a collection of attributes related to an entity (such as
student or a person) of the database. For example, information from the field‘s registration no, surname,
firstname, sex, and class for a particular student form a record.
A query is the database tool that allows to retrieve information from one or more tables based on a set
of search conditions you define using the table fields. Queries are covered in more details later.
Forms are Access tools that users can create to make data entry in database tables easier. Entering data
directly into a table can be difficult if there is a lot of information to enter. Like an Excel spreadsheet, an
Access table is essentially a screen filled with blank rows where a user enters records. Forms, however,
provide users with an easy-to-read interface where they can enter table data.
Reports: It is an effective tool that gives you way to analyse and present data using a specific
layout. The text can be formatted in an Access report, just like it can be in Word documents.
Key field or Primary Key: it is a field or a collection of fields in a database whose value can be
used to distinguish one record from another. E.g. in the table above, registration no. can be used as the
key field.
Foreign Key: a foreign key is a column or group of columns in a relational database table that provides
link between data in two tables. It acts as a cross-reference between tables because it references the
primary key of another table thereby establishing a link between them.
NOTE: a primary key is always distinguish from the other key by a (*) on it or is underlined.
Entity: it is a single data item; persons, things, places or events (a table‘s name).
NB: Typical data is logically organized as follows; characters, fields, records, files and database.
Characters are the most basic logical data elements.
File is a collection of related records. E.g. a table can be referred to as a file.
3. Database Applications
Databases are widely use because it forms an essential part of almost all
organizations/software‘s/enterprises today. Here are some representative applications: Banking,
Universities/schools, Business, Manufacturing, organizations, enterprises, government, hospitals,
Facebook, Google, Twitter, etc.
5
©MR. NYONGA HERMAN B.
ICT
4. Data Type for database
A data type determines the type of data that can be stored in a column of field of a table in the database.
Although many data types are available, the followings are the most commonly used data types:
Table 2: Available Data type for database in MS Access
Remark:
A database file that consists of a single data table is called a flat-file database. Flat-file databases are
useful for certain single user or small group situations, especially for maintaining lists such as address
list or inventories. Data that is stored, managed, and manipulated in a spreadsheet is similar to a flat-file
database.
Disadvantages of flat file database
Redundant data: that is repeated information in the table.
Errors on input: typographical errors occur each time is entered.
Problems with updating data
Problems with modifying data
5. Database models
A database model is a type of data model that determines the logical structure of a database. It
fundamentally determines in which manner data can be stored, organized and manipulate. The most
popular example of database model is the relational model which uses a table-based format. Other
examples of database models include: flat file model, hierarchical model, object-oriented model, network
model, Entity- relation model and multi-dimensional model.
In the ER diagram shown above the two entities are STUDENT and CLASS. Two simple attributes which
are associated with the STUDENT are Roll number and the name. The attributes associated with the entity
CLASS are Subject Name and Hall Number. The relationship between the two entities STUDENT and
CLASS is Attends.
Exercise:
Observe the above ER diagram and answer the following questions.
1. How many entities are on the diagram?
2. What are the attributes of each entity?
3. What is the relationship between them?
ii. Types of Relationship between entity
You share many relationships with members of your family. For instance, you and your mother are related.
You have only one mother, but she may have several children. You and your siblings are related. You
may have many brothers and sisters and, of course, they'll have many brothers and sisters as well. If you're
married, both you and your spouse have a spouse each other but only one at a time. Database relationships
are very similar in that they're associations between tables (entities of the DB).
Even though a relationship may involve more than two entities, the most commonly encountered
relationships are binary, involving exactly two entities. Generally, such binary relationships are of three
types and called cardinality: one-to-one, one-to-many and many-to-many.
B. Relational Model
The relational model is a lower-level model. It uses a collection of tables to represent both data and the
relationships among the data. Its conceptual simplicity has led to its widespread adoption; today a vast
majority of database products are based on the relational model. Designers often formulate database
schema design by first modeling data at a high level, using the E-R model, and then translating it into the
relational model.
The software used in a relational database is called a relational database management system
(RDBMS). The relational model is based on the mathematical concept of a relation, which is physically
represented as a table.
Note: Referential integrity: It a property of a relational database that enforces valid relationships between
tables such that no foreign key can contain a value that does match a primary key in the corresponding
linked table.
i. Terminology
There are different set of terms used to designate the tables, the columns and rows of the relational
model. The following table summarized it.
A. Features of a DBMS
The features of a DBMS are as follows:
Queries: to extract data in the database using language like the Structured Query Language
(SQL);
forms, reports; (see section 1 for definition)
Models define rules and standards for all data in the database
Data mining has to do with using software to search through data from many sources looking for
connections.
Examples of DBMS are: Oracle, Postgres SQL, Sybase, MySQL, Microsoft Access, SQL, DB2,
Open Office Base, etc.
7. Database languages
A particular language that has emerged from the development of the relational model is the Structured
Query Language (SQL). Over the last few years, SQL has become the standard relational database
language.
Objectives of SQL
Ideally, a database language should allow a user to:
Create the database and relation structures,
Perform basic data management tasks, such as the insertion, modification, and deletion of data from
the relations,
Perform both simple and complex queries.
Data-Definition Language:
We specify a database schema by a set of definitions expressed by a special language called a Data-
Definition Language (DDL). DDL defines the database structure and controls access to the data.
Data-Manipulation Language:
A data-manipulation language (DML) is a language that enables users to access or manipulate data as
organized by the appropriate data model. Its functions are:
The selection or retrieval of information stored in or from a table; The
insertion of new information into a table;
The deletion of information from a table;
The updating or modification of information stored in a table;
EXERCISES
A database of students is to be set up with the following fields:
FamilyName, OtherName, StudentID, DateOfBirth, DateOfEntry, CurrentClass, CurrentSchoolYear,
EmailAddress.
Select a data type for each field.
Which fields should be validated and which fields should be verified?
Decide the validation rules for those fields which should be validated.
Which field is best for the primary key?
10
©MR. NYONGA HERMAN B.
ICT
Choose a suitable format for the StudentID.
Build a database with at least 10 records. Include all your validation checks.
Run a query to print OtherNames, FamilyName, and EmailAddress in alphabetical order of family
name.
Run a query to select all the students of class four with their StudentID.
11
©MR. NYONGA HERMAN B.