Now that we know what a database is and how it's used in everyday life, it's time to think
about creating our own.
Let's pretend that we work for a bookstore.
The Ready to Read bookstore!
We have customers and we sell books in the store and online.
The store needs a way to keep track of customers, books, and orders.
We'd also like to be able to send books to customers who order online, and perhaps send
out some coupons, track our sales, and determine what books are popular so we can establish
a best sellers list at the store.
We can do all of this by creating a database.
The first thing to think about when creating a database is the purpose for the database
which in this case is to keep track of customers, orders, and books.
The next step is to do a little brainstorming.
Think about what you need to create a database.
I'm a visual person so I like to take out a sheet of paper and write all of this down.
What do I want to know about my customers, their orders, and the books in my inventory?
Let's start with customers.
Since I plan to mail coupons and books out I want to know my customer's name.
Their address is important too.
Later on this information may help me determine which states order most of my books and in
turn I'll want to thank them by mailing out coupons!
Oh, and just in case I need to contact them it would be nice to have an email address.
What about our books?
What information do we need to know about our books?
Well we know that each book has a Title, author, and price.
Books also fit into different categories such as fiction, romance, and computers.
Knowing the category will help us pin-point which types of books sell the best and we
can keep that type of book in stock at all times.
What's left?
Ahh...their orders.
This is the stage where the customer actually buys the book.
I want the orders part of my database to tell me who ordered what and when.
Now I want to show you how these three things are related.
A customer finds a book and places an order or makes a purchase.
Our database will tell us who they are, what they bought and when they bought it.
We know what we want now let's figure out what all of this has to do with a database.
You see, each of these three things represents a table in the database.
A table is one logical unit of information, broken up in rows and columns just like a
table you may have seen in Excel or even Word.
The specific information in each table will be the fields you set up.
Fields are the smaller chunks of info in each table.
So we have our tables.
We said that the customer table will include the name, address, and email.
In a database it's easier to break down a few of these fields.
So we'll say first name, last name; and for the address we'll put street, city, state,
and zip.
Email will remain the same.
For my orders table everything will remain the same for now with customer, book, and
date.
My books table includes title, author, price, and category.
Title will remain the same but I'll break author into two.
I'll have author first name, author last name, and leave price and category the same.
Don't worry about the details of tables and fields right now.
We'll go over that in our next lesson.
Now that we've planned everything let's start creating our database in Access!