PDA

View Full Version : Database structure for blog


misheck
09-27-2009, 10:18 PM
I am trying to do make a website for myself which is more like a wordpress blog but just a basic one where users login etc. I just need to know what tables I need for the DB and how I can link the data together like when Imake a query to print the author, time added, heading and subject. I know the two tables I already need so far 1 for user authentication and registration, table 2 for data for the blog. My problem is I dont know much about foreign keys because I dont want to have to much of the same data in as many tables .

Can anyone who has done a similar site help with they have structured they DB for such a project.

Fumigator
09-28-2009, 04:01 PM
Your question is really "How do I design a database?" And the answer to that question is quite involved indeed.

Start with some background reading. Check out a book from your library or buy on from Amazon that teaches you the basics of database design. Use Google to fill in the gaps after your read-a-thon. Once you've taken these steps to educate yourself, you'll have a pretty good idea on how to set up your tables. Give that a go, and if you get stuck, let us know.

funnymoney
09-28-2009, 05:56 PM
think a lot about your website and create tables and fields that will suit it's needs.

and like Fumigator said, read about SQL (or MySQL) to learn about it.

w3schools (http://www.w3schools.com/SQl/default.asp) is a good place to start

misheck
09-29-2009, 08:22 AM
Thanks for the replies. I just wanted to know whether to store all the data in 1 table but again I knew that would slow down my queries to the server so I have decided to use multiple tables depending on the data the website is going to have