Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you're developing with an object oriented language, we're talking about <a href="http://adaptiveobjectmodel.com/" rel="nofollow noreferrer">adaptive object models</a> here. There are quite a few articles written about how you can implement them in oo-languages, but not so much information about how to design the data store side.</p> <p>In the company where I work, we have solved the problem by using a relational database to store AOM data. We have central entity table for presenting all the different "entities" in the domain, like people, network devices, companies, etc... We store the actual "form fields" to data tables that are typed, so we have one table for strings, one for dates and so on. All the data tables have a foreign key pointing to the entity table. We also need tables to present the type-side, i.e. what kind of attributes (form fields) can certain entity have and this information is used to interpret the data in data tables.</p> <p>Pros of our solution are that anything can be modeled without code changes, including references between entities, multivalues and so on. It's also possible to add business rules and validations to fields and they can be reused in all form. Cons are that the programming model is not very easy to understand and query performance will be worse than with a more typical DB design. Some other solution than relational database could have been better and easier for AOM.</p> <p>Building a good AOM with a working data store for it is a lot of work and I wouldn't recommend it if you don't have highly skilled developers. Maybe one day there will be an OS solution for these kinds of requirements.</p> <p>Custom fields have been discussed before in SO:</p> <ul> <li><a href="https://stackoverflow.com/questions/961232/how-would-you-create-and-store-user-defined-custom-fields-in-a-sql-database">How would you create and store user-defined custom fields in a SQL database?</a></li> <li><del><a href="https://stackoverflow.com/questions/47016/to-add-custom-user-defined-fields-feature-or-not">To add custom/user-defined fields feature or not?</a></del></li> <li><a href="https://stackoverflow.com/questions/287093/what-architecture-can-i-use-to-handle-a-shopping-cart-where-each-product-requries">What architecture can I use to handle a shopping cart where each product requries different attributes to be saved</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload