You are here: Re: 1 - 2 millions files in one folder? « PHP Programming Language « IT news, forums, messages
Re: 1 - 2 millions files in one folder?

Posted by Erwin Moller on 07/27/06 11:50

Geoff Berrow wrote:

> Message-ID: <44c89b83$0$4524$e4fe514c@news.xs4all.nl> from Erwin Moller
> contained the following:
>
>>>>A simple approach:
>>>>(Postgresnotation, not mySQL which I avoid)
>>>
>>> Last time I checked it mysql was being used for tinyurl.com
>>>
>>> http://tinyurl.com/
>>>
>>
>>So what?
>>My choice of database is not based on tinyurl.com using something or not.
>>;-)
>

Hi Geoff,

> I know that, but it may have been seen as indicating that you thought
> MySQL could not handle large numbers

No, that was not what I ment.
I just ment: if you start using a database, Postgres has (had) some
advantages above mySQL.


>>
>>The reason I prefer Postgresql above mySQL has more to do with support of
>>Foreign Keys (which failed silently in mySQL), transactions, etc.
>>When I made my pick of prefered database a few years ago, mySQL was no
>>comparision to Postgres.
>
> Not quite sure what you mean by foreign keys failing silently but
> perhaps this is off topic for this group.

Yes a little off topic, but that happens all the time in here. ;-)

What I mean by 'failing silently' is this:
create table tbluser(
userid serial primary key,
username text
)

create table tblarticle(
articleid serial primary key,
writtenby integer references tbluser.userid,
title text,
content text
)

and then:
insert into tbluser (username) values ('Geoff');

suppose the userid for that insert (serial/autonumber) is 1.
Now with mySQL, if I insert an illegal value for writtenby in tblarticle,
like this:
insert into tblarticle (writtenby,title,content) VALUES
(33, 'my title', 'bla');

it just fails to check the contstraint, and boldly inserts 33 for writtenby,
which should actually give an error (Foreign Key contraint violation, os
something like that).

I rather had mySQL say: "What does 'references' mean in your
tabledefinition? I do not know that word."
instead of pretending it understands, but never enforcing the constraint.

I had the same kind of trouble with transactions with mySQL, that is why I
said it matured just a short while ago (with innoDB and imysql).

For simple datastorage, this presents no problem, but once your database
gets more complex, you really want to be able to rely on FK constraints.

Anyway, this is off topic indeed. :-)

Regards,
Erwin Moller

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация