title: SQL Database multiple values for same attribute - Best practices?
body: <p>I have found myself that some attributes from my Person table, need to hold multiple values/choices, which is not a good SQL practice so I created a second table, like this:</p>
  
  <p>Before:</p>
  
  <pre><code>Person table
  -ID (ex. 101)
  -Name (ex. John)
  -Accessories (ex. Scarf, Mask, Headband, etc..) - One person can have a combination of this
  </code></pre>
  
  <p>After:</p>
  
  <pre><code>Person Table
  -ID
  -Name
  
  PersonDetails Table
  -PersonID (FK to Person table)
  -Attribute type
  -Attribute value
  </code></pre>
  
  <p>and an example:</p>
  
  <pre><code>Person: 
  ID:13; Name: John Snow
  PersonDetails:
  PersonID: 13; Attribute type: Accessories; Attribute value: Scarf
  PersonID: 13; Attribute type: Accessories; Attribute value: Mask
  </code></pre>
  
  <p>You can see that person with ID 13 has both Scarf and Mask.</p>
  
  <p>Is this a good practice? What other ways are there to do this the most efficiently?</p>
  
  <p>Also, what ways are there if an update comes up and Person with 13 doesn't have Scarf and Mask but only Glasses? (Delete the 2 separately and insert a new one? that means 3 queries for only one modify request)</p>