Current location: Hot Scripts Forums » Other Discussions » Database » Database design & deployment - MySQL vs SQLite


Database design & deployment - MySQL vs SQLite

Reply
  #1 (permalink)  
Old 05-30-07, 12:38 PM
Sabot Sabot is offline
Newbie Coder
 
Join Date: May 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Database design & deployment - MySQL vs SQLite

I'm working on some project with aspiration to become big. At this point I have to finally decide what database it'll use, between MySQL and SQLite or mixture of it. Problem is that I'm new to databases and have a little knowledge to predict future issues like scalability and maintenance for example, so would like to hear your professional opinion.

First of all, queries will be simple and my main criteria is speed, concurrency lies on very bottom since only one person will access stored data at a time, for this purpose SQLite is faster because does not suffer from client-server latency - right?

I was reading on MySQL site that some sites using this database got over 50.000 of tables. In my system each account will have at least 10 tables. If my site will get say 100.000 accounts at some point, it makes 1 mil of tables. It makes sense to me to use SQLite and create separate directory for each user to store data, how would MySQL handle it in the best way? One db per user or one db for all with hundred thousands of tables? Any more options?

As said, every account requires at least 10 tables. In case of SQLite would it be smart or dumb to keep each table in separate file? If something goes wrong, it'll affect only one table/file plus smaller files shall be quicker to process (hmmm not sure).

I nearly choose to use SQLite because is fast, simple and stores data in nice flat files for easy backup and migration, yet I'm not sure due to lack knowledge and experience basically.

I'll be grateful for any information you can provide me.

Sorry for my funny English =)
Reply With Quote
  #2 (permalink)  
Old 06-17-07, 04:15 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
while this topic is 2 weeks old, I'd like to reply to it.
Quote:
First of all, queries will be simple and my main criteria is speed, concurrency lies on very bottom since only one person will access stored data at a time, for this purpose SQLite is faster because does not suffer from client-server latency - right?
As long as SQLite is running at the server (which is the case), it will be affected by server latency!

Quote:
I was reading on MySQL site that some sites using this database got over 50.000 of tables. In my system each account will have at least 10 tables. If my site will get say 100.000 accounts at some point, it makes 1 mil of tables. It makes sense to me to use SQLite and create separate directory for each user to store data, how would MySQL handle it in the best way? One db per user or one db for all with hundred thousands of tables? Any more options?
The reason why RDBMS were created was to make data centerlization easier so why each account has its own DB? it defies the purpose of RDMBS! make all your accounts access one database and design your database so it can handle more than one user and unify the tables as well so you don't create new tables for the same purpose with the same structure. one of the adventages of doing so is imagine if you wanted to make a simple database structure modification and you had 1000 users, you will do that modification once on one database rather that doing it on 1000 database which would be a nightmare and if your databases were large it will make the situation worse.

Quote:
As said, every account requires at least 10 tables. In case of SQLite would it be smart or dumb to keep each table in separate file? If something goes wrong, it'll affect only one table/file plus smaller files shall be quicker to process (hmmm not sure).
while therotically possible, programming it so is horrible and once your number of databases becomes large (and assume you have 1000 DBs), it becomes the server's file system responsibility to handle connections to those databases which can't be good. in the other hand, all RDMBS were created to handle a good number of connections at the same time.

Quote:
I nearly choose to use SQLite because is fast, simple and stores data in nice flat files for easy backup and migration, yet I'm not sure due to lack knowledge and experience basically.
the flat file easy back up idea might seem so appealing, but if you have 1 table per db, 1 db per user,10 tables per user, 1000 users.. that's 10,000 db files! that's messy!

all in all, if your application has the potential of growing to 10,000 users at one point, then concurrency & server load is important, and thus, I'd say MySQL could be a better choice. keep in mind that all performance-wise observations are theoritical and based on my experince not benchmarking or solid facts.
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP Form to update a MySQL database? Scoobler PHP 9 09-04-08 01:41 AM
Basic MySQL Database, I'll pay 5.00usd KeYBLeR Script Requests 5 04-12-06 05:51 PM
Basic MySQL Database 5.00usd Offer KeYBLeR Job Offers & Assistance 0 04-10-06 03:40 PM
MicroOLAP Database Designer for MySQL 1.8 Released microolap General Advertisements 1 09-20-05 10:00 AM
Clear my misunderstanding: 1 MySQL database for many programs? iKwak PHP 3 08-21-05 12:50 PM


All times are GMT -5. The time now is 04:58 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.