There are a lot of different types of databases to choose from when you want to store information or write a program, or website that uses databases. A few of the different types are MS Access, MS SQL, MySQL, FoxPro, DBase, and even Excel can be considered a Database. But not matter which program you decide to use to create and maintain your database, they all store information the same way. Databases, use tables to store information plan and simple. A database is just a bunch of tables put together to hold data that is it.
The easiest way to invision a table to just to think of an excel document or any spreadsheet. A table is consisted of rows and columns as a spreadsheet is and normally the first row will be your header row that tells you what information is listed below it. View the example below of an incredible basic table:
| ID | First Name | Last Name | Nickname | Birthday |
| 1 | Mike | Walton | Mike | 05/21/84 |
| 2 | John | Doe | JD | 09/09/99 |
| 3 | Alice | Cooper | Alice | 02/04/48 |
| 4 | Mike | Jones | Mikey | 07/22/86 |
| 5 | Jane | Doe | Jane | 09/09/99 |
As you can see this is a simple table that holds an ID number, First Name, Last Name, Nickname, and Birthday. I have my header row at the very top As I stated above that is all a table is, pretty simple isn’t it.
Now that you know and are aware of tables we will look at qureies. Queries are another simple part of a Database and are basically a table that pulls information from another table based on specific criteria. So lets say for example we wanted to run a query on the table we created above and we only want only information for people with the last name Doe. Well once we ran our query we would get the following table:
| ID | First Name | Last Name | Nickname | Birthday |
| 2 | John | Doe | JD | 09/09/99 |
| 5 | Jane | Doe | Jane | 09/09/99 |
Notice that we only have entires that contain the last name of Doe in this table and they were taken from the original table we created. Now you can see where this would really come in handy if you had a table with over 1000 entries and you wanted to find or display specific entries without having to scan through them all.
What I would like to go over next is going to be linking tables, which will really show you some good uses for queries. Linking tables is going to be 2 tables that share at least one common column to help link the information from table one to table two. Lets go ahead and create a second table and the common column will be the ID number simply because the every value in that column is going to be unique.
| ID | Date | Events |
| 3 | 02/04/98 | Alice Coopers BDay |
| 1 | 05/21/07 | Mike Waltons 23rd Birthday |
| 5 | 06/17/02 | Was hired to work at the Hilton |
| 3 | 09/11/07 | Concert In PA |
| 3 | 08/10/07 | Concert In IOWA |
| 1 | 01/22/07 | Goes Skiing |
Ok now that I have my second table you can see that there are a couple entries in there for ID number 3. This table obviously keeps track of events for the people in the first table. Now I want to create a query to show all the events for Alice Cooper. I will simply create a query including both tables and then have it only display information for ID number 3. Now by combining the two tables I can get one big table but I am going to shorten it slightly:
| ID | First Name | Last Name | Date | Events |
| 3 | Alice | Cooper | 02/04/98 | Alice Coopers BDay |
| 3 | Alice | Cooper | 09/11/07 | Concert In PA |
| 3 | Alice | Cooper | 08/10/07 | Concert In IOWA |
So as you can see the table above was created with a query and is a mix of the two tables we created earlier.
Well those are the basics of a database, simply tables of information and queries to sort out the information. With different database programs you use you will have different options of what you can do. For example MS Access (which will be covered in a later article) will allow you to create reports based on queries or table. You can also create forms so that someone can update the datebase without touching the actual tables. I will be going over some differet programs used for creating and maintaining databases in later articles.
If you have any questions, comments or corrections about this article please feel free to email me at MWalton@mikenetpc.com

