DATABASE
TUTORIAL
INTRODUCTION TO DATABASE CONCEPTS AND TERMINOLOGY
Definitions
A database is collection of information, such as an address
book. Whenever you access a database, whether it be to add
new information, get information, change information, or transform
the information into some meaningful order, you are managing
the database.
Suppose you have the address book. Each section in the book
contains the name, address and phone number of an individual.
The book contains three lines of information: (1) Name, (2)
Physical address, and (3) phone number as shown below:
Malinzi J.K. Steve
40 Acacia Avenue
Kololo, Kampala
041 355 524
Fred & Wilma Flinstone
33 Yusuf Lule Road
Nakasero Kampala
071 777 890
|
A database is an integrated collection
of related files along with details of the intepretation of
the data contained therein.
Types of database systems
Basically there two catagories of databases
systems:
(a) Electronic/computer based database:
A computer-based database system such as Microsoft Access,
Clipper, Fox-pro, Database III & IV perform these types
of operations on a database that is stored on a computer disk.
It allows you to:
- Add new empty files to the data
base
- Retrieve data into existing files
- Insert new data in the existing
files
- Update data in the existing files
or transform data into meaningful information
- Remove existing files from the
data base
Examples of uses of electronic
databases:
-Photo gallery (online photo album)
-A cache engine (where book marked internet
resources are kept for future reference).
-Personal database showing names,
location and phone number.
This cross-section is an example of Personal database.
(b)Manual database systems:
Paper databases are referred to as files. When using
a computer, however, we refer to them as either files
or tables, depending on the program. Microsoft Access
refers to them as tables.
The term is used in connection to the unique design that all
databases use, being organised in columns and rows.
Examples of manual database:
-Box of library catalogues:
The catalogue is a record that can be referenced to find out
which book was taken, when it was taken and when it would
be returned to the library.
-A file showing marks of a student :
The records here are: Name of student, class, marks per
subject and possibly the total.
-Dictionary
-Diary book is a database of your friend's
addresses.
-Encylopedia
Whatever the type of a database, the
major objective of it is for record-keeping, so that these
records are referenced whenever need arises.
However, tasks that may take you days doing the operation
manually may take the computer only a few seconds to accomplish.
Database system:
A database system is a computerised
record-keeping system whose overall purpose is to record,
retrieve and maintain information.
Components of a database system:
(a) Users of the data base system
(b) Data:
Data is of various types:
(i) Text data types: used to store non-numeric
type of information like names, address etc.,
and the maximum
length it can take is 256 characters.
(ii) Numeric data type: used to store numbers of digits,
including (-) and decimal point.(.)
(iii) Date: used to store date. Format of storing date is
either mm/dd/yr or dd/mm/yr.
Date is automatically
checked for validity without programmers intervention.
(iv) Logical data type: Used to store one of the two conditions.
(True/False, Yes/No or F/M)
(v) Memo fields: These are stored in files outside the actual
data base file. Memo fields can
be used as a variable in the
main memory unlike other types.
(c) Software: This is an interface
between the system users and the
physical database itself. Some of the database system
softwares include:
Microsoft Access
Fox-pro
Clippers
Data base 111 & 1v
etc
(d) Hardware
Why do we need databases?
It's now clear that a database consists of records, and in
any instutition, company or organisations record-keeping is
very important. Therefore, an organisation, company or institution,
if any, without records is absolutely undefined, and it's
not worthy being called what it claims to be. For record-keeping,organisational
structure and easier and fast access of information
is the major reason why any company, organisation or institution
needs a database.
How does one create a database file?
There are few steps to follow and you get the work
done: We shall restrict ourselves to Microsoft Access in creating
a data base file, the steps required are here outlined
below. We shall begin by creating a database structure/table;
which defines the names of various fields, Data types and
the length for each field as illustrated below:
(i) Database structure
When storing information within a database table, each piece
of data must be stored under unique field name as shown below:.
Field name |
Data type |
Length |
Name |
Character |
15 |
Amount |
Numeric |
10 |
Sex |
Logical |
1 |
(ii) Start a database program:
Start---> programs---> Microsoft Access. The screen
below is automatically displayed:
Click on Blank Database to create a new database.
Click on Blank Database----> Ok
Click on Table then New.
Click on Table then New. The screen below is
displayed:
When you choose "Design view", a table is displayed prompting
you to fill the required data: Field name, Data type and the
Field Description.
Example of a database design:
A director of studies in one
Secondary School in Uganda would like to etablish a database
of all student biodata .This example is already designed for
you.
Click here to
view the worked out database design -> Click Table
and select STUDENT BIODATA.
Using that database one can query the following:
(a) List either Congolese or Ugandans who are orphans
(b) List all students above 13 years of age and are female.
(c) List students above 11 years of age and are male
(d) Select all American students above 11 years of Age
(e) Select all Tanzanians or Rwandese above 10 years but below
17 years.
(f) Select all Ugandans who are male.
|