Long story short Im trying to figure out the best way to structure a database for my website. My plan was to essentially show me bringing it into third normal form, therefore showing a correct database design approach. My current plan was to have:
Image Table - ImageID, Title, Source, PageID, PostID
Page Table - PageID,
Post Table - PostID, Introduction, main_content, MemberID
Member Table - MemberID, Name, Alias, Username, Pass
As you can see im not entirely sure what way to go. If I have a pageid and postid as foreign keys in the image table, I assume this invalidates 3NF? As one of these values will need to be null everytime. I cant really lump pages and posts together as they're different things. The pages being about.php etc, posts being news posts/blog entries in style.
Anybody have any ideas how to structure they above? I was considering a section table of some description, then you could attach orders to the table so the sections appear in the correct order on the page?
Image Table - ImageID, Title, Source, PageID, PostID
Page Table - PageID,
Post Table - PostID, Introduction, main_content, MemberID
Member Table - MemberID, Name, Alias, Username, Pass
As you can see im not entirely sure what way to go. If I have a pageid and postid as foreign keys in the image table, I assume this invalidates 3NF? As one of these values will need to be null everytime. I cant really lump pages and posts together as they're different things. The pages being about.php etc, posts being news posts/blog entries in style.
Anybody have any ideas how to structure they above? I was considering a section table of some description, then you could attach orders to the table so the sections appear in the correct order on the page?