What is a Database?
the Concept
- a database program is nothing more than an electronic
version of a 3x5 card file
- a database is defined by the fact that it is
- a collection of related information
- and that information is related by common
denominator
- can you name some databases that you use
everyday that are not electronic but deal with a collection of
related information?
- spreadsheets versus
databases
- both can manipulate data mathematically
- both can have information organized in row/column format
- in spreadsheets, this is the only
view
- in databases this is the list view, other
views are possible
- both can sort information
- database information can be searched; therefore you can
deal with subsets of information
a Database File is a
- collection of records
- Think of a stack of electronic 3x5 cards. Each card contains multiple
fields representing all of the information for a given entity in your
database. When you collect all of those records together, you have a
database.
- a record consists of one or more
fields
- Think of a record as an electronic 3x5 card containing one or more
fields. A collection of fields represents everything you know about a
single entity in your database..
- a field is a category of information
- Fields are the places where the actual data that make up the database
reside. Each field represents a different category or piece of
information. Think of fields as the
blanks to be filled in to complete a form; you have one form
for each record. Each field holds one kind of data; there are a variety of
field types.
Flat File versus Relational Databases
Databases store data that occurs in a particular context. For example, a
student information database would contain personal data about each student
such as name, student id#, home address, parent information, etc., while a
student transcript database would contain typical transcript information
about each student such as classes taken and grades received. If either of
these databases were stored in flat-file
database program, there could be no connection made between the two files
even though there was an obvious item in common in each, the student!
AppleWorks is a flat-file database.
Relational
database programs permit you to make such connections by defining
relationships between two or more sets of data. In these cases, you would
create a database that would contain two or more data tables. The data tables
would then be connected by a common field. In the student data case described
in the previous paragraph, one data table might contain the student personal
information while a second would contain the student course information. the
common field might be the student id#. Thus discrete information (personal
data and course data) can be brought together as needed. For example, a
student information sheet can be generated (using the personal information
table), a student transcript can be printed with mailing information (using
both the student information table and the course information table), and so
forth.
Microsoft Access and FileMaker Pro are relational databases.
There
are four types of relationships that can be set up in relational databases:
- One-to-Many relationship: This is
the most common type. One record in one data table corresponds to one or
more records in another table.
- Many-to-One relationship: The
opposite of the One-to-Many. Multiple records in one table are related to
a single record in another table.
- One-to-One relationship: Not a
common occurrence in relational databases but possible. Each record in one
data table corresponds to exactly one record in another table.
- Many-to Many
relationship: Multiple records from one data table are related to multiple
records in another.
in Summary
- Flat file databases are easy to build and maintain. They are great for
simple tasks such as mailing lists, phone directories, and the like.
- Relational databases really excel for big problems such as invoicing,
accounting, inventories, and the like. For small problems a relational
approach may be more than you require.
- Anyone can create a good, flat file database. Developing a solid relational
database takes skill and practice and patience.
Copyright © 2003
last updated
August 13, 2003