Transcript dBase1

DataBases
Content
15.1 Basic features
Types of database Data structures
15.2 Creating a database Screen layout
Entering data
Editing data
15.3 Displaying data
Searching
Queries
Sorting records
15.4 Create and print reports Creating a report
Printing a report
Outcomes
By studying this chapter you should be able to:
create a database;
search and sort records in a database;
display data using a selective query;
design a variety of report formats to meet different needs.
This chapter will help you to become a competent user of a database.
It examines the basic features of databases and how to create a
database. You will learn how to construct a query, how to create a
report and how to modify a database
A database is an organised collection of data. People have used databases
for many years, long before the advent of the computer. The telephone
book is a database which is arranged alphabetically by family name.
Another example is the traditional office filing cabinet.
In recent years, computerised databases have been developed. There are
three main reasons for this:
Computers are ideal tools for searching a large amount of data, quickly
and accurately. A computerised database allows cross-referencing, a
feature that is very complicated on paper databases.
Computerised databases can be updated without having to type all the
data. A huge amount of information can be stored on disks, revised and
arranged as appropriate.
A computerised database can divide the data into sections for particular
applications.
Databases are accessed by a database management system (DBMS), a
software package that builds, maintains and provides access to a
database (see Figure 15.1). The DBMS allows you to choose
which data is required and how to display that information in a
meaningful way. Before the advent of DBMS there was no
alternative but to create a database using high level languages
like COBOL, FORTRAN or C. Now, if a customised database is
not required, a database can be created within a short amount of
time using a DBMS.
Types of database
A flat file database is
the simplest type of database. All its data is
contained in one file. Flat file databases are used for simple
structured tasks such as storing personal names and address details.
We examine flat file databases in this book.
Databases can also be classified as a prepared database or an empty
database. A prepared database (closed database) contains information
about a specific subject. Its data can be accessed and read, but not
changed. For example, a census on CD-ROM is a prepared database.
An empty database
Data structures
Data is the raw facts put into the computer system, such as text and
numbers. This data is then processed by the computer. When the data
has been ordered and given some meaning, it is called information. It
is the result of work on the computer and depends on the data entered.
Data is stored in data structures called files, records, fields and
characters. To illustrate these data structures, consider the telephone
book as an example of a database (see Figure 15.2).
A file is a block of data. When you have done some work on the
computer it is stored in a file. The L-Z telephone book would represent
a file. A file in a database is divided into a set of related records
A
is a collection of facts about one specific entry in a database.
Information about a person in the telephone book is a record. A record is
divided into one or more related fields.
A field is a specific piece of data. The family name, address and telephone
number in the telephone book are fields. A field is also known as a data
item or category and is made up of characters.
A character is the smallest unit of data that people can handle and includes
letters, numerals and special symbols.
record
1. Copy and complete the following sentences.
A
is an organised collection of data.
A flat file database is the
type of database.
A prepared database containsabout a specific subject.
An empty database allows data to be entered and
(e)
is the raw facts put into the computer system, such as
text and numbers.
A
in a database is divided into a set of related records.
A
is a collection of facts about one specific entry in a database.
A record is divided into one or more related
A
is the smallest unit of data that people can handle.
2. Why have computerised databases developed in recent years?
3. How do you access a database?
4. What is the purpose of flat file databases?
5. Explain the difference between a prepared database and an empty database.
6. List the four data structures used in databases.