completeamateur Posted October 6, 2008 Share Posted October 6, 2008 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 https://forums.phpfreaks.com/topic/127305-website-content-schema/ Share on other sites More sharing options...
DarkWater Posted October 6, 2008 Share Posted October 6, 2008 I would probably add a way to categorize the content. Link to comment https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-658452 Share on other sites More sharing options...
waynew Posted October 6, 2008 Share Posted October 6, 2008 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 https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-658525 Share on other sites More sharing options...
DarkWater Posted October 6, 2008 Share Posted October 6, 2008 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 https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-658552 Share on other sites More sharing options...
waynew Posted October 7, 2008 Share Posted October 7, 2008 I find that too dirty. Link to comment https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-658855 Share on other sites More sharing options...
DarkWater Posted October 7, 2008 Share Posted October 7, 2008 I find that too dirty. Not if you want multiple levels of sub-menus. Link to comment https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-658864 Share on other sites More sharing options...
completeamateur Posted October 7, 2008 Author Share Posted October 7, 2008 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 https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-659224 Share on other sites More sharing options...
waynew Posted October 7, 2008 Share Posted October 7, 2008 I find that too dirty. Not if you want multiple levels of sub-menus. You could still do that will the simple addition of one column. Link to comment https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-659299 Share on other sites More sharing options...
DarkWater Posted October 7, 2008 Share Posted October 7, 2008 I find that too dirty. Not if you want multiple levels of sub-menus. You could still do that will the simple addition of one column. Then it's just as "dirty", if not dirtier due to the presence of an extra, unneeded table. Link to comment https://forums.phpfreaks.com/topic/127305-website-content-schema/#findComment-659324 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.