avoid storing photos on the database

If one have like DataBase class or photo server class.

Example:
You have a server with DataBase like sqlite, Postgresql and then you send the photos like a RecordSet and the Photo server store on the server and save it on a folder so it work like DataBase server but for save fotos with out using like map drive on windows

Same goes for large binary data in general. A database may not be the best way of storing them. If you have to have them in a db, put the binary data in a separate table to speed to data from other stuff.

Example, if you have a photo ID of a user, put that data in a separate table. The chances of needing it as often as other user data is pretty slim. YMMV.

if any way to compress the phone before save it on the DB

[quote=127969:@Alexis Colon Lugo]Example:
You have a server with DataBase like sqlite, Postgresql and then you send the photos like a RecordSet and the Photo server store on the server and save it on a folder so it work like DataBase server but for save fotos with out using like map drive on windows[/quote]

storage structure should be built into your app where db has a root path and file path storage logic pointer. if you have to move the photo directory to different server for root path changed, you can easily update the DB to reflect this change.

If you look at PACS systems where there are millions and millions of images stored and references… none of them store images in DB that I have seen. its all file pointer references in DB.

I suppose you wanted to say “compress the photo”, and your ap is Web Linux ?

See http://www.cyberciti.biz/howto/question/general/compress-file-unix-linux-cheat-sheet.php