Re: Database versus filesystem for storing images

Поиск
Список
Период
Сортировка
От Jeremy Haile
Тема Re: Database versus filesystem for storing images
Дата
Msg-id 1168024876.3267.283329103@webmail.messagingengine.com
обсуждение исходный текст
Ответ на Re: Database versus filesystem for storing images  (Clodoaldo <clodoaldo.pinto.neto@gmail.com>)
Список pgsql-general
It's almost always better to store the images on the file system and
just store the filename or relative path in the database.

This is more efficient, doesn't bloat the database by storing files in
it, and is easier to get proper browser caching behavior (depending on
how your app is setup).   I try to avoid BLOBs whenever possible.

Cheers,
Jeremy Haile


On Fri, 5 Jan 2007 17:18:10 -0200, "Clodoaldo"
<clodoaldo.pinto.neto@gmail.com> said:
> 5 Jan 2007 06:59:18 -0800, imageguy <imageguy1206@gmail.com>:
> >
> > I think I know the answer,
>
> If you know the answer please tell it as I have read some discussions
> on the web and although I have decided on a solution I'm still not
> sure about the best answer, if there is a best answer after all.
>
> > but if you don't have an "application
> > server" - ie a webserver, etc,
>
> Yes I have an application server, the Apache server.
>
> > and many of the workstations/clients
> > that need access to the images but may not have access to a network
> > share,
>
> network share? I don't understand. The images will be loaded by html
> pages with the img tag like in <img
> src="http://domain.com/images/xxx.jpg">
>
> > isn't the database the only choice ?
>
> No. It is one of the choices. The other is to store the images in the
> file system, in a directory readable by Apache.
>
> >  - or is there a postgresql function/utility that will "server" the
> > file from the file system based on the reference/link embeded in the
> > database ??
>
> I think some procedure languages can read files. In this case what
> would be the gain in introducing a middle man, the db server?
>
> Regards,
> --
> Clodoaldo Pinto Neto
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>        subscribe-nomail command to majordomo@postgresql.org so that your
>        message can get through to the mailing list cleanly

В списке pgsql-general по дате отправления:

Предыдущее
От: Clodoaldo
Дата:
Сообщение: Re: Database versus filesystem for storing images
Следующее
От: John McCawley
Дата:
Сообщение: Re: Database versus filesystem for storing images