Jump to content

Website Content Schema


completeamateur

Recommended Posts

Hi guys,

 

I have been developing with php for a number of years and have just taken the plunge and begun looking at using a framework (namely Zend).  I am keen to streamline my design/programming skills so I am following 'best practices'.

 

As such I want to develop a core structure to my websites to produce the navigation and content dynamically.  I have come up with three tables in order to do this...

 

NAVIGATION

-NavID (PK)

-Nav

-URL

-ParentID

 

CONTENT

-ContentID (PK)

-Title

-Content

-NavID (FK)

 

METADATA

-MetaID (PK)

-MetaTag

-MetaData

-ContentID (FK)

 

I would be very interested to hear anyone's comments/suggestions on how it could be improved. Thanks in advance.

Link to comment
Share on other sites

Maybe have a

 

Global_Nav table and then a Lower_Nav table. That way you can have sub-categories etc. Parent id in Lower Nav links with primary key of Global Nav.

 

Also maybe a global table that allows you to make changes to the entire site. For example, what if the person wanted to add Kontera advertising?

Link to comment
Share on other sites

Maybe have a

 

Global_Nav table and then a Lower_Nav table. That way you can have sub-categories etc. Parent id in Lower Nav links with primary key of Global Nav.

 

Also maybe a global table that allows you to make changes to the entire site. For example, what if the person wanted to add Kontera advertising?

 

I'd have to say no to the first idea.  He already has a parent_id on the navigation table, and he can make a sort of tree structure out of it with self joins if he knows what he's doing.

Link to comment
Share on other sites

Thanks for your input...

 

I would probably add a way to categorize the content.

 

The navigation will categorize the content, kind of!?

 

Maybe have a

 

Global_Nav table and then a Lower_Nav table. That way you can have sub-categories etc. Parent id in Lower Nav links with primary key of Global Nav.

 

Also maybe a global table that allows you to make changes to the entire site. For example, what if the person wanted to add Kontera advertising?

 

Using ParentID means that the navigation can contain as many tiers as necessary.  I think it is a cleaner way than having a table for each tier.  Perhaps I've misunderstood.

 

Regarding changes to the whole site, I am working with the Zend framework which allows for common changes throughout the site..

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.