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 -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general