Transcript  13

Database Management
Systems
Chapter 13
Getting Data Together
Copyright © Prentice Hall 2000
1
Applications Tools
Recall that there are three main
applications tools:
• Word processors
• Spreadsheets
• Databases
This chapter will focus on databases.
Copyright © Prentice Hall 2000
2
Databases
A database is an
organized collection of
related data.
Phone books, file
cabinets, and index
cards are noncomputer versions of
a database.
Copyright © Prentice Hall 2000
3
Database Management
System (DBMS)
DBMS
Copyright © Prentice Hall 2000
A database management
system is software that
helps you organize data
in a way that allows fast
and easy access to the
data.
4
Advantages of Databases
There are several advantages to using
a database to organize data,
including:
• Reduced redundancy
• Integrated data
• Integrity
Copyright © Prentice Hall 2000
5
Reduced Redundancy
Data can be
retrieved from
any place in the
database so that
many specific
data items need
not be repeated.
Copyright © Prentice Hall 2000
6
Integrated Data
A database is
considered
integrated
because any item
of data can be
used to satisfy an
inquiry or report.
Copyright © Prentice Hall 2000
7
Integrity
File integrity means
that the data is
accurate and up-todate.
As data redundancy is
reduced, data
integrity increases.
Copyright © Prentice Hall 2000
8
Building Blocks of
Databases
Like a phone book, a database is a
collection of related data. The parts
that make up that collection include:
• Data items and fields
• Records
• Files
Copyright © Prentice Hall 2000
9
Data Items and Fields
A phone book contains fields:
Last
First
Capron H.
Address
Phone
123 Digit
555-1001
In each field, there are data items
Copyright © Prentice Hall 2000
10
Records
Using the phone book analogy, each
individual is a record. The larger the
city, the more records it contains.
Capron H.
Noyes
D.
Fell
C.
Copyright © Prentice Hall 2000
123 Digit
341 Market
2467 Buyer
555-1001
555-0101
555-0110
11
Files
Continuing with the
phone book analogy,
the book is the
collection of records.
In a database, this
collection of records
is the database file.
Copyright © Prentice Hall 2000
12
Database Power
The power of a database is in the
relationship between data in one
field to that in another—even when
the data is in different files.
The user is often not aware of the
complexity of the database
structure—only how to use it.
Copyright © Prentice Hall 2000
13
Creating a Database
Planning is as
important to
creating databases
as it is to
spreadsheets.
Copyright © Prentice Hall 2000
14
File Structure
A user needs to
first design
the structure
of the file they
need.
Copyright © Prentice Hall 2000
15
Begin With a Sketch
Careful planning
will include a
paper sketch of
the file structure
and the kind of
data that will be
put into each field.
Copyright © Prentice Hall 2000
16
Field Name
Each field must have a unique name.
Last
First
Copyright © Prentice Hall 2000
Address
Phone
17
Field Type
There are four commonly used types
of fields:
• Character
• Numeric
• Date
• Logic
Copyright © Prentice Hall 2000
18
Character Field Type
Character fields contain descriptive
data (text).
Which of these fields are character
fields?
Last
First
Copyright © Prentice Hall 2000
Address
Phone
19
Numeric Field Type
This field type contains numbers used
for calculation.
Our phone book analogy contains no
numeric field types since calculations
are not performed on the data.
Think of a database that would need
numeric field types.
Copyright © Prentice Hall 2000
20
Data Field Type
Date field types are
needed when the
contents of the field
will contain dates.
Think of a database
that would need data
field types.
Copyright © Prentice Hall 2000
21
Logical Field Type
This field type is
used when the
contents will
contain true/false,
yes/no conditions.
Copyright © Prentice Hall 2000
22
Field Widths
Field width determines
the maximum number
of characters or digits
to be contained in the
field, excluding decimal
points.
Copyright © Prentice Hall 2000
23
Key Fields
A key field is a field that has been
designated as the field on which an
inquiry to the database will be based.
Last
First
Address
Phone
In the above example, Address is the
key field.
Copyright © Prentice Hall 2000
24
Entering Data
Using the paper version
as a template, the file
structure is set up on
the computer database.
Later, data items are
entered into each field.
Copyright © Prentice Hall 2000
25
Using a Database
The following operations are available
to use with a database once data
items have been entered.
• List records
• Add records
• List specific fields
• Modify records
• Query
• Delete records
Copyright © Prentice Hall 2000
26
List the Records
Listing records means to
display existing records
on the screen or print
them on paper.
The user might need to
scroll to see all the
records in a database.
Copyright © Prentice Hall 2000
27
List Specific Fields
A database might contain dozens of
fields.
Being able to list specific fields allows
a user to only view or print some of
the fields.
In addition, the fields can be sorted in
a particular order.
Copyright © Prentice Hall 2000
28
Query
A query allows a user to find all
records that match a key field.
In the phone book example, a user
could find all people (records) who
have the same last name (key field).
Copyright © Prentice Hall 2000
29
Add New Records
At any given time,
new records can be
added to a
database.
In addition, new fields
can be added.
Copyright © Prentice Hall 2000
30
Modify Records
At any given time,
the data items can
also be modified.
Modifying records is
necessary to keep
them updated and
accurate.
Copyright © Prentice Hall 2000
31
Delete Records
Deleting records is
another important
option for database
file maintenance.
Copyright © Prentice Hall 2000
32
Conclusion
There are many database options
beyond the basic features discussed
in this presentation.
The best way to learn more about a
database management system is to
use one.
Copyright © Prentice Hall 2000
33