天道酬勤,学无止境

user-defined-fields

How would you create and store user-defined custom fields in a SQL database?

I need to allow users to add new fields to a record, e.g. if there is a Contact record, a user may want to add a "SSN" numeric field and a "Birthdate" date/calendar field. They would do this through the UI of course. Those fields should then be available for entry for all contact records. Considering that my application runs for many users concurrently (not a single-company deployment etc.) and theoretically everyone could add their own custom fields, what would be the best practice to store this information in a database, especially when it needs to be searchable?

2021-04-24 11:03:41    分类:问答    asp.net   database   field   user-defined-fields

如何为用户定义的字段设计数据库?(How to design a database for User Defined Fields?)

问题 My requirements are: Need to be able to dynamically add User-Defined fields of any data type Need to be able to query UDFs quickly Need to be able to do calculations on UDFs based on datatype Need to be able to sort UDFs based on datatype Other Information: I'm looking for performance primarily There are a few million Master records which can have UDF data attached When I last checked, there were over 50mil UDF records in our current database Most of the time, a UDF is only attached to a few thousand of the Master records, not all of them UDFs are not joined or used as keys. They're just

2021-04-19 09:07:57    分类:技术分享    sql   database   database-design   user-defined-fields

How to design a database for User Defined Fields?

My requirements are: Need to be able to dynamically add User-Defined fields of any data type Need to be able to query UDFs quickly Need to be able to do calculations on UDFs based on datatype Need to be able to sort UDFs based on datatype Other Information: I'm looking for performance primarily There are a few million Master records which can have UDF data attached When I last checked, there were over 50mil UDF records in our current database Most of the time, a UDF is only attached to a few thousand of the Master records, not all of them UDFs are not joined or used as keys. They're just data

2021-03-26 17:22:16    分类:问答    sql   database   database-design   user-defined-fields