The of the fs as a data store has both merits and drawbacks (fast, reliable,scalable vs. transactions, atomicity, sorting etc.). There is a product called ExtImage / ExtFile (http://www.zope.org/Members/MacGregor/ExtFile) which approx. does what you want (or should be extendable to do this). Don't know how it fares in respect to the drawbacks of fs data storage though. ru peter. On Fri, 13 Apr 2001, Philippe Jadin wrote:
The advice usually is to *not* store images in the database, which then voids the rest of your question. Store the images in the file system and store only a link to them (and any meta-data) in the DB. Searching the MySQL archives, you will certainly find repeated discussions of this.
More generally, the advice would be not to store large files of any kind in a db.
This makes me thing about this :
It must be the same in zope : it must take more time to extract some data from a large file in the filesystem (the data.fs) instead of storing a link to it in the db, and store it on the filesystem. I guess the filesystem is allways the fastest way to retrieve data (for example because it uses caching, raid optimizations...)
What would be a really cool feature in zope is a new behavior of the zodb : have the admin set a "maximum file size" to be stored in the db. If a file uploaded to zope is larger, it would be stored automatically on the filesystem. This decision could also be based on datatypes.
I personnaly do not trust this much a big binary file. For instance it's a lot harder to make a backup of a large 100 Mb file than several smaller files. You would only backup modified parts. Often the larger files are never modified because they are big images / downloads.
Philippe Jadin (who hopes it's not a stupid idea)
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- _________________________________________________ peter sabaini, mailto: sabaini@niil.at -------------------------------------------------