Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
763 views
in Q2A Core by
i dont konw why you save the image into the sql?not save the image path into the sql?in the design,i want to know the benefit this way.thx
Q2A version: 1.6

1 Answer

+5 votes
by
selected by
 
Best answer

My impression

Advantage:

  1. By PHP is to intervene in the displaying image, the image can be flexibly controlled.
  2. Easy to make image server
  3. When we save files, it is not affected by folder permission.
  4. There is no need to worry about the number of files in one folder.
  5. We can back up along with DB.
  6. etc, etc

Disadvantage:

  1. Image path (URL) is complex
  2. Slightly inferior performance
  3. Affect browser's cache
  4. etc, etc
by
Another disadvantage is that the DB volume becomes larger and larger. Am I correct?
by
@vdamanafshan YES. Exactly.
by
Thanks sama, could you please take a look at the following question and give me more details?
http://question2answer.org/qa/40510
by
ONE additional disadvantage for the "DB volume becomes lager" is that some hosts are limited in the backup size. I use an automatic cron script to backup my database each week. Problem is: The DB is more than 1 GB now and my host does *not* support this size. It is shared hosting, that might be the reason.

I vote for the "database version", however, this disadvantage is critical.
...