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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:58:02+00:00 2026-06-10T18:58:02+00:00

Suppose I have a column in a table which may hold information as short

  • 0

Suppose I have a column in a table which may hold information as short as a single char 'a' or as big as a huge binary chunk which translates to a jpg, png, mp3, whatever.

Which data type should I use for this?

I thought varbinary(max) or varchar(max), but will it occupy unused space if I just store a single char or a short string?

How is data stored when a field has a data-type that may have variable lengths?

According to this qa, https://dba.stackexchange.com/questions/1767/how-do-too-long-fields-varchar-nvarchar-impact-performance-and-disk-usage-ms, it shouldn’t matter, except for this:

Memory

If the client application allocates memory using the maximum size, the application would allocate significantly more memory than is necessary. Special considerations would have to be done to avoid this.

How do I know this? Sorry if I’m being dumb but it seems too vague.

  • 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-10T18:58:04+00:00Added an answer on June 10, 2026 at 6:58 pm

    What I would do if I were you, is using File-Stream enable database.

    You can learn more about it here:

    http://technet.microsoft.com/en-us/library/bb933993(v=sql.105).aspx

    Also there are a lot of information in the net, so you should face no issues while using it.

    Generally, you will have a table with many columns as you need and one column that will store the information in binary format or BLOB – Binary Large Object. The good thing is that the information that it can store depends only by your hard disk drive space, because it is store in your drive. In the other columns you can have a type field – for eaxmaple mp3/gpef/avi/etc that will help your application to convert this BLOB in its original type.

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

Sidebar

Related Questions

Suppose we have a table Users that has only one column UserId which is
Suppose we have a table which holds information about person. Columns like NAME or
I have a column in Datablase Table, Suppose its Observation which contains three types
Suppose I have a 2 column table (id, flag) and id is sequential. I
Suppose I have a table, the first column is an identity. I thought that
Lets suppose that I have a Category table with a column that holds the
I have a column in my table which is of type text . The
Suppose you have two tables in PostgreSQL. Table A has field x , which
Suppose I have table first_table which has an FK to table second_table table second_table
I have XML column in my table which can contain XML like these 2

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.