An Introduction to Databases

By Chris Smith

So now our table will have this information:
 
- newsid (our primary key)
- title
- content
- author
- approved
- category

Going through the same process for categories we end up with:
 
- categoryid (our primary key)
- categoryname
- parentcategory

Our authors table structure looks like:
 
- authorid (our primary key)
- author's name
- author's email address
- author's website url

Our comments table structure looks like:
 
- commentid (our primary key)
- newsitem
- subject
- comment
- author


Looking at this graphically, we end up with something like this:



So we can see how everything links together (this is called a "relational database" since there are relationships between each of the tables).

As you can see, there is quite a lot to properly designing a database, and we haven't even started creating any tables yet!

Pages: « Back  1 2 3  Next » 

Article Series

This article is part 1 of a 4 part series. Other articles in this series are shown below:
  1. An Introduction to Databases
  2. An Introduction to Database Variable Types
  3. Introduction to Database Indexes
  4. Database Joins



9 Responses to "An Introduction to Databases"

Fill in the form below to leave a comment and share your thoughts.

 
Nick White
said this on 03 Jan 2006 10:16:44 AM CST
Wonderful article. Very simplified. Would you know of any table templates for the most common database driven websites with welcome content, services and prices, contact information, and about us

 
Chris
said this on 04 Jan 2006 12:19:46 AM CST
Hi Nick,

Thanks for your comments!

I don't know of any generic templates to use for a cms, they are all different unfortunately. Each one will have a different idea on how to do things so each database table will be slightly different.

 
Matt McDan
said this on 10 Jan 2006 6:10:48 PM CST
Great stuff!

 
Otman
said this on 11 Jan 2006 7:58:31 PM CST
How do you get printer version friendly format of the entire article?

[ Our response: Please click on the 'printer version' link underneath the title of the article. This was added just recently. ]

 
Sheena
said this on 09 Mar 2006 4:11:30 AM CST
Hi, "awesome" info. Thank you.

 
akky
said this on 01 Apr 2006 2:36:12 AM CST
Its a good article

 
MissCindirella
said this on 15 May 2006 5:52:55 PM CST
Have been trying to learn forever it seems. This is written wonderfully so that even a dummy SR SR (lol) on data base can understand. Thank you very much for you time in doing this and sharing it. Now you just need to put it in a vedio and sell it!!! I looked all over. nothing out there that is easy for someone like me to grasp!

 
MissCindirella
said this on 15 May 2006 5:54:11 PM CST
Have been trying to learn forever it seems. This is written wonderfully so that even a dummy SR SR (lol) on database can understand. Thank you very much for your time in doing this and sharing it. Now you just need to put it in a vedio and sell it! I looked all over. nothing out there that is easy for someone like me to grasp!

 
Balbir Singh
said this on 03 Dec 2006 12:41:50 AM CST
It is very good article.



Leave a reply:
Your Name *: Email (private) *: Website:
Please copy the characters from the image below into the text field below. Doing this helps us prevent automated submissions.
Security Code: img