0% found this document useful (0 votes)
33 views19 pages

GST214-Study Session 15

The document discusses database structure and creating a database in Microsoft Access 2007. It covers database concepts like data, information, and types of databases including hierarchical, network, and relational. It also discusses creating a database structure by defining fields and field types, and working with Access to store, process, and retrieve data from related tables.

Uploaded by

Michael Flabysis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views19 pages

GST214-Study Session 15

The document discusses database structure and creating a database in Microsoft Access 2007. It covers database concepts like data, information, and types of databases including hierarchical, network, and relational. It also discusses creating a database structure by defining fields and field types, and working with Access to store, process, and retrieve data from related tables.

Uploaded by

Michael Flabysis
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

STUDY SESSION 15: DATABASE STRUCTURE

Introduction

Data is the common name that we give to a specific element for easy identity e.g. name, sex,

address, occupation. Data generally refers to an object, a place, a portion, time, event, and so on.

Data itself has no meaning until it is processed. When data is processed it becomes information

because it has meaning. Hence,

Data Process Information

Every organization needs to generate information for decision making from time to time. To

generate that information data must be collected, stored and processed. When data (singular =

datum) is collected, "purified" and arranged in a specific manner, it is referred to as database.

Learning outcomes for study session 15

At the end of the study session, you should be able to:

 Identify the purpose of database and its structure

 Creating a database

 Work with Microsoft Access 2007 is a Database Management System (DBMS)

 Programmability of Access

1
15.1 - Database Management

A database is an organized collection of logically related data for one or more uses. It is mainly

stored in digital form for easy search and other form of accesses. Database is essentially good for

storing and managing large volume of data and data accessing in multi-user environment.

Purpose of Database

Once created and well maintained, the database becomes a precious commodity which can be

accessed by those who possess the right. The importance of databases is well known in the

Management Information Systems. The Database is often regarded as the core of Management

Information System. Other Information Systems where the use of databases is prominent are:

 Expert System or Knowledge Based System (KBS)

 Decision Support System (DSS)

 Executive Information System (EIS)

 Transaction Processing System (TSS)

 Executive Support System (ESS)

 Officer Automation System (OAS)

When the database is accessed, the data or information obtained is used to make very vital

decisions.

Types of Database

Based on structures, databases can be categorized into three broad groups as follows:

a. Hierarchical database

2
b. Network database

c. Relational database

(a) Hierarchical Database

In a hierarchical database, data is organized in a tree structure i.e. one datum is consisting of other

data, each of which consists of other data. Principally, it has a structure resembling a tree uprooted

with its root upwards and the branches pointing down thus:

R is the root. Other boxes below R are called nodes, and each node can be regarded as a child.

Each child can have more than one child, but has only one parent.

The root is linked to data elements or nodes- on a lower level, each is called a child. The higher

level node to which the child is linked is the parent. Note that in a hierarchical structure, there is

only one parent for a child, but it is possible for a parent to have more than one child.

Physical and Logical Data

Data that occupy contiguous or adjacent locations in storage are called physical data. They are

stored next to each other in the same proximity. Accessing them is a matter of moving from one

location to the other. An example of physical data is shown below.

3
PHYSICAL

Dept # Dept – Name Dept – Mgr Dept H


Dept – Name Dept – Mgr -
Employee - # Employee-Name Employee - #

Employee-Name - Salary Position


Salary Position - Hire-Date Pre Salary

Prev. Title Hire Date Prev Salary Previous Title

In logical data however, the data elements are not necessarily located at the same physical place,

rather they can be at different places on different devices, but there are indicators or pointers to

their locations such that a link is established, e.g.

Logical data

Dept - # Dept – Name Dept- Mgr

Employee
Employee # Employee – Name

Salary
Salary Position

Employee History

Hire– Date Prev Salary Prev Title

(b) Network Database

In this arrangement, data records are related through logical entities or sets. In a network, any data

element can be connected to any other element. This allows for more flexibility than in the

hierarchical formation.

4
In the database network environment the entire database is described conceptually using a term

called "SCHEMA". The schema includes the name and definition of all files, areas, records,

element, and data set relationships. "SUBSCHEMA" is a subset or component of the schema.

While Data Definition Language (DDL) is used to define the schema, Data Manipulation

Language (DML), on the other hand, is used to access the database.

Below is a typical diagram of a network database.

A To H are data items. Each of them can link to one another from the front or back. E for example,

has a link from the back through C; it also has a forward link to F and G.

(c) Relational Database

The hierarchical and network database structures have their limitations; they define data by their

relationship to applications. However, Relational database technology separates data from the

application and uses a simplified data model. Information in the relational database is presented in

tabular form in the form of rows and columns. Columns are called domains or attributes and corre-

spond to fields. Rows, called tuples, correspond to records. Due to the relative ease of construction

and accessing relational databases, it has gained popularity in the last several years. Common

