PostgreSQL & PHP Tutorials - Introduction to Databases - Step 3

PostgreSQL »  Introduction to Databases
PostgreSQL »  Starting Out »  Introduction to Databases

Posted By Chris Smith Posted on 07 Feb 2006, 09:29 PM
Viewing page 3 of 3
« | Back | Next | »

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


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!


Written for Interspire
Avg Rating: 4
Vote Count: 1


              


Want to post a comment? Fill in the details below.

Your Name  : 
Your Email  : 
Your Website  : 
Spam Check! Please answer this question  : 5 + 4 =
Comment