Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1113533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:52:25+00:00 2026-05-17T02:52:25+00:00

Possible Duplicates: Storing Images in DB – Yea or Nay? Saving images in database

  • 0

Possible Duplicates:
Storing Images in DB – Yea or Nay?
Saving images in database mysql

I have a site where user can upload profile picture and photo albums. Now i’m starting to wonder was I suppose to save pictures into a database or is file operation still ok as it gets bigger?
I’m thinking in a huge scale like social networks, hundred of millions of pictures stored in files seem to me crazy so im sure it must be stored some other way?

Any advice or guidance.
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T02:52:25+00:00Added an answer on May 17, 2026 at 2:52 am

    There are pros and cons to both approaches. Databases are not really great for storing large blobs of data. Doing so will tend to use up lots of resources on the database (CPU, memory, hard drive space and network bandwidth between the database and web server). It will make the database backups much larger.

    However, the big problem with storing the images on a separate file system (say on the web server) is that it is much more difficult to sync it with the data that is in the database. If a user changes a photo while a database backup is going on, who knows what state you will end up in. If you ever need to restore the database from a backup, it will be very difficult to sync up the images. You could also get orphaned images hanging around wasting disk space if you aren’t careful.

    IMHO, it is too much effort to maintain data integrity between the database and a file system, so I would store them in the database throw some money are the hardware so that it can keep up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Split string in SQL I have seen a couple of questions related
Possible Duplicate: Escape string for use in Javascript regex I have a msg like
Possible Duplicates: C++0X when? When will C++0x be finished? When will C++0x be released?
Possible Duplicate: String vs StringBuilder I just revisited some of the books that I
Possible Duplicate: Pass a PHP string to a Javascript variable (and escape newlines) I
Possible Duplicate: Why do I get a segmentation fault when writing to a string?
Possible Duplicate: Why not use tables for layout in HTML? Under what conditions should
Possible Duplicate: NAnt or MSBuild, which one to choose and when? What is the
Possible Duplicate: How do I calculate someone's age in C#? Maybe this could be
Possible Duplicate: .NET - What’s the best way to implement a catch all exceptions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.