Welcome Guest, Not a member yet? Register   Sign In
Database Structure
#1

[eluser]georgerobbo[/eluser]
Hello,

I am currently developing a project which is to be my first fully database driven website. I will have general information pages, a blog, gallery etc. I would like some advice on how to structure my database.

Should I have a seperate table for each page or type? What is the best way of doing this?
#2

[eluser]jedd[/eluser]
[quote author="georgerobbo" date="1251670770"]
Should I have a seperate table for each page or type? What is the best way of doing this?
[/quote]

You might need to provide a smidgen more information than this.

You should probably, also, read up on database normalisation - wikipedia and google are your friends here.

Hint: Structuring your schema around your page layout is generally not a good idea.
#3

[eluser]wabu[/eluser]
From a database standpoint, the conventional approach is to start thinking about the entities involved in your project and the relationships among them (see http://en.wikipedia.org/wiki/Entity-relationship_model ).

For example a blog includes entities such as a Post and a Comment, so you would likely create a table for each of these. The relationship between the two would typically be considered a "one-to-many," because one Post can have many Comments, and you define this relationship in your database schema.

You might think of it as finding the "nouns" in your problem domain. However there are many different design methodologies and just as many opinions about how to build an application.

It sounds like you're building a fairly typical website, so you might want to consider customizing one of the open source content management systems (e.g., Drupal) which already provide the sort of functionality described in your post.

Or if you're not going to use of these, you could probably learn how to design a project like yours by looking at them.




Theme © iAndrew 2016 - Forum software by © MyBB