6.1-2 DATABASE MANAGEMENT (New)
6.1-2 DATABASE MANAGEMENT (New)
Specific Objective 1: Explain the concept of a database. Specific Objective 2: Use terminology commonly
associated with a database.
What is a Database?
A database is Attribute (Column, Field)
a. a collection of data organized in a manner that An attribute or field is a combination of one or more
allows for access, retrieval and use of that data. related characters or bytes. It is the smallest unit of
b. a repository of information; data a user can access and that makes sense to a user. It
c. a collection of tables, each of which is organized is represented by a column in the database. Each
in rows and columns, that are related to each column contains a specific category of data within a
other. record. A field refers to piece of data. Each field has a
Database software, often called database management field name, data type, description and may have a size
software (DBMS), is application software that allows depending on its type.
the user to create, access and manage a database. With
it, users create a computerized database; add, change Tuple (Row, Record)
and delete data in the database; sort and retrieve data A tuple or record is a term used by developers and
from the database; and create forms and reports from relational database for a record. A record is a group of
the data in the database. related fields. It is represented by a row in a database.
Each row contains data about a given person, product,
The purpose of a database is to help you to keep your object or event.
data organized and keep information easily accessible.
Table (File)
The ultimate purpose of a database management A table is a term used for a file by users of a relational
system is to store and transform data into information database such as Microsoft Access. It contains all the
to support making decisions. information about a specific subject. A file is a
collection of records.
Manual storage of information into physical filing
cabinets has the following disadvantages: Entity
1. Data is often duplicated. An entity is an item (person, place, event or item) in a
2. It is time-consuming to retrieve records. database system that contains data for databases.
3. Inconsistency of data. Objects include tables, queries, forms and other objects.
4. Data cannot be shared easily.
So database programs or database management Candidate key
systems were developed to make the storage and A candidate key is a field or a combination of fields that
retrieval of information faster and easier. can be uniquely used to identify a database record.
Each table may have one or more candidate keys. One
What is the difference between a flat file and a relational of these candidate keys is selected as the table’s
database? primary key.
Composite key
A composite key consists of more than one attribute to
uniquely identify an entity occurrence. This differs from
a compound key in that one or more of the attributes,
which make up the key, are not simple keys in their
own right.
Foreign key
A foreign key is a field in a relational table that matches
the primary key column of another table. The foreign
key can be used to cross-reference tables.
Data Types Non-shareable Data
Here are some commonly used data types. Data is difficult to obtain across departments.
Data Type Purpose
Text Used to store alphanumeric characters Program–data Dependence
(Alphanumeric) (letters on numbers) up to 255
Every computer program in each department has to
characters. Examples include ‘name’,
‘phone number’ and ‘country’. specify exactly what data fields constitute a record in
Number Used to store numbers with or without the file being processed. If one field needed to be
(Numeric) decimal places. Examples include ‘age’, modified, then every program that uses that field had to
‘quantity’ and ‘average’. For the number
data type, the field size can be set to byte,
be changed.
integer, long integer, single, double or
decimal. The default setting for Number Lack of Flexibility
is long integer. The most commonly used It could take weeks for data to be gathered from all the
field sizes of Number data type are Long
integer and double. files so that new programs could be written to produce
Currency Used to store money values. Examples reports.
include ‘salary’, ‘price’ and ‘discount’.
Date/Time Used to store date/time type values. The Database Approach
Examples include ‘date of birth’,
‘purchase date’ and ‘date joined’. Data from various departments is centralized so that all
Autonumber Creates automatic numbers, such as an ID applications had access to the same set of data.
number.
Memo Used to store blocks of text like notes up Strengths
(Data) to 65536 characters long. Examples
include ‘remarks’ and ‘project details’. Reduced Data Redundancy
Yes/No Used for storing a yes or no, true or false Most data items are stored in only one file that can be
(Logical) value. Examples include ‘available’ and accessed by different users.
passed’.
Improved Data Integrity
When users modify data in the database, they make
changes to only one file instead of multiple files.
Shared Data
The data in a database is usually shared over a network
by the entire organization. This data is independent or
separate from the programs that access the data.
Easier Access
The database approach allows non-technical users to
access and maintain data, provided that they have
Approaches to Data Processing necessary privileges.
In your class, discuss the file processing approach vs. the
database approach with regards to the following: Speed; Ad
Reduced Development Time
hoc queries; standardization; and presentation of multiple
It is often easier and faster to develop programs that
views of the same data.
use the database approach because the DBMSs include
several tools for that purpose.
Almost all application programs use either the file
processing approach or the database approach to store
Disadvantages of a Database
and manage data.
Complexity
A database can be more complex than a file processing
File Processing Approach
system.
File processing systems required that each department
in an organization had its own set of files designed for
Special Training Needs
their own specific purposes.
For large databases people with special training are
required for their development.
Drawbacks
Data Redundancy
Memory Issues
This refers to the unnecessary duplication of fields in
Databases require more memory, storage, and
multiple files. It leads to a waste of resources such as
processing power than file processing systems.
storage space and people’s time. It can also lead to
errors since the same data in one field of a file may not
Problems of Security
be updated in another file.
Confidential information could be accessed by all
applications.
Data Inconsistency
It is often difficult to update all the same data stored in
separate files in different departments.