examples of relational database software packages include Oracle, Sybase, Paradox, Dbase, Access,

etc. A common feature of these mentioned packages is that they can be worked upon using

5
(i) DDL - Data Definition Language.

(ii) DML – Data Manipulation Language.

(iii)SQL - Structured Query Language.

SQL above is used to query an existing database. Below is a typical layout for a relational database

Structure made up of rows and columns.

Customer No Customer Name Balance Last Date


Of payment

15.2 - Creating your own database

A database is made up files. A file is a collection of records, while a record is in turn a collection

of many data items. To create a database therefore we start by defining:

i. data item or data name

ii. Field type

Data name

A data name typically consists of 10 characters or less, always beginning with any alphabet A-Z |

a-z, and does not contain any blank(s). It may contain a digit, but following an alphabet. It must

not contain any special characters such as & /, etc.

Thus, we have the following examples:

6
VALID INVALID
MAXI 2-DAY
ADDRESS $-DAY
XX2 2X
DEPARTMENT D EPARTMENTS
TWO-PACK 2-PACK

Field type

Most database software are sensitive to the contents of each data item. The following are the

existing field types:-

C - Character N - Numeric D - Data L - Logical M- Memo

The character field consists mainly of letters A-Z | a-z, but in certain cases, digits may be specified

as characters, but once specified as characters, no arithmetic computation can be performed on

such fields.

The logical field accepts only one character Y (Yes) or N (No). The memo field is a special field

where additional comment are stored in coded form and can be displayed for viewing only on

request.

15.3 - Database Structure

The database software requires adherence to the field type rules, in addition it is necessary to state

before entering data which field is character, numeric, data, etc.

In the database structure, the field type and the width -i.e. no of characters must be stated, for

numeric fields- the number of decimal, places if any is stated. Creating a database structure

7
therefore involves the following simple steps:

Plan the database

 Give a file name

 Define the fields as having character, numeric, logical, Memo or date fields

 Save the structure

 Use the structure to enter data

Entering data

As your enter data, the cursor moves to the next logical data item on the screen as soon as you

press the ENTER key. At the end of every record, a new record with its appropriate record number

appears prompting you to continue. In this way you enter data in as many records as you need to.

15.4 - Working with Microsoft Access

Microsoft Access 2007 is a Database Management System (DBMS) used for storing, processing

and retrieving data as well as for information presentation, automation of repetitive tasks and

managing the stored data. It assist user to create easy-to-use relational database based on the

needs of the user either for personal use or for satisfying organizational needs. Access is a very

powerful, user-friendly database package written and marketed by the MICROSOFT

Corporation.

8
Access as DBMS stores data in many related tables. A user can query one or more of the Access

tables with the response (or output) as forms or reports. These are called Access database objects.

They are objects for assisting user to create, edit and manage database for various applications.

Other objects are:

 Pages for publishing live forms to an intranet

 Macro for automating repetitive tasks without programming, and

 Module containing program written in VBA

In relational databases, each table contains one specific type of information. The table structure

reduces the amount of duplicate data contained within the database by ensuring that data is stored

only once through the use of the primary and foreign key fields. Hence, the integrity of the data is

preserved when changes to the data occur.

Starting Microsoft Access 2007

There are two possible ways of getting into Microsoft Office Access 2007:

 If a shortcut icon is on the windows desktop, simply double click it and Microsoft Access

will be loaded.

 If the shortcut does not exist

 Click the start button on the taskbar

 Under all programs highlight and click on Microsoft Office Access 2007.

By using any of the itemized ways stated above, Microsoft Office Access 2007 will be loaded and

the window displaying “Getting Started with Microsoft Office Access” opens. The window is

partition into three sections:

9
 The Template Categories section on the left pane of the window for previewing

predefined templates,

 New Blank Database section at the center of the window used for starting a new database,

and

 Open Recent Database section on the right pane of the window used for opening an

existing database.

10
Starting a New Blank Database

With this option the user will follow instructions and create a new database. To do this:

 Click on Blank Database. A window that looks like the one below will be displayed.

 Enter the name of your database in the File Name field and then click Create

A new table is created with temporary name called Table 1 having a user interface window similar

to the one shown below. The Access user interface has the following features are stated in table 1.

The table opens in Datasheet View. In this view, you can add a field by typing the name of the

field in Add New Field. While Datasheet View is used for entering data, Design View, another

form of table view is used for inserting, naming, deleting fields, setting fields’ data type among

other operations.

11
B
A

F
G

The table below shows some of the features of the Access user interface window.

12
Table 1: THE ACCESS USER INTERFACE

Label Name Description Picture


The Office button is situated at the
leftmost top corner of the window and it
is used to display commands to create a
new database, open an existing
database, save a database, print,
manage, send email, publish, and close
A Office a database.
Button

A customizable Toolbar for holding


