Introduction to Databases

Contents

Getting Organized
What is a Database?
Database Structure
Forms and Layouts
Sorting
Queries
Building a Database
Summary

Getting Organized

Jose: Gathering all of this data for our group project was a lot of work. How do we organize it?

Brian: Really. Piles of paper on the table are only going to make the job harder! Who needs that?

Deena: I guess the way to begin is to set up a structure for this mess.

Heather: Let's take a look at constructing a database. I have some information on databases.

What is a Database?

A database is like a filing cabinet. It can be a computer file but it doesn't have to be. It is a flexible way to store organize, reorganize, and report related information for distribution.

Database Structure

Sage: So, how does a database work? What are its parts?

Heather: Let's see...

A database file is a collection of related information. Each file stores information about one topic.

A database consists of one or more records of information. Each record is a collection of information about one person, place, or thing.

A record contains all the pieces of information about a particular subject. For example, if you had a database of the people with whom you correspond, each record would contain information on one person. If your database contained twenty records, you would have information on twenty people.

Each record in a database contains different pieces of information called fields . A field is just one component of the record and contains one item in the record.

In the example of a database of people with whom you correspond, each record might have a name field, an address field, and a telephone number field.

Activity 1:

The following are examples of databases:

Using the "My Notes" tool on the right side of the tool bar at the top of the page, think of some other examples of databases and describe some of the ways that databases make storing and accessing information easier.

Database fields come in a variety of types.

Text (or character): A text field may contain any character. In an electronic database, a numeric character designated as text may NOT be used in calculations.

Numeric: A numeric field can ONLY contain a number and may be used in calculations.

Date: A field classified as a date may be used in day/date calculations. The user may choose different data formats to suit specific information needs.

Boolean: Boolean fields are "logical" fields that can have one of two values (e.g., true or false).

Other types of fields include picture fields (for graphics), calculation fields (useful for mathematical manipulation of one or more fields in the same record), and summary fields (useful for mathematical manipulation of fields from different records).

Activity 2:

Check to see if you understand the parts of a database; complete this quiz (ANGEL Quiz).

Activity 3:

Whether you think about it or not, many of your daily, weekly, and monthly activities involve using databases. For example, if you have used the library recently, you accessed a database. Take a few minutes to describe some possible interactions you have had with computerized databases in the last month, using the "My Notes" tool on the right side of the tool bar at the top of the page.

Forms and Layouts

Deena:   OK.   I understand about creating records and fields, and you said that most electronic database programs have them.   How can I get the information into a special form?   Say a mailing list for printing labels?

Heather:   Simple.   You use forms or layouts.

Once the database structure (records and fields) is defined, most database programs create a standard form or layout for entering the data.

Most databases are capable of displaying the data using different forms or layouts.   These forms or viewing layouts do not change the data, they just change what you see.   In the example of a database of people with whom you correspond, you may have an entry form (for entering new data) and a mailing label form (for printing mailing labels).

Another way to think about this is to consider a house as your data and the windows as a way to view the data.    As you move around outside the house and peer in through different windows (layouts), you will see different aspects of the house (data).   Through one window you may see the living room, through another the kitchen, and through another, the living room and the kitchen.   The house (data) doesn't change, just the way you look at it.

Using a database, the user might:   enter or import data, edit data, browse data, query data, sort data, print reports, letters, labels, and other output, or export data for other uses.

Sorting

Jose:   If we enter all of the information correctly, what would be the fastest way to find something without looking through each record individually?

Heather:   We sort the data.

Sorting a database means arranging the records in a specific way to make reported data more usable.

An alphabetic sort will arrange text data in ascending alphabetic order.   If specified, the text fields can also be sorted in descending order.

Queries

Brian:   What if I want to find something in a big electronic database?   Do I have to look at each record?

Heather:   No, you can use queries to find what you want.

The data in a database is not useful unless it can be accessed and data extracted in order to answer questions.   The process of extracting specific data from a database is called a query.

A query searches the database for specific data matching some criteria.   A query can have one criterion or may be made up of multiple criteria.

You can output resulting matches from a query in a variety of formats, including labels, lists, and reports.

Activity 4:

Check to see if you understand sorting and searching; take this quiz (ANGEL Quiz) .

Building a Database

Deena:   OK.   I think I understand the basics of how to use a database.   What if I want to make one myself?

Heather:   The most important thing is to plan ahead and to have a plan.

Since you have to define each of the fields that comprise the record, it is important to have a clear idea about what information you're going to store in the database.

Here is one possible model to follow if you design your own database:

  1. Identify the overall purpose of the database.
  2. Identify all data that is to be kept in the database.
  3. Identify appropriate hardware/software to meet the analysis requirements of the database.
  4. Design the database to meet the criterion identified in steps 1 and 2.
  5. Implement the database on a small scale (30 records or less) and check its performance.
  6. Revise as needed.   Do steps 4-5 several times, if necessary.
  7. Implement the entire database.

As the data is entered it is important to be as accurate and consistent as possible.   Accuracy and consistency are very important for retrieval of information.  

For example, suppose you had a database that had a field about transportation.   In one record you entered, "car." In the other record you entered, "auto." When you do a search on this database, looking for "car," only the first record will appear.

So, in addition to being very careful about consistency with your database, keep in mind that other databases you use my have this problem.   That's why you need to use several terms to search any database accurately.   In this example, you might want to search for "car" AND "auto" AND "automobile."

Tips:

Summary

Heather:   I think we should review our database plans so that when we add information we are consistent and complete.   Does everyone agree?

Everyone:   Yes.

Heather:   OK then, Sage and Jose, go for it!

Sage:   OK.   We all agree that the database will store information in a planned format for future retrieval.

Jose:   We will use sorts to present the data in different ways.

Brian: We will need to structure our queries carefully in order to be able to retrieve the information we need.

Deena:   We can also develop forms and layouts to view different aspects of the data.

Jose:   We definitely need to plan ahead in designing the fields for the database.

Brian:   And make sure that we are accurate and consistent in the data entry.

Heather:   Sounds like you guys got the idea.   Let's make our database!

Activity 5:

Databases and Privacy

Often when people talk about computerized databases, the issue of how much data about a person is collected and maintained by companies, the government, universities, etc. is discussed. Take a few moments to think about what kinds of privacy issues there are with the databases you delineated in the previous activities and answer the following questions using the "My Notes" tool .

 

 

Activity 6:

A Job Search Database

One of the reasons many students are involved in higher education is to prepare themselves for a career or perhaps for a change in careers. Finding a job with the “right” company in the location you want involves a lot of preparation, searching, and learning how to interview. A database of companies or organizations that interest you would be a useful project to begin now, and continue to develop as you further your studies. This database, along with your continuing reflection on your interests, abilities, experiences, and values will help as you work toward career goals and decide about things such as your major, part-time, or summer work, and elective courses.

Using a database program like Microsoft Access, build yourself a job search database. Think about what kind of records you want to construct in order to build and maintain a database about job possibilities. What fields should be included in those records? Depending on how experienced you are with computers and software, you could build your database using database software (like Microsoft Access) or a spreadsheet.

If you aren't comfortable with computers, or you don't have access to a database program, just build your database on index cards. Then, compare your database with a classmate's or friend's.

Activity 7:

Learn how to use Microsoft Access; use Penn State's web-based tutorials at http://its.psu.edu/training/wbt/.


Return to Database Lesson page by closing this page.

| iStudy | Module Descriptions | Getting Access | Contacts  | FAQ