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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:32:30+00:00 2026-05-13T22:32:30+00:00

I’m currently integrating external applications in my app ex SalesForce.com. My question pertains to

  • 0

I’m currently integrating external applications in my app ex SalesForce.com. My question pertains to properly designing tables for data capturing custom fields.

So for SalesForce all companies have an Organization ID but then they can also have custom fields for capturing data. I’ve looked at two options for handling this.

  1. Let them create their fields serialize the names as keys in an array. Then connect the values into that array and re serialize.
  2. Create 10+ columns in the db that allow for custom values(field names) and then map the users data to those fields.

Which one of these approaches is more efficient and maintainable for the long run?

  • 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-13T22:32:30+00:00Added an answer on May 13, 2026 at 10:32 pm

    It’s not clear from your question whether you need these custom fields on a per-user or per-table basis. If it’s per table, then I’d create a “sibling” table for each table that required the additional fields. Give it the same primary key columns as the main table, plus a sequence number column and columns for a field name and value. I’d make them both character columns and plan to convert to/from the actual field type, but if you want to create a separate column for each data type and only use one, that’s your call. Then, whenever you fetch a row from the main table, you also fetch all the rows with the same key from the sibling table, and order the returned columns by sequence number. You can add additional columns to the sibling table as required; e.g., you may want to add a flag to indicate that certain fields are required.

    If you want to create all the entries in the sibling table for each row inserted into the main table, then you might want to have a “template” or “prototype” row with a special key in the main table, so you can easily get all the custom fields. This also permits you to specify default values for the custom fields, just store them in the prototype entries.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
This could be a duplicate question, but I have no idea what search terms
I don't have much knowledge about the IPv6 protocol, so sorry if the question
I am currently running into a problem where an element is coming back from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want to construct a data frame in an Rcpp function, but when I

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.