User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 423,461 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,832 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 1443 | Replies: 1
Reply
Join Date: Oct 2004
Posts: 48
Reputation: SelArom is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
SelArom's Avatar
SelArom SelArom is offline Offline
Light Poster

Help db schema for a multiuser, multiblog system

  #1  
Mar 6th, 2007
hi everyone, I'm wanting to make a simple blogging system, where a user can create their own blog.

But I also want a user to be able to create multiple blogs. This means that one person can have many blogs and also many people can have one blog. I'm wondering the best way to store this information in the database. I'm thinking one big table for all the posts, but how can I map a specific post to the specific blog of a specific user?

I thought about using something like how wordpress uses table prefix, but that requires that I make my queries dynamically and all my research says this is a bad idea. but then how am I supposed to implement this?

can this be done in one database?

thanks
-SelArom
You are somebody, just as I am somebody... but in the end, when you REALLY think about it, we are all nobody...
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 197
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: db schema for a multiuser, multiblog system

  #2  
Mar 7th, 2007
ever heard of foreign keys?
Look into that, all you really need is a reference to the table containing the information about a blog in the table containing information about the entries.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Database Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 3:05 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC