Kamil Lelonek
Kamil Lelonek

Reputation: 14744

SQLite and storing images

I wonder which way is better to store images in memory:

or

What way is more efficient? I suppose that storing files' paths requires more operations because we need to refer to DB and then to file, but I'm not sure if this is less efficent than keeping whole images in DB.

Upvotes: 13

Views: 5693

Answers (1)

Gaurav Arora
Gaurav Arora

Reputation: 17264

In a nutshell:

  • If size of your images are fairly small and number of images are also less, go for storing directly in database, as it is simpler to manage.
  • However, if size of your images in large and also number of images is high, go for saving in file system. Typically, database don't show any performance issues until 10MB for an average mobile.

Let me know if you find any other criteria of judgement.

Upvotes: 7

Related Questions