Re: Storing Video's or vedio file in DB.

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: Storing Video's or vedio file in DB.
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B17DAEEDB@ntex2010a.host.magwien.gv.at
обсуждение исходный текст
Ответ на Storing Video's or vedio file in DB.  (VENKTESH GUTTEDAR <venkteshguttedar@gmail.com>)
Ответы Re: Storing Video's or vedio file in DB.  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-general
VENKTESH GUTTEDAR wrote:
> I am using PostGreSQL 9.3.5 and DJango1.7.5 and python 3.3.
> 
> I am working on a application where i will get video files from mobile app, and i have to store in the server,
> so my question is how do i store video's or video files in DB, or do i need to store only the link
> of that video file, if yes then where i have to store the file and how to access that file to display
> in an html page.
> 
> if anyone is helping me out then give me all details related to storing videos in db, not just
> hints. like (what datatype i have to use.? how to encode and decode.? how to accept files through http
> post)

I cannot help you with the web end of things (wrong forum), but
on the database side you have, as you said, the choice between
binary data in the database or files on the file system and links to them in the database.

I'll tell you the pros and cons.
If you store data in the database, you don't have to worry about consistency,
which will make development simpler.
The downside is that you might end up with a huge database that you will have
to backup and maintain, and the performance will be worse than reading files
from the file system.

I'd consider
- how big are the files
- how many of them are there
- whether performance is critical
- how much time you can invest in development
- how critical is consistency

The data type to use would be "bytea", unless the files are very large or you need
support for streaming in the database, in which case "large objects" would have
advantages.  The big downsides of large objects are that they are not as simple as
bytea and you'll have to maintain consistency between large objects and references
to them in tables.

Yours,
Laurenz Albe

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

Предыдущее
От: VENKTESH GUTTEDAR
Дата:
Сообщение: Storing Video's or vedio file in DB.
Следующее
От: Vincent Veyron
Дата:
Сообщение: Re: Storing Video's or vedio file in DB.