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

  • Home
  • SEARCH
  • 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 7529085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:33:48+00:00 2026-05-30T04:33:48+00:00

How do I store metadata to describe assets? Considering that I don’t know in

  • 0

How do I store metadata to describe assets?
Considering that I don’t know in advance which metadatafields I’ll have.

I have a table with assets (let’s say persons),
a table with metadata fields (“name”, “age”, “day of birth”, …)
a table with metadata values that links to the metadata fields table (“John Doe”, 44, “1968-10-10”, …)
and a crosstable metadata that links the metadatafields to the assets.

My problem is how do I handle the different datatypes in the metadata fields table.
“John Doe” is text, 44 is int, 1968-10-10 is a date.

Do i store these in a txt-field in my metadatafields table, but will I be able to compare dates?

Or do I store the datatype in this table and do I make 3 fields for txt,int and date. But then I have a lot of empty fields.

Or do I make different metadata fields tables for each datatype (eg: metadatafields_txt, metadatafields_int, metadatafields_date) but then I can’t link properly to the metadata table.

What is the best practice here?

tx

  • 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-30T04:33:50+00:00Added an answer on May 30, 2026 at 4:33 am

    All of these are valid options (with a slight modification in the first case – I would store an additional field to indicate which type of data is being stored, and convert appropriately where required).

    The third option should be viable – instead of inner joining to one table, you would left join to the three different tables in your query.

    As Eugen says, it depends – do you know in advance roughly how many metadata records (just to an order of magnitude – thousands, millions, more?) you expect to have, and whether they are likely to be overwhelmingly of one type?

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

Sidebar

Related Questions

I want to store documents with metadata in a web application such that a
Currently I have an application that stores metadata information written in a boo internal
Thing is I have a file that has room for metadata. I want to
I have items, warehouses, and items are in warehouses. So I have table that
The below code uses Ext.data.Store to retrieve a JSON with table metadata (for the
I am working on a system that will store uploaded files. The metadata will
I am trying to store metadata (basically a unique id) along with each cell
I'm looking to store some metadata in Docbook (V5) XML files. Specifically, links to
One of git's unavoidable quirks is its inability to store and retrieve metadata about
Quicktime has a rich metadata API, allowing one to store all sorts of arbitrary

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.