From: Phlip Date: 2009-06-04T10:55:05+09:00 Subject: Re: is ruby only usable for pictures not for documents ? Ben Bleything wrote: > On Wed, Jun 3, 2009 at 12:39 PM, Herman M�ller wrote: >> Normally when you try to develop professional solutions you have to >> store documents like contracts etc. and something else into the >> database. > > Well, you have to store them *somewhere*. I'd argue that the database > is not a very good fit. You can't query against a blob. The database is not a good fit for large binary files because databases and filesystems are architected and tuned for completely different performance envelops. Databases work best relating long lists of short data. Filesystems work best manipulating short directories of huge files. Further, a web server can serve those files without bothering Ruby. 'nuff said! Put your documents on the filesystem and store their paths in your database. The Rails plugin called Paperclip shows how to do this, with a system that would be very hard to improve on. -- Phlip