How Databases are Set Up - Plattsburgh State Faculty and

Dealing Effectively With Data
Section 3 How Databases Are Set Up
How Databases Are Set Up
Databases Everywhere
We discussed the concept of the information economy and the information society in the
last chapter. Databases are the glue that holds the information economy together. Just
about any type of transaction you might want to conduct involves the use of various
databases. Going to the grocery story to buy a pack of Mountain Dew? How did
Hannaford know how much Mountain Dew to stock to make sure there was enough when
you arrived? How did Hannaford ship the Mountain Dew to its Plattsburgh store from its
distributor located elsewhere in the country? Demand and shipping are types of
questions that any size business or organization must ask to function profitably. After all,
if Hannaford doesn't stock enough Mountain Dew you will simply go down the street to
Price Chopper to buy it. You aren't going to wait two days until the next shipment
arrives.
Demand and shipping are two examples of questions that are perfect for databases to
answer. They both involve numerically tracking the volume of a particular product
required. Every time you check out of Hannaford with your pack of Mountain Dew, the
cash register sends that purchase information to the database. In this way, Hannaford
Plattsburgh knows that 1200 six packs of Mountain Dew (just a guess) were purchased
for the week of January 6-12, 2002. Gather this data over a period of time and average it
out and you have a pretty good idea of your demand for Mountain Dew. Now multiply
this by the thousands of products that Hannaford or any other grocery store sells and try
to figure out the average demand for these remaining products. Can you image trying to
do this by hand, recording what products are sold on what day? Databases automate this
tedious data gathering process by electronically inputting the items sold. Once all the
data is gathered in the database, it can be sorted searched, analyzed, and graphed to
predict future average demand.
What is a Database?
So what exactly is a database? It’s simply a collection of information about a particular
group of items. The items in question could be stock inventory (like we saw above for
Hannaford), your CD collection, a Library collection (books, CDs, government
documents, etc.), or information about people, such as in the College’s employee
personnel database. Databases are not just something that accountants or librarians use;
you interact with databases in some form or another every day. Remember when you had
to register for classes last semester and went into the Banner system to add your classes?
Behind the “friendly” web interface of Banner there’s a database keeping track of all your
classes, tuition payments, financial aid, etc. Cardinal Cash is another example of a
database that you probably use everyday. The mag stripe on your ID card links through
12
Dealing Effectively With Data
Section 3 How Databases Are Set Up
the telecommunications system to a database. Every time you swipe the mag stripe you
are identified to the database and the appropriate deduction is made to your account.
So how exactly are databases set up? Let’s make a small database to take you through
the process. I think MGM 271 already discusses making a movie database, so let’s do
something completely different. . .
Creating a Database from a Customer Survey
As you take the required courses in marketing at PSU, you will discover or perhaps have
discovered already, that most consumer marketing preferences data exists at a state or
national level. In other words, it’s easy to find out shopping preferences for Americans
as a nation, but not so easy to find out shopping preferences of the residents of Clinton
County, New York. At some point you may need to create and administer surveys to find
out who buys what and why.
Let me set the scenario for the consumer preferences question that will be the focus of
our database. We’ll pretend that we’re one of those people you see on Saturday
afternoon at the supermarket or Sam’s Club giving away samples of cheese, hot dogs,
pizza, meatballs, cheese sticks, etc. I happen to like jalapeño poppers, so that will be the
focus of our consumer research. Let’s assume you’re working in pairs at Sam’s Club,
one of you does the cooking and one talks to customers gathering survey data. For our
database, we need to figure out what our market is for the jalapeño poppers and if the
customers think the ones we’re giving out are any good. To do this kind of marketing a
short survey with consistent questions is in order.
Here’s a little survey I came up with as an example to be asking customers:
Survey Questions for Jalapeño Poppers
What do you like to eat while watching T.V.?
When do you eat snack foods?
Do you prefer snack foods that are hot (need
cooking) or cold (like potato chips)?
How much time are you willing to spend
preparing snack food?
Do you like spicy food?
Rate the taste on a scale of 1-5
Would you purchase this product?
Where do you shop for groceries?
Gender
Approximate age
13
Dealing Effectively With Data
Section 3 How Databases Are Set Up
Organizing Our Survey for Input Into a Database: Fields
These questions are a little to wordy to put in our database. Instead, we’re going to come
up with a two-three word description for each question to make them more manageable in
our database. These descriptions for the information are called fields. In other words,
each piece of information about jalapeño popper preferences becomes a field.
Questions
Fields for Each
Preference
What do you like to eat while watching
T.V.?
When do you eat snack foods?
Do you prefer snack foods that are hot
(need cooking) or cold (like potato chips)?
How much time are you willing to spend
preparing snack food?
Do you like spicy food?
Rate the taste on a scale of 1-5
Would you purchase this product?
Where do you shop for groceries?
Gender
Approximate age
TV Snacking
When Eat
Temperature
Time Prep
Spicy snacks
Rate 1-5
Purchase
Where Shop
Gender
Age
Organizing Our Survey for Input Into a Database: Records
The information we’re collecting becomes a database about the preferences of particular
individuals for the product jalapeño poppers. Each question (preference) is a field in our
database that’s associated with a particular individual person. The preferences of each
person in their entirety, in other words information in all the fields, becomes a record.
We’ll use MS Access to create our survey database.
14
Dealing Effectively With Data
Section 3 How Databases Are Set Up
Here’s a sample record for one individual’s response to our survey:
In MS Access this is a form view. All the records are nicely formatted to show responses
to each field in a readable sort of way. This is also the form I’d use to enter in more
records of people to add to the survey.
The actual design of the database is best viewed however, in the table view. In this slide
you can see all the fields listed at the top. Underneath are all responses organized by the
individual record of each jalapeño popper survey participant. This table gives you a
better idea of the entire scope of our database.
15
Dealing Effectively With Data
Section 3 How Databases Are Set Up
This is just a simple example of what’s known as a flat file database. In other words, all
the data is in one file. Most databases operate from many files that are all tied together.
For example, your class selections in Banner are in a different file from your financial
information. All the files are tied together on a key (your student number I assume) and
can link and pull information from various files to answer queries. This is what is termed
a relational database that you will learn more about in MGM271 and information systems
classes.
Copyright 2001 Karen Volkman
All Rights Reserved By Copyright Holder
Please e-mail questions and comments to karen.volkman@plattsburgh.edu
16