Note that there are some explanatory texts on larger screens.

plurals
  1. POSingle table inheritance, EAV or NoSQL?
    primarykey
    data
    text
    <p>I'm looking for a good sane approach for my application's data model. Most threads focus on e-commerce products and my scenario is somewhat different.</p> <p>The goal is storing received items from customers and reporting back on them. Although initial reports will be simple lists (these are your items and their key/value pairs) I want to prepare for future queries on the collections as a whole, so I'm uncertain EAV is a good approach.</p> <p>Each item is of a (recurring) type, and each item will have a flexible amount of key/value pairs. We have about 15 item types and they're not very likely to grow fast.</p> <p>The amount of key/value pairs will be low, between 4 and 20 and is (per requirement) <strong>not based on the item type, but on the customer the items belong to</strong>. </p> <p>To clarify, a customer might want me to store the condition of the item where another might want me to store the color or a replacement-id. It really depends. So it is very likely I will have NULL values in my set anyway as each item type will get all the key/values of that customer anyway. That makes me think <em>Single Table Inheritance</em> (with NULL values) is acceptable, but it would have to be field_1 field_2 etc - with some sort of mapping because the customer will decide on name of their desired key(s). Which doesn't seem right to me?</p> <p>A collection of customer items (and their key/values) will usually be >20 and &lt;500, so the data sets per customer are certainly not enormous.</p> <p>Perhaps it would be good approach to go (semi)EAV in MySQL for the application itself (creating the customer and their desired fields) but move the actual collected item records as a 'document' into a NoSQL database (Redis et all) for further processing? </p> <p>Or is that over complicating things that can/should be solved in a RDBMS?</p> <p>I also came across this <a href="http://backchannel.org/blog/friendfeed-schemaless-mysql" rel="noreferrer">http://backchannel.org/blog/friendfeed-schemaless-mysql</a> which seems like a solution but not sure since my numbers are so low. </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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