

How (and why) Sillicon Alley Insider uses MongoDB - DXL
http://www.businessinsider.com/how-we-use-mongodb-2009-11

======
zaphar

        it doesn't have any built-in revisioning like CouchDB
    

This is probably one of the most mis-understood features of CouchDB. It's not
a revision per-se. It's a feature to support MVCC. It's not meant to show the
history of the document over time and it's not guaranteed to be there for all
time. If you compact the database the past revisions will be deleted.
Referring to the revisions as a feature is somewhat of a misnomer. They are
there to enable a feature(MVCC and as a per document consistency check on
writes) but aren't really a feature in and of themselves.

------
cx01
Most of the things the article talks about are actually possible in a SQL
database. You can easily store JSON data in table rows if you want; foreign
keys and joins are just further options that SQL offers you and MongoDB
doesn't. I also don't understand the argument for a schema-less database.
After all, you always have a schema; in a SQL database it is explicit, whereas
in MongoDB it is implicit. Seems similar to the argument between proponents of
dynamic and static typing.

Overall I think the only reason for going with MongoDB is performance.

~~~
ibwhite
Hey there -- article author here. Thanks for reading.

Storing JSON data in a SQL database is possible but not practical. For one
thing, it's very difficult to query the individual fields within that JSON
data. You also can't retrieve a portion of the data, or do atomic updates to
individual fields, etc. It's something I've done before and it's just not
pleasant.

The schemaless thing is to some degree a matter of taste, yes. What's not a
matter of taste, as I mentioned in the article, is when you have to run an
alter statement on your huge SQL dataset that takes down your site for hours.

But I don't believe that one size fits all. Some websites will be better off
with a RDMS. Mongo's better for us. Again, thanks for reading and commenting.

~~~
cx01
> For one thing, it's very difficult to query the individual fields within
> that JSON data. You also can't retrieve a portion of the data, or do atomic
> updates to individual fields

I think this may be possible to some degree using the scripting capabilites of
the RDBMS, but I don't know for sure. Even then, I have to agree that in Mongo
it is much easier to do because it's built-in.

> when you have to run an alter statement on your huge SQL dataset that takes
> down your site for hours.

That's indeed a problem. I wonder if there's a SQL database that allows
instant schema changes; I can't see a reason why it shouldn't be possible
technically.

------
chrischen
I'm using LNMP (pronounced "lamp")

Linux nginx mongodb php

------
bhseo
_"But overall, MongoDB is probably well-suited for a lot of web applications
-- maybe as many as 50%."_

Found this at the end of the article, made me chuckle.

