Types of databases
Flat database:
The earliest and simplest databases are flat databases.
A flat database may still be all you need for your purpose.
Advantages: |
Easy to set up
Easy to understand
|
Disadvantages: |
May require entering the same information in many records.
A text database is hard to read.
A single record in a spreadsheet database may not fit across the screen.
|
A text database is a plain text file where the fields are separated by a particular character like a
vertical bar | or a comma , or a semi-colon ; . The example below puts a
vertical bar between each field. The first record shows the names of the fields.
A text database is hard to read in this raw
form. A database program can show each record separately in a more readable
display. It is hard to
create a report that contains just the parts you want to see.

A spreadsheet can work as a flat database. Each field is in a separate column
and each row is a single record. The example below shows how quickly a
record gets wider than the screen. You cannot use two rows for one record.

Relational database:
Microsoft Access and Oracle and other relational
databases are more advanced and more
efficient. This kind of database uses a set of
tables which are linked together. Using a well-designed relational database can
greatly reduce the amount of data you must enter each time you add a record. For
large numbers of records, a relational database can search through the records faster.
Advantages: |
Reduces the duplication in data entry.
Faster searches.
Can create forms and reports that display only the data you want to see.
Can create queries to answer questions that are hard or impossible to answer in
flat databases.
|
Disadvantages: |
Can be complex to set up, using many tables.
It is harder to understand how all the parts relate to each other. |
Below is an illustration of the tables in a small database that records information about
insurance agents and policy holders. This particular insurance office works with
several different insurance companies. There are 7 tables in the database. The
lines show which fields in each table are the same. These link the tables
together.

Each agent can be licensed
with several different companies and in several different states. In a flat database you would have to
have a record for each agent for every company and state he is licensed with,
repeating the agent info for each record. Argh! Too much typing!!
You can design a form so that you can do this all in one spot! This is much easier than
repeating so much information for each record as you would do in a flat database.
The images below show the two screens for the Agent Info Form. This form can be
used for entering new agents as well as for displaying the current ones.

Queries
You often want to look at just part of the data in a database. You can reorder
or filter your data using Structural
Query Language (SQL). You might want a list of
people who have a particular postal code, for example. Happily there are visual
methods you can use to create your query, like the example below from MS Access. You can drag
the fields from the list at the top and drop them in the columns at the bottom.
You can add sorting orders or criteria, like picking a particular postal code. The query
below brings together the fields from the Agent Info table that are needed
for mailing labels.

The actual SQL code for this query looks a lot different from the Design view
above! No wonder a drag-and-drop method was created!

|