Re: PDF files: to store in database or not

Поиск
Список
Период
Сортировка
От David Wall
Тема Re: PDF files: to store in database or not
Дата
Msg-id 93456f55-20ea-599c-9f82-d4cddbb53a9d@computer.org
обсуждение исходный текст
Ответ на Re: PDF files: to store in database or not  (Eric Schwarzenbach <subscriber@blackbrook.org>)
Ответы Re: PDF files: to store in database or not
Re: PDF files: to store in database or not
Re: PDF files: to store in database or not
Список pgsql-general
On 12/6/16 11:12 AM, Eric Schwarzenbach wrote:
> On 12/06/2016 01:34 PM, Joshua D. Drake wrote:
>> On 12/06/2016 10:30 AM, Rich Shepard wrote:
>>
>>>   My thinking is to not store these documents in the database, but
>>> to store
>>> them in subdirectories outside the database.
>>>
>>>   Your thoughts?
>>
>> Due to the widely variable size of a PDF document, I would say no. I
>> would store the metadata and file location.
>>
>>
> Can you elaborate on this? Why is the variable size an issue? Are you
> assuming the files go into the same table as the rest of the data?
> (They certainly don't have to, and I would assume that not to be the
> smartest design.)


The advantages of storing in the database is that a DB backup will have
everything, instead of a DB backup and a file system backup. Using a
BLOB, you can certainly keep track of variable length PDFs.

Also, if in the database, it can be part of a transaction so you will
not have any issues keeping the DB and filesystem in sync.

David


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

Предыдущее
От: Eric Schwarzenbach
Дата:
Сообщение: Re: PDF files: to store in database or not
Следующее
От: John R Pierce
Дата:
Сообщение: Re: PDF files: to store in database or not