Android Question blob or path to file

merlin2049er

Well-Known Member
Licensed User
Longtime User
Hi, I've got a few small tables...

Is the preferred method to to use a blob filed in my table and insert the media (pic/video) or is it better to use a text field and put the path/name of the file.
 

Harris

Expert
Licensed User
Longtime User
Hi, I've got a few small tables...

Is the preferred method to to use a blob filed in my table and insert the media (pic/video) or is it better to use a text field and put the path/name of the file.

Depends on the situation - and your preference.

Example 1
If the image has other associated attributes - like name, date, product type, price and so on, I think it would be best to store it with the table record (in a blob). Delete the record, your blob image is cleaned up as well...

Example 2
If you take random pictures and then want to save them to your favourites, a folder and file will do the job for collecting many to browse through.

Example 3
I allow two users to share the same app for recording data. I capture their signature. These two bitmaps are stored in a file folder - even thou (and in this case, probably should) they could have been stored in the associated user record table.
 
Upvote 0
Top