title: store objects in database
body: <p>I have lot of objects, each can have many different kind of attributes. a lot of the attributes overlap, for example, many objects have the attribute "name".
  Since there are many type of objects, if there is a table constructed for each set of objects with same set of attributes, it will take lot of tables.</p>
  
  <p>Currently I'm using a mysql, and it is stored this way.</p>
  
  <pre><code>object_id|attribute_id|data
  </code></pre>
  
  <p>There are a few tables like this, different table have different type of data.
  For example, in a Integer table, it only store integers</p>
  
  <p>So I can store all kind of object in the system and it is still possible to do filtering and sorting according to the data of the attributes. It make queries a bit more complex and I don't think it is efficient.</p>
  
  <p>Is this is only way to do it in mysql or other relational databases?
  Should I try to find other database models for this problem?</p>
  
  <p><strong>EDIT</strong>
  I did some research, it seems what I need is a Document-oriented database with the power of SQL.</p>