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 9045625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:23:35+00:00 2026-06-16T11:23:35+00:00

I am developing a website where a single image uploaded to the site may

  • 0

I am developing a website where a single image uploaded to the site may be used by multiple business modules like Food Item, Dish, Gallery or whatever.
I have a main image table that stores references to actual images on the file system.
Now, each record on this table can be referenced by item, dish or gallery tables.
My question is, should all these references be stored on a single table or should I maintain a separate table like ItemImage, DishImage?
Problem with single table is I fear this table will be bombarded with high hits eventually increasing the response time. Problem with multiple tables is I have to keep adding more tables as the module count increase on the business front.
If I say performance is top priority to my site, whats the best approach?

SQL Server 2012, .Net 4.5, MVC 4.

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-06-16T11:23:36+00:00Added an answer on June 16, 2026 at 11:23 am

    I would recommend using a single table. As mentioned by @Brandon, if indexed properly there should be no performance problems.

    I would also recommend that you store only a relative path from a common root folder (as recommended by @SpectralGhost). The common root folder can then be a configuration setting allowing the operations team to change where the files are stored without needing wholesale updates to the database.

    File system performance may become an issue if you have thousands of files in a single folder. I recommend making a couple of levels of sub-folders for more of a tree structure. For example, if the file name is ABCDE.jpg then using a path like A/B/ABCDE.jpg will split the files over thousands of sub-folders.

    I also recommend that you use a GUID or similar as the base file name for the uploaded files to avoid any naming conflicts (and use the dashless version of the GUID to save 4 characters). If you need the original file name, put that in another column in the image table. Storing other image metadata, such as the width, height and Content-Type (e.g. “image/jpeg”) is a good idea too.

    Categorizing each image using a keyword tagging system is probably the best idea for logically grouping the images. Each image could then theoretically be assigned to any number of categories (including zero). This would require a tag list table, and a separate mapping table containing (tag_id, image_id) pairs.

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

Sidebar

Related Questions

I'm currently developing a large site that handles user registrations. A social networking website
About project: I'm trying to write CMS-like web-site on Java. Previously I used PHP
Recently I am developing website baker's module. There is one option to upload image.
I'm developing a multilingual website. In the top of the site there is a
I'm developing a responsive e-commerce website. It's fairly tough but I like it :)
I'm currently developing a website on Wordpress that requires sort of like a fluid
I'm developing a RAP website and want to make it accessible for robots like
I'm developing a website. I'm using a single-page web-app style, so all of the
I'm developing a single serving site in PHP that simply displays messages that are
Currently I am developing website in asp.net. I wanted to include spellchecker module into

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.