On 2005-04-10 10:23:38 +1000, Ron Savage wrote:
> IMHO data goes in databases and files go in directories.

Isn't that a bit a circular definition? If you store an image in a file,
it's a file and goes in a directory. If you store it in a database, it's
data.


> Raving about speed is simply premature optimization, and hence is a design 
> fault.

I agree with that completely. 

Some considerations when deciding whether to store a piece of data in a
relational DB or in the filesystem:

Consistency: Do you need to ensure consistency between this data and
other data? If you store data in files, then somebody can remove or
alter the files without updating the meta-data in the database.

Centralized access: If everything is in the database, you can either
access all the data or none of it. If you have some data outside of the
database, you may not have access to this data.

Decentralized access: Sometimes it is useful to be able to access the
data without the database (e.g., you may want to access individual
documents via the file system.

And finally, performance:

RDBMs are generally optimized for lots of small data items which are
organized into tables. Filesystems are generally optimized for larger
data items organized into trees. There is considerable overlap where
neither has a clear advantage, and of course it varies depending on what
RDBMS and filesystem you use.

        hp

-- 
   _  | Peter J. Holzer \Beta means "we're down to fixing misspelled comments in
|_|_) | Sysadmin WSR     \the source, and you might run into a memory leak if 
| |   | [EMAIL PROTECTED]     \you enable embedded haskell as a loadable module 
and
__/   | http://www.hjp.at/ \write your plugins upside-down in lisp". [EMAIL 
PROTECTED]

Attachment: pgpNPfALxHYbE.pgp
Description: PGP signature

Reply via email to