Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>That how I would desgin it to avoid data redundancy :</p> <pre><code>formTable --------- id varchar(36) name varchar(36) creationDate date lastUpdate date isActivated boolean ... ... componentTable -------------- id varchar(36) name varchar(36) ... ... ... formComponentTable ------------------ form_id varchar(36) component_id varchar(36) metadataTitleTable ----------------- id varchar(36) name varchar(36) metadataValueTable ------------------ id varchar(36) name varchar(36) metadataTable ------------- metadata_id varchar(36) title_id varchar(36) value_id varchar(36) metadataComponentTable ---------------------- component_id varchar(36) metadata_id varchar(36) </code></pre> <p>Now let me explain you the way I see it.</p> <p>You have a form that you insert in the <code>formTable</code>, with all the datas you need. Dates, owner, etc...</p> <p>A form is composed of a multiples components. The <code>formComponentTable</code> will bind the form with the various components that composes it. Then the <code>metedata*Table</code> will let you describe all of your components.</p> <p>I did not understand why did you want to create a table for every kind of components. Why don't you just add a column that would define which type is it. Do you get me ?</p> <p>Well I think that should be a good start for you to start thinking your design.</p> <p>If you need more help don't hesitate to add comments,</p> <p>Edit : content can -in this case- be considerated as a metadata. So you would have a set in the <code>metadataTitleTable</code> that would be <code>content</code> and then a set in the <code>metadataValueTable</code> the actual <code>content</code> then you just have to bind everything together.</p>
 

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