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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:32:04+00:00 2026-06-09T19:32:04+00:00

getting to know my databases, at some point in my application the user would

  • 0

getting to know my databases, at some point in my application the user would be able to upload a photo (or photos). My friend told me that using filenames would be better as opposed to a blob of text. Should I use varchar or varbinary for this?

Also if the user would upload more pictures (lets say max would be 10) would it be better to create a table for the pictures and a connecting one such as userspictures or would it be better to store all the pictures in a string that would be separated by commas or something to that effect?

Help is really appreciated 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-09T19:32:05+00:00Added an answer on June 9, 2026 at 7:32 pm

    As your friend said, it’s better to store only the filename in the database.
    I would suggest VARCHAR(255).

    I really recommend you to create another table for multiple files:

    CREATE TABLE photos (
      id INTEGER UNSIGNED AUTO_INCREMENT,
      user_id INTEGER UNSIGNED,
      filename VARCHAR(255) UNIQUE NOT NULL,
    
      PRIMARY KEY(id)
    );
    
    SELECT id, filename FROM photos WHERE user_id = [user_id]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application in Asp.net MVC where at some point I would like
I know that RAILS_ROOT is the old way of getting Rails.root and that it
I am getting two types of errors that I don't know how to fix.
I know that both these databases are better for different scenarios but in terms
I am getting to know boost::variant. I think this example should work. #include <boost/fusion/sequence.hpp>
I'm currently getting to know Java and OSGi, so I've read a few books.
I'm new to OpenGL. I have written a programm before getting to know OpenGL
Does anyone know why I am getting this error: The model item passed into
I know there has to be a way: I need help getting any hot
I know there are many tutorials out there for getting started in C. However

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.