Saving images: files or blobs?

后端 未结 11 2252
暖寄归人
暖寄归人 2020-11-30 07:59

When you save your images (supose you have lots of them) do you store then as blobs in your Database, or as files? Why?

Duplicate of: Storing Images in DB -

11条回答
  •  时光说笑
    2020-11-30 08:23

    Given that you might want to save an image along with a name, brief description, created date, created by, etc., you might find it better to save in a database. That way, everything is together. If you saved this same info and stored the image as a file, you would have to retrieve the whole "image object" from two places...and down the road, you might find yourself having syncing issues (some images not being found). Hopefully this makes sense.

提交回复
热议问题