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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:18:14+00:00 2026-05-25T10:18:14+00:00

I have an ASP.NET data entry application that is used by multiple clients. The

  • 0

I have an ASP.NET data entry application that is used by multiple clients. The application consists of multiple data entry modules that are common to all clients.

I now have multiple clients that want their own custom module added which will typically consist of a dozen or so data points. Some values will be text, others numeric, some will be dropdown selections, etc.

I’m in need of suggestions for handling the data model for this. I have two thoughts on how to handle. First would be to create a new table for each new module for each client. This is pretty clean but I don’t particular like it. My other thought is to have one table with columns for each custom data point for each client. This table would end up with a lot of columns and a lot of NULL values. I don’t really like either solution and suspect there’s a better way to do this, so any feedback you have will be appreciated.

I’m using SQL Server 2008.

  • 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-25T10:18:15+00:00Added an answer on May 25, 2026 at 10:18 am

    As always with these questions, “it depends”.

    The dreaded key-value table.

    This approach relies on a table which lists the fields and their values as individual records.

    CustomFields(clientId int, fieldName sysname, fieldValue varbinary)
    

    Benefits:

    • Infinitely flexible
    • Easy to implement
    • Easy to index
    • non existing values take no space

    Disadvantage:

    • Showing a list of all records with complete field list is a very dirty query

    The Microsoft way

    The Microsoft way of this kind of problem is “sparse columns” (introduced in SQL 2008)

    Benefits:

    • Blessed by the people who design SQL Server
    • records can be queried without having to apply fancy pivots
    • Fields without data don’t take space on disk

    Disadvantage:

    • Many technical restrictions
    • a new field requires DML

    The xml tax

    You can add an xml field to the table which will be used to store all the “extra” fields.

    Benefits:

    • unlimited flexibility
    • can be indexed
    • storage efficient (when it fits in a page)
    • With some xpath gymnastics the fields can be included in a flat recordset.
    • schema can be enforced with schema collections

    Disadvantages:

    • not clearly visible what’s in the field
    • xquery support in SQL Server has gaps which makes getting your data a real nightmare sometimes

    There are maybe more solutions, but to me these are the main contenders. Which one to choose:

    • key-value seems appropriate when the number of extra fields is limited. (say no more than 10-20 or so)
    • Sparse columns is more suitable for data with many properties which are filled out infrequent. Sounds more appropriate when you can have many extra fields
    • xml column is very flexible, but a pain to query. Appropriate for solutions that write rarely and query rarely. ie: don’t run aggregates etc on the data stored in this field.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two ASP.NET sites that are used for managing patient information. One application
I have an asp.net application, and now I am using datasets for data manipulation.
We have an ASP.NET 2.0 application that uses Enterprise Library Data Access Application Block
I have an ASP.NET page A that uses a data layer assembly DAL .
I have a ASP.Net TreeView control that I am binding to an XML data
I have an ASP.NET website (in C#) that takes in user data and then
I currently have a DetailsView in ASP.NET that gets data from the database based
I'm designing a Data Access layer for an C#/ASP.net application and I have a
I have asp.net checkboxlist control that bounded to a data source so the number
I have a standard data-entry type form built in ASP.NET. I am pretty green

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.