Sugestion with a php application like blog

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Sugestion with a php application like blog

Post by sn4k3 »

I need to create a php application that allow users create groups, inside that groups others users can join, comment like youtube comments

i Will use MySQL to store all things like, users, status, groups, etc
but many groups and many comments can blow mysql and server resources so im thinking in create for each group server will create a sqlite db

example: user create group "My Group" --> id '1' on MySQL so im think in create a sqlite named "group_1.db"

that sqlite db will save all comments, work made on group and other things that can be made inside a group

So is a good option or there are a better option?

Thanks
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Sugestion with a php application like blog

Post by requinix »

That wouldn't be smart.

Databases are supposed to handle a lot of data. That's the whole point: offload the work onto something that can handle it.

Go back to your original idea.
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Re: Sugestion with a php application like blog

Post by sn4k3 »

tasairis wrote:That wouldn't be smart.

Databases are supposed to handle a lot of data. That's the whole point: offload the work onto something that can handle it.

Go back to your original idea.
so is better store all in a mysql database like phpbb do: phpbb_posts

my idea is: mysql to store groups and sqlite to store each group blog

"Group 1" => "group_1.db"
"test Group" => "group_2.db"

Mensages is only need when someone visit a group URL


Imagine -> 10 posts X 100 groups = 10000 Rows
Is not more simple to server load a diferent sqlite when need?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Sugestion with a php application like blog

Post by requinix »

sn4k3 wrote:Imagine -> 10 posts X 100 groups = 10000 Rows
Is not more simple to server load a diferent sqlite when need?
No. It's more work because you don't get any kind of caching functionality (and if you did then having multiple database files would be pointless).

10,000 rows is nothing compared to real servers. They can have millions and millions of rows of data.

Yes. Have one database per application (like "phpbb") and one table per data set (like "phpbb_posts").
sn4k3
Forum Commoner
Posts: 37
Joined: Tue Oct 16, 2007 3:51 pm

Re: Sugestion with a php application like blog

Post by sn4k3 »

tasairis wrote:
sn4k3 wrote:Imagine -> 10 posts X 100 groups = 10000 Rows
Is not more simple to server load a diferent sqlite when need?
No. It's more work because you don't get any kind of caching functionality (and if you did then having multiple database files would be pointless).

10,000 rows is nothing compared to real servers. They can have millions and millions of rows of data.

Yes. Have one database per application (like "phpbb") and one table per data set (like "phpbb_posts").
ok thanks, that helpme alot
Post Reply