Why You Should Never Use MongoDB

429 views
Skip to first unread message

Christopher Lozinski

unread,
May 3, 2015, 8:15:57 AM5/3/15
to zodb
Here is a very interesting article about MongoDB. 

http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/<http://www.sarahmei.com/blog/2013/11/11/why-you-should-never-use-mongodb/>

It basically points out that MongoDB does not preserve the relationships between data, nor does it provide support for joins. Much better to use ZODB as your JSon server. 

Regards
Christopher Lozinski

Jim Fulton

unread,
May 4, 2015, 10:08:25 AM5/4/15
to Christopher Lozinski, zodb
This is an interesting article. It's a shame she didn't mention that
multi-document
transactions aren't even an option in Mongo.

I found he observation about storing an entire TV season in one document to be
interesting. This suggest that we might be better erroring towards larger ZODB
objects. It also makes me think (again) that we should have
sub-persistent objects
that behave like persistent objects WRT state management but that are held in a
(single) parent object's database record.

Jim

--
Jim Fulton
http://www.linkedin.com/in/jimfulton

Christopher Lozinski

unread,
Jul 6, 2015, 1:49:22 PM7/6/15
to zodb
I am giving a talk about ZODB on Wednesday.

A very early first draft is posted here:

http://www.zopache.com/topics/zodbisfortrees

If you have any interesting examples of ZODB trees, please do share them
with me.

I would be particularly interested in comparisons of ZODB and MongoDB.
Jim made some comments earlier on this mailing list. He said
transactions cannot span two Mongo documents. Can I have two
simultaneous transactions on different branches of a Mongo Document? I
suspect not. Any experts out there?

What other questions/issues should I be ready to address in this talk?

I am so impressed by ZODB. I wonder why more people are not using it?
By talking about it, hopefully we can bring more people to this community.

Regards
Chris

Luciano Ramalho

unread,
Jul 6, 2015, 3:51:57 PM7/6/15
to Christopher Lozinski, zodb
On Mon, Jul 6, 2015 at 2:49 PM, Christopher Lozinski
<lozi...@specialtyjobmarkets.com> wrote:
> I would be particularly interested in comparisons of ZODB and MongoDB.
> Jim made some comments earlier on this mailing list. He said
> transactions cannot span two Mongo documents. Can I have two
> simultaneous transactions on different branches of a Mongo Document? I
> suspect not. Any experts out there?

I am not an expert now, but I did study MongoDB a lot until a couple
of years ago -- then I lost interest.

MongoDB locking at the time was *very* coarse. Essentially only one
the master machine in a cluster could accept writes, and it locked the
entire collection for the duration of the write, so two different
transacions on different parts of the same document was completely out
of question ;-). Things may have improved, of course.

> I am so impressed by ZODB. I wonder why more people are not using it?

I think the ZODB is amazing, built a company around Zope and ZODB in
Brazil in the late 1990's. We closed around 2003 after the first Web
bubble burst.

The major issue with ZODB is the same with all object databases: the
data becomes very closely tied to the application that created it.
However, for companies, data is more valuable than any specific
application that uses it, so this coupling becomes a huge problem over
time.

I believe document databases like MongoDB and CouchDB are an excellent
alternative to relational databases and to ZODB in the content
management niche where ZODB excells. A document database is more
suitable to store real documents (no kidding!) than a RDBMS, but it
enables multiple applications (or multiple generations of the same
application) to access the data.

Best,

Luciano



> By talking about it, hopefully we can bring more people to this community.
>
> Regards
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups "zodb" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zodb+uns...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Luciano Ramalho
| Author of Fluent Python (O'Reilly, 2015)
| http://shop.oreilly.com/product/0636920032519.do
| Professor em: http://python.pro.br
| Twitter: @ramalhoorg

Jim Fulton

unread,
Jul 6, 2015, 6:24:17 PM7/6/15
to Christopher Lozinski, zodb
On Mon, Jul 6, 2015 at 1:49 PM, Christopher Lozinski
<lozi...@specialtyjobmarkets.com> wrote:
> I am giving a talk about ZODB on Wednesday.
>
> A very early first draft is posted here:
>
> http://www.zopache.com/topics/zodbisfortrees
>
> If you have any interesting examples of ZODB trees, please do share them
> with me.
>
> I would be particularly interested in comparisons of ZODB and MongoDB.
> Jim made some comments earlier on this mailing list. He said
> transactions cannot span two Mongo documents. Can I have two
> simultaneous transactions on different branches of a Mongo Document? I
> suspect not.

I suspect so, but then one would win, as with ZODB.

> Any experts out there?

But I am not a Mongo expert.

> What other questions/issues should I be ready to address in this talk?
>
> I am so impressed by ZODB.

Me too. :)

