Re: Tables vs. databases
| From: | Jochem Maas | Date: | Fri, 09 Jun 2006 17:55:56 +0000 |
| Subject: | Re: Tables vs. databases | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237708@lists.php.net to get a copy of this message | ||
Antonio Bassinger wrote:
> Hi gang,
>
> Situation:
>
> I've a HTTP server. I intend to run a file upload service. There could
> be up
> to 10000 subscribers. Each saving files up to 10 MB.
>
> I made a proof-of-concept service using PHP & MySQL, where there is a
> single
> database, but many tables - a unique table for each subscriber. But I
why do you have a unique table for each user?
> realize that I may land in trouble with such a huge database. Would it be
there is an upper limit on the number of tables dependent on your system;
you don't want the kind of trouble that hitting that limit will bring.
> better to have a separate database for each subscriber?
NO - I really don't think that is an option either - 10000+ databases
doesn't sound any better than 10000+ tables.
1 database, 2 tables:
USERS:
user_id
user_name
...etc
FILES:
file_id
user_id
file_location
...etc
>
> Which approach is better, many tables in 1 database, or many databases with
> 1 or max 2 tables?
>
> Kindly suggest with pros and cons of each.
I can't think of a 'pro' for either of your approaches.
>
> Thanks & Regards,
> Bassinger
>