Lee McFadden wrote:
> On 9/22/06, Krys <[EMAIL PROTECTED]> wrote:
> >
> > But neither answer answers the question of whether or not it is better
> > to store them as files on the hard drive...
> >
>
> I think the point of the posts was that it depends on your situation,
> but here's ways you can do it if you want.
>
> Generally I don't like to put things like images and files into a
> database (especially in the same table as other data).  The
> performance of sending a file from the filesystem is so much better
> than via cherrypy/php/whatever and your database backend.
>
> There are, however, exceptions to the rule.  For example, an
> application I wrote in TurboGears for a client was a suppliment (and
> will eventually replace) an application that runs across many
> platforms.  The way the data is accessed prevented it being stored on
> a filesystem as frontends, backends and storage were all on different
> platforms and, in one case, in different locations.
>

That is pretty much where I stand on it as well. Unless you have a
project consideration that makes it unreasonably difficult, keep it in
the filesystem. Having an ORM makes keeping an external file in sync a
lot easier, as you can overload or add the relevant getters and setters
to work with the file.

That, and a blob is unparseable to the db. You can't (reasonably)
constrain a query on the contents of it. Putting it in the database
also usually makes extra work for getting it into any tools that would
be working with it. Neither of those is the case for a filesystem
location stored in a string.

-Adam


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to