Images in database vs file system

前端 未结 10 837
甜味超标
甜味超标 2020-11-29 23:23

We have a project coming up where we will be building a whole backend CMS system that will power our entire extranet and intranet with one package. The question I have been

10条回答
  •  青春惊慌失措
    2020-11-29 23:44

    I would;

    1) Assign unique identifier (GUID) to each image 2) Tag/Name the image with that GUID 3) Store GUID in the OS (File System) 4) Store Fully Qualified File Name (FQN) pointer in the database.

    Storing images in the database is too expensive in terms of storage and maintenance. Storing just the FQN pointer would provide better solution. You can also build back-end integrity check through triggers and some stored procedures.

提交回复
热议问题