LESSON ONE DATABASE
LESSON ONE DATABASE
E-learning
Department of Information Technology
Tutor: Mr. Kevin Osanya (0713665783
LESSON ONE
CHAPTER SEVEN
These are software that allow records to be entered in the system and to be retrieved in a
specified format. Examples are Ms Access, Paradox, Dbase, FoxPro, Sybase.
From the above examples, we shall look at Ms Access.
7.1 MS ACCESS
MS Access is a database tool used to store, maintain and use a collection of information that is
organized to serve a specific purpose.
Database objects
Tables, Queries, Forms, Reports, Macros, Modules.
Tables
Collection of data about a specific subject e.g. customers, employees e.t.c. In a table,
data is organized in fields (columns) and records (rows) A table consists of:
(a) Field names
(b) Data types (c) Description
(a) Field name: - these are column headings for the table being created.
(b) Data types: - the attribute of a field that determines the type of data it can hold e.g. text,
Numeric, Currency etc.
(c) Description: - This column is optional but can be used to give a detailed of the field name.
Primary key: - This is a field that is used to uniquely identify each record stored in a table.
Queries
A query is a type of database search. It enables you to retrieve data that has met conditions you
specify, indicating data from tables.
The word ‘query’ literally means ‘to ask’. Access queries provide a way of asking about your
data. When you design a query, you identify the fields to be included and the records to be
retrieved from one or more tables.
You can as well update or delete multiple records at the same time, perform built in or custom
calculations on your data.
Forms
They are used for adding new data, editing or displaying existing data. This data can be in a table
or a query. Information entered directly in a form will appear in Tables automatically.
Reports
The desired result of any database is to provide information in the form of reports. You can
print reports from tables or queries in any desired format. Reports are used to summarize
and display data from your database. It displays the most up-to-date information.
Modules
They are collection of codes using Access Basic programming language. If programming is
necessary, you can write modules.
Database definitions
1. Field: This is any piece of information in a database e.g. Names, Age, Birth date.
2. Record: It is a collection of several related fields.
3. Database File: This is a collection of several records.
Applications of databases
1. Educational applications: Preparing students’ reports, class schedules.
2. Retail applications: This may include sales projections and Quotas, Market analysis e.t.c.
3. Legal applications: This may include client information and case schedules.
4. Financial applications: This may include stock market forecasting and end of year financial
reports.
PLANNING REQUIREMENTS
In order to plan an efficient database you need to ask yourself some questions, these include.
The subject/object here is a student and the suggested field names could be;
i) Student’s name ii) Student’s
registration number iii) Student’s address
iv) Parent’s name
v) Age
vi) Sex vii) Course taken viii) Subjects ix) Hours a subject takes x) The lecturer xi)
Lecture’s rate per hour xii) Tuition fee xiii) Course duration xiv) Date of
admission xv) Amount paid
All the above listed is information about one object – student. There is need however to limit the list
to the subject area only.
Let us assume we wish to store student fee payment records only. This will reduce above list to the
following.
NB: The database name (Macarl student record system) is displayed on the title bar of the database
window.
A unique field is required in every table. This is an identification key like the national ID card
that identifies each person individually. The unique key is referred to as primary key in Access.
It is useful when you want to avoid entering duplicated records.
If what you design does not have a unique field, Access lets you include a special field called
AutoNumber which contains sequential or random numbers that Access automatically generates
as you add new records.