B Quick most frequently used commands.
Access
Toolbar
It is a replacement feature for menus
C Ribbon and toolbars and contains task-specific
commands that are grouped together
under command tabs.
Command tabs consist of Home,
Create, External Data, and Database
Tools
D Navigation Database objects such as tables, forms,
Pane queries, and reports are displayed here.

E MS Office The Window Frame was formally


Window known as status bar and it is used for
Frame showing additional features such as
database views, Caps Lock, Scroll
Lock, or Num Lock.
F Dialog Box A small button on command tabs for
Launcher providing additional commands
associated with the group.
G Message It appears below the ribbon and used
Bar for displaying security message
whenever a database is opened outside
a trusted location.

13
THE DATABASE OBJECTS

The database objects are mainly contained in the Navigation pane categories.

TABLES Enable the creation of fields to accept data.

QUERIES To query the database i.e. set criteria to find out particular information on a field or

fields

FORMS A user can use a pre-determined format to collect data, is similar to the normal

forms filled to extract information

REPORTS A database report comes in the form of a table with headings. Facts are stated under

each heading, it is a decent form of presentation especially management reports,

has a lot of advantages over prose format reports

MACROS With macros, frequently performed functions are coded and condensed into very

short formats, when such coded formats re executed a whole lot of manually

performed instructions are executed at once, this saving time and efforts.

14
Creating a New Table in Access 2007

Activity

On the ribbon, click on Create tab

From the Tables group, click on Table


Design tab

A new table with default name Table 1 is created in Design View. The View enables user to enter

Fields’ name, set the data type for each field, type description for each field and setting design

properties for each active field. The overall table structure is defined in this View. Datasheet View

enables user to enter records into the table.

Entering information into Access Table

Open already created table in Design View and perform the following tasks:

1. Type the name of the first attribute into the first field in the table (With reference to the

table above, MatNumber). Press Enter

2. Select a data type (e.g. Text). Press Enter

3. Type a description for the field (Student Matriculation Number). Press Enter

15
4. Modify the properties of the field as you desired.

5. Perform step 1 through step 4 for other listed attributes

6. Save the table by clicking on Save icon on the Quick Access Toolbar or click on Office

button then choose save sub menu.

The figure below shows a table opened in the Design View.

Setting the Primary Key

Primary key is the field or set of fields in the table that uniquely identify each record. For example,

Matriculation number can be used to uniquely identify the record of each student in a table.

To Set a Primary Key:

 On the Design View of the table

 Place your mouse cursor on the field to be used for uniquely determining each record, then

16
 Click the Primary Key button on the Ribbon

Entering Data into Access 2007

 Switch to Datasheet View.

 Enter data into the data. Move from one cell to another by pressing tab key on your

keyboard

 Save your work

15.5 - Programmability of Access

One of the most interesting features of Access is that it is programmable. After collating-the

database as previously explained, objects and entities that are defined can be used as references.

Conventional programming in high level languages such as Fortran, Cobol PUI, are procedural in

nature i.e. standard programming methods are their features Programming in Access is referred to

as OOP - Object Oriented Programming.

Objects are entities such as forms, charts, tables, and data groups that are inseparable and which

must be processed as a unit.

Programming in Access follows the principles of structured programming.

15.6 - Using MACROS

Another useful feature of Access is that it allows the user to code a series of frequently or

repetitively performed tasks into a single a command called macro. When such a routine is coded,

17
it is given name of the macro is simply used and the entire steps in the routine are executed.

15.7 - Creating the MACRO

Access software has such features that allow the user to easily create macros.

To create your own macro, proceed as follows:

Open Access as previously stated

Click Blank Database

Click New Database

Click Macro

Click New

You are then required to select a/some particular action(s) you record as macro. It consists of two

columns ACTION which must, from the table, and COMMENT if any to explain the action.

15.8 - Summary of study session 15

In this study session, you have learnt

 Database and its structure

 Create a database

 Work with Microsoft Access 2007 is a Database Management System (DBMS)

 Programmability of Access

18
15.9 - Self Assessment Questions for study session 15 (SAQs)

Given below table, create a new table and save it as Student Table. Type the field names below

into the table.

Attribute Representation in Access

Matriculation number MatNumber

Surname Surname

Firstname Firstname

Sex Sex

Department Department

Date of Birth DateOfBirth

Home address HomeAddress

Year of Entry YearOfEntry

Mode of entry ModeOfentry

Phone number PhoneNumber

References/ Suggestions for further Reading


Introduction to computers by Norton, peter, 4th ed. THM
Introduction to digital computer design by Rajaraman, V/ Radhakrishan T. 4th ed. PHI
How to manage computer at work? By Jones, Graham Jaico
Fundamentals of computers by Rajaraman, V 4th ed PHI
Digital computer fundamentals by Bartee, T.C. 6th ed. TMH
Computer today by Basandra, SK updated ed. Galgotia

19

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy