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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:59:59+00:00 2026-05-26T10:59:59+00:00

I am creating a database table, one of the columns can take the shape

  • 0

I am creating a database table, one of the columns can take the shape of all possible multimedia (text,video,audio,image). Without going into overkill of creating several different columns or multiple tables I decided that I should rather have a file pointer that points to where the data resides on the server and have an extra column that indicates the type of data present for the given row.

I want to know if this is a good design strategy or if there are better existing alternatives?

Thanks much,

Parijat

  • 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-26T11:00:00+00:00Added an answer on May 26, 2026 at 11:00 am

    This is a fine strategy. In addition to the type of file, I would recommend adding a column that stores the length in bytes of the file, to save you retrieving it from the filesystem when you need to supply it in a Content-length header, for example.

    If you expected all files to be of a relatively consistent size (none too large like video files), it might be preferable to store the data as binary blobs in the database, but given that you expect diverse media types and possibly very diverse file sizes, I think it makes more sense to keep the files in the filesystem and point to them from the database.

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

Sidebar

Related Questions

When I am creating a new database table, what factors should I take into
Here is something that troubles me as I am creating a database table columns.
I have one question that if we are creating any table in database i.e.
I'm creating a database table and I don't have a logical primary key assigned
I'm creating a grails app over a legacy database. There is a table out
I'm adding some columns to one of my database tables, and then populating those
where can i learn more abt creating database markup in yaml and data fixtures.
I've a massive problem creating a view in mySQL: Table A in database DB1:
I am creating a class which, takes a table from a database, and displays
I started creating JPA/hibernate mappings for a legacy database based on Oracle. At one

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.