Re:Things I wish I knew about MongoDB a year ago
by jandy on Wednesday October 17, 2012 @06:55PM
(#4666779)
To elaborate on the semi-structured input point: Monogo and it's kin are great for EAV systems (http://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%...), where your entities can have an arbitrary number of fields (often user defined). Trying to build this kind of system in a traditional RDBMs can be quite tricky.
[ Parent
| on HN ]
Re:Things I wish I knew about MongoDB a year ago
by sgolestane on Wednesday October 17, 2012 @07:15PM
(#4666832)
Since we are a mysql shop, for this use-cases I serialize and store the form as xml in a CLOB column. For any field that needs to be searched on, I create an additional column.
Disadvantage of this is you can't run mysql queries against the data stored in the CLOB column.
Re:Things I wish I knew about MongoDB a year ago
by thibaut_barrere on Thursday October 18, 2012 @03:28AM
(#4667793)
Adding column per searchable field is precisely what I wanted to avoid :-)
If you need to store multiple forms types, it gets hairy very fast.
MongoDB allows to query inside the data (which is not a blob in that case).
Re:Things I wish I knew about MongoDB a year ago
by jeltz on Thursday October 18, 2012 @07:06AM
(#4668225)
So does PostgreSQL, but I have no idea about MySQL. You can run xpath queries against XML documents, and you can also index specific xpath queries (there is no general indexing infrastructure for XML in PostgreSQL). For JSON no path lookup functions are included in the core yet, but I assume there are extensions which add them.
Re:Things I wish I knew about MongoDB a year ago
by thibaut_barrere on Thursday October 18, 2012 @03:30AM
(#4667800)
Thanks for elaborating! This is much needed and spot on :-)
A long while back I built a somewhat complex survey app: I can confirm it's fairly more complicated to handle with a RDBMs, compared to a document store.