> I wonder why more people are not using it?

It's value is hard to describe. I should try harder.

> By talking about it, hopefully we can bring more people to this community.

Couldn't hurt.

I should note that you can do trees/documents in Postgres via JSON columns,
so you get decent transactions and trees.

Jim

--
Jim Fulton
http://jimfulton.info

Paul Everitt

unread,
Jul 6, 2015, 6:33:08 PM7/6/15
to Jim Fulton, Christopher Lozinski, zodb
FWIW, I wrote some tutorial stuff about adjacency list patterns:


This, combined with the new JSONB support, makes for an interesting subset of ZODB+ZCatalog. Shane and I were toying with some recursive CTEs that would do the walking around in one SQL request. I was also hoping to implement ACL filtering in a CTE.

—Paul

Christopher Lozinski

unread,
Jul 7, 2015, 3:38:41 AM7/7/15
to zodb, Luciano Ramalho, j...@jimfulton.info
Thank you for the excellent comments.  Clearly this topic is of interest to developers.  But maybe I was being too cautious.  The new title of the talk is "ZODB is for Trees Graphs"



On 7/6/15 9:51 PM, Luciano Ramalho wrote:
for companies, data is more valuable than any  specific
application that uses it, 

That is an excellent comment.  I think that Grok/ZTK is brilliant software, but as long as there are no jobs or resumes in PrivaCV, nobody cares. 

And in a private email someone mentioned Adjacency List Patterns which allow you to traverse a relational database using Pyramid and SQLAlchemy.


If you have to use a relational database, that seems like a great option.  Of course doing it directly on the ZODB is so much easier and faster.


And finally Jim write:
On 7/7/15 12:23 AM, Jim Fulton wrote:
 I wonder why more people are not using it?
It's value is hard to describe. I should try harder.

Jim I think that you have done a brilliant job on the technology.  The million dollar question is how to market this stuff.   The ideas in your and my heads are different than the ideas in the average person's head.   I can't change that.    Pushing trees may not do it.  MongoDB does trees, even if there are issues.  But the ability to represent the world as a graph, and do transactions on any piece of that Graph...   Now that is really quite unique and interesting to software developers.   And I can browse and edit that live graph with Zopache.   I use that to add job markets at run time.  But still the business people will not care about these specialty technologies.  What will get their attention?  Only if I can gain significant market share being a one-man developer shop.  Then the business people will pay attention. 

In the meantime, let us see how the developers react to the topic: "ZODB is for Trees graphs".
Chris











Jim Fulton

unread,
Jul 7, 2015, 6:56:12 AM7/7/15
to Christopher Lozinski, zodb, Luciano Ramalho, Jim Fulton
On Tue, Jul 7, 2015 at 3:38 AM, Christopher Lozinski
<lozi...@specialtyjobmarkets.com> wrote:
> Thank you for the excellent comments. Clearly this topic is of interest to
> developers. But maybe I was being too cautious. The new title of the talk
> is "ZODB is for Trees Graphs"

There is this idea that ZODB is a graph database. I'm not fond of this
because it is
both more and less than that..


>
>
> On 7/6/15 9:51 PM, Luciano Ramalho wrote:
>
> for companies, data is more valuable than any specific
> application that uses it,
>
>
> That is an excellent comment. I think that Grok/ZTK is brilliant software,
> but as long as there are no jobs or resumes in PrivaCV, nobody cares.


That's not what he meant. He meant that when people choose a database
technology, they often don't want to be locked into a specific technology
and (in the case of ZODB) language.

,,,

> And finally Jim write:
> On 7/7/15 12:23 AM, Jim Fulton wrote:
>
> I wonder why more people are not using it?
>
> It's value is hard to describe. I should try harder.
>
>
> Jim I think that you have done a brilliant job on the technology. The
> million dollar question is how to market this stuff. The ideas in your and
> my heads are different than the ideas in the average person's head. I
> can't change that. Pushing trees may not do it.

No, not alone.


> MongoDB does trees, even
> if there are issues. But the ability to represent the world as a graph, and
> do transactions on any piece of that Graph... Now that is really quite
> unique and interesting to software developers.

There are well established graph databases. They have specialized graph
query languages, which ZODB lacks.

> And I can browse and edit
> that live graph with Zopache. I use that to add job markets at run time.
> But still the business people will not care about these specialty
> technologies. What will get their attention?

Companies in which business people make technical decisions are broken.

Jim

P.S. I stated in another message a few weeks back what I thought the important
characteristics of ZODB are, so I'm not repeating them here.
I should add these
to zodb.org.
Reply all
Reply to author
Forward
0 new messages