title: Dynamic Custom Fields for Data Model
body: <p>I am in the process of creating a dynamic database where user will be able to create resource type where he/she can add custom fields (multiple texts, strings, and files)</p>
  
  <p>Each resource type will have the ability to display, import, export its data;</p>
  
  <p>I've been thinking about it and here are my approaches.  I would love to hear what do you guys think.</p>
  
  <p>Ideas:</p>
  
  <ol>
  <li><p>just hashing all the custom data in a data field (pro: writing is easier, con: reading back out may be harder);</p></li>
  <li><p>children fields (the model will have multiple fields of strings, fields of text, and fields for file path);</p></li>
  <li><p>fixed number of custom fields in the same table with a key mapping data hash stored in the same row;</p></li>
  <li><p>Non-SQL approach, but then the problem would be generating/changing models on the fly to work with different custom fields;</p></li>
  </ol>