News for hackers. Stuff that matters.
Re:MongoDB shares jump more than 30% in $192M IPO by gremlinsinc on Thursday October 19, 2017 @12:41PM (#15509415)
Is it me..or does Mongo not seem as relevent and 'hip' as it once was... I mean I feel postgres is much more solid, and you can combine some of the aspects of document store via the json data types they added... of course I'm not really a DBA and don't have a lot of Mongo experience ... but personally I feel rdbms make more sense for growth/scaling..
Re:MongoDB shares jump more than 30% in $192M IPO by da_chicken on Thursday October 19, 2017 @01:38PM (#15509878)
RDBMS makes sense for most applications. Most applications store data that can be fit to the relational model. Most applications aren't big data or data mining OLAP.

Most RDBMSs can do key-value stores very well now. Most applications also care more about consistency over availability, which is what RDBMSs do (CAP theorem). Many NoSQL data stores choose availability and partitioning and sacrifice consistency (i.e., "eventual consistency"). There's a lot of applications that you can't sacrifice consistency for. Electronic health records, financial records, student records, employee records, etc. You care that the data are accurate and up to date, and you want the system to error if it can't provide that. Wrong answers and "close enough" answers aren't good enough.

Now, if you're running Reddit or Wikipedia or Facebook or HN... do you really care if a user doesn't get the absolute latest version of a document or comment? No, not really. If the content is hours old it's a problem, but it's not a big deal if it's a few minutes out of date. You care more that your users get a version of the document more than you care that they get the latest version of the document.

Re:MongoDB shares jump more than 30% in $192M IPO by gaius on Thursday October 19, 2017 @04:18PM (#15511218)
Most RDBMSs can do key-value stores very well now.

Yep, all of MongoDB is just one bullet point on Postgres's list of features. Anyone spending on money on it ought to be hauled before the shareholders and given a talking to on fiduciary responsibility...

Re:MongoDB shares jump more than 30% in $192M IPO by elvinyung on Thursday October 19, 2017 @05:03PM (#15511547)
>just one bullet point

Tell me again how Postgres can seamlessly do horizontal scaling and synchronous replication?

Re:MongoDB shares jump more than 30% in $192M IPO by orf on Thursday October 19, 2017 @09:00PM (#15512833)
https://jepsen.io/analyses/mongodb-3-4-0-rc3

> MongoDB’s version 0 replication protocol is inherently unsafe.

Tell me again how MongoDB took 8 years to get to the point where its replication is kind of OK.

Re:MongoDB shares jump more than 30% in $192M IPO by skrebbel on Friday October 20, 2017 @02:32AM (#15513889)
This subthread is about the future, not the past. 8 years ago, PG didn't have json support so your point is moot.

I'm very curious about what people think about the future of Mongo, independently and particularly in comparison to Postgres. However every time that comes up, people keep bringing up that Mongo was a buggy piece of crap in some irrelevant past. So what?

Re:MongoDB shares jump more than 30% in $192M IPO by orf on Friday October 20, 2017 @07:20AM (#15514875)
> This subthread is about the future, not the past. 8 years ago, PG didn't have json support so your point is moot.

8 years ago PG did have replication though, so not sure why it not having feature X 8 years ago makes my point moot.

People keep bringing up that it was a buggy piece of crap because its the icing on the cake and pretty much something you never want your database to be, past or present. Not that software configured by default to eat your data and not persist it can be called a database mind you.

Re:MongoDB shares jump more than 30% in $192M IPO by elvinyung on Friday October 20, 2017 @02:50PM (#15518256)
I don't see this as a problem. It takes years for any software project to mature, a DBMS even more so. I'm sure that I can go back to the 1980s and find gamebreaking bugs in the original POSTGRES. It has been years for MongoDB to approach maturity.

Of course I would prefer Postgres when I can use it, and I can generally use it basically all the time, but NoSQL still has its use cases.

Re:MongoDB shares jump more than 30% in $192M IPO by shawn-butler on Thursday October 19, 2017 @05:46PM (#15511813)
Synchronous replication was added in 9.1 and much improved in 9.6? pglogical[0] works pretty well for me under 10 but I have no production experience with bdr[1].

[0]: https://www.2ndquadrant.com/en/resources/pglogical/ [1]: https://www.2ndquadrant.com/en/resources/bdr/

Re:MongoDB shares jump more than 30% in $192M IPO by elvinyung on Friday October 20, 2017 @02:55PM (#15518300)
IMO, sure but it's far from seamless. (I also looked at pg's quorum commits, but the same applies.)

In general Postgres was not designed at its core for a distributed world. Even now, replication feels like an afterthought in the grand scheme of things, and sharding nonexistent without extensions.

Re:MongoDB shares jump more than 30% in $192M IPO by tormeh on Friday October 20, 2017 @06:52AM (#15514800)
You mean asynchronous?
Re:MongoDB shares jump more than 30% in $192M IPO by elvinyung on Friday October 20, 2017 @02:51PM (#15518259)
No.
Re:MongoDB shares jump more than 30% in $192M IPO by tribaal on Friday October 20, 2017 @04:29AM (#15514324)
> Now, if you're running Reddit or Wikipedia or Facebook or HN...

Wikipedia uses MariaDB (so, MySQL). https://meta.wikimedia.org/wiki/Wikimedia_servers#Software

Re:MongoDB shares jump more than 30% in $192M IPO by da_chicken on Friday October 20, 2017 @03:08PM (#15518409)
Wikipedia predates NoSQL. It runs on PHP + MySQL because that's what was most popular back in 2001, and they have no intrest in completely rewriting their entire stack just to use Cassandra or MongoDB. That doesn't mean a NoSQL data store wouldn't work extremely well for the type of application that Wikipedia is.
Re:MongoDB shares jump more than 30% in $192M IPO by sigzero on Friday October 20, 2017 @09:48AM (#15515708)
MongoDB is the MariaDB of the NoSQL world.
Re:MongoDB shares jump more than 30% in $192M IPO by paulmd on Thursday October 19, 2017 @06:31PM (#15512103)
> Now, if you're running Reddit or Wikipedia or Facebook or HN... do you really care if a user doesn't get the absolute latest version of a document or comment?

I mean... do you? I often come back a few minutes after posting to add something I forgot or rephrase something for clarity. I hate when I am tweaking a Reddit comment a couple times during a period of high server load and I get served an old version of the comment and end up losing something I added in a previous edit.

With something like Wikipedia it would be quite frustrating to lose revisions.

Obviously it is what it is, I can't change their codebase, and I'm sure it's necessary as currently engineered, but is there really no other way to cluster their data except "one big table"? Maybe like shard subreddits to specific servers ala Hyperdex?

But yeah, most places that Mongo is applied aren't exactly Facebook or Reddit either, in terms of total data throughput.

Re:MongoDB shares jump more than 30% in $192M IPO by da_chicken on Monday October 23, 2017 @06:11PM (#15537363)
Oh, it will certainly come up, but it's not going to break Reddit if you get an old version of a comment as long as it's eventually consistent. Nobody is going to die, and nobody is going to lose any money.

Data stores like Cassandra and MongoDB don't lose revisions. That's not the kind of consistency we're talking about. CAP consistency is just getting the most recent version. You won't lose data -- data loss is a bug, not expected behavior, just like any other data store -- you just won't always get the most recent version of it. And, keep in mind, when we talk about eventual consistency here we generally mean "consistent on all nodes within a few minutes, but we're not blocking reads to write this data." It's not going to take hours.

That said, if you find you get an old version of your own comment, I'd be more willing to believe it's the fact that your request failed with a 503 error or otherwise timed out as much as it was a data store problem. Next time it happens, wait 5 minutes and try again.

> is there really no other way to cluster their data except "one big table"? Maybe like shard subreddits to specific servers ala Hyperdex?

The whole point of MongoDB or Cassandra is that you can get shards without all the headache that RDBMSs usually put you through. You configure your sharding function and let the system do the rest. You don't have to connect to the right shard or anything of the sort, which some RDBMSs do (or did, it's been awhile since I've looked) require with sharding.

Reddit has their code and architecture posted, though it's out-of-date now, it makes it clear that it's basically just two big tables:

https://github.com/reddit/reddit/wiki/Architecture-Overview

It's PostgreSQL, ThingDB, Cassandra, memcached, and RabbitMQ.

Re:MongoDB shares jump more than 30% in $192M IPO by Daycrawler on Friday October 20, 2017 @07:08AM (#15514838)
It's not about the applications. It's about the components of the application. Reddit, Wikipedia, Facebook, HN, all use a mixture of RDBMS and NoSQL.
Re:MongoDB shares jump more than 30% in $192M IPO by rareattention on Friday October 20, 2017 @01:22AM (#15513681)
>RDBMS makes sense for most applications.

Why? An RDBMS has never been the best option for any application I have created and I have created standard business applications as well as consumer applications.

Re:MongoDB shares jump more than 30% in $192M IPO by eternalban on Thursday October 19, 2017 @01:59PM (#15510068)
> RDBMS makes sense for most applications.

But "applications" are built by development teams.

So: Does an "RDBMS makes sense for most applications"?

Re:MongoDB shares jump more than 30% in $192M IPO by kornish on Thursday October 19, 2017 @02:11PM (#15510181)
Could you point to a definition of "application" that has the word "team" in it?
Re:MongoDB shares jump more than 30% in $192M IPO by eternalban on Thursday October 19, 2017 @04:48PM (#15511414)
Why should I waste time on a non-sequitur?
Re:MongoDB shares jump more than 30% in $192M IPO by zzzcpan on Thursday October 19, 2017 @02:28PM (#15510359)
You don't seem to know this, but no traditional RDBMSs actually provide CAP consistency, for that they would have to use at least two-phase commit or something, but they don't. So, they all are noCAP databases. Electronic health or financial records are way safer in a proper eventually consistent database, like orders of magnitude safer, but everyone just takes the risk with some insurance at best to cover the losses.

EDIT: If you downvote, please explain why. You can't disagree with the truth.

Re:MongoDB shares jump more than 30% in $192M IPO by artimaeis on Thursday October 19, 2017 @04:44PM (#15511387)
> "no traditional RDBMS actually provide CAP consistency, for that they would have to use at least two-phase commit

https://docs.microsoft.com/en-us/sql/t-sql/language-elements...

> If the transaction committed was a Transact-SQL distributed transaction, COMMIT TRANSACTION triggers MS DTC to use a two-phase commit protocol to commit all of the servers involved in the transaction. If a local transaction spans two or more databases on the same instance of the Database Engine, the instance uses an internal two-phase commit to commit all of the databases involved in the transaction.

I'm only versed in SQL-Server but I'm pretty sure other RDBMS vendors provide similar functionality.

Re:MongoDB shares jump more than 30% in $192M IPO by zzzcpan on Thursday October 19, 2017 @05:21PM (#15511650)
Thanks for pointing out. Oracle has distributed transactions too.
Re:MongoDB shares jump more than 30% in $192M IPO by toomuchtodo on Thursday October 19, 2017 @02:58PM (#15510619)
In certain environments, it is better to fail then to have data that isn't immediately consistent. Finance and healthcare are two such systems. Availability is not always paramount.

https://en.wikipedia.org/wiki/Database_transaction

https://en.wikipedia.org/wiki/Atomicity_(database_systems)

Re:MongoDB shares jump more than 30% in $192M IPO by zzzcpan on Thursday October 19, 2017 @03:12PM (#15510729)
They only guarantee consistency as long as you don't use them over a network, i.e. communications with the database are always reliable. But once you do use them over a network - CAP theorem comes in and forces you to either use something like two-phase commit or no promises of consistency. Which is the opposite of what his post implied, like there is CAP consistency with those databases. But there never was!

Although I kind of got used to RDBMS crowd not understanding consistency, it's just another technology cult.

Re:MongoDB shares jump more than 30% in $192M IPO by richardwhiuk on Thursday October 19, 2017 @03:30PM (#15510875)
Proper RDMS databases have two phase commit with transactions.....
Re:MongoDB shares jump more than 30% in $192M IPO by zzzcpan on Thursday October 19, 2017 @04:53PM (#15511460)
Which ones? Traditional mainstream RDBMSs, like Mysql and Postgres don't use two-phase commit protocol. Obviously new distributed ones do it properly, but we are not talking about them.
Re:MongoDB shares jump more than 30% in $192M IPO by orf on Thursday October 19, 2017 @09:02PM (#15512842)
Re:MongoDB shares jump more than 30% in $192M IPO by cortesoft on Thursday October 19, 2017 @05:38PM (#15511756)
Wait, CAP theorem just says that you have to sacrifice availability of you want Consistency and Partition tolerance.
Re:MongoDB shares jump more than 30% in $192M IPO by da_chicken on Thursday October 19, 2017 @05:25PM (#15511675)
> You don't seem to know this, but no traditional RDBMSs actually provide CAP consistency, for that they would have to use at least two-phase commit or something, but they don't.

At the single server level (which is how I think others here are interpreting your comment)? No, they all do, with the exception of some configurations of MySQL (especially older editions, which is why it's often maligned by DBAs). That's what transaction logs do. They're literally a write ahead log (WAL). You commit a transaction, and the DB first obtains an exclusive lock on the affected rows (or page, or table). Any other transaction attempting to read or update those rows will be blocked (with exceptions). It then writes the change to the transaction log and flushes the change to disk. Then it writes the changes to the database file and flushes the change to disk. Then it returns the results of the query to the user. Many RDBMSs let you control how tightly the locks are and the degree that the data are isolated during a transaction.

At the distributed network server level? Then I guess I kind of agree with you, sure. RDBMSs let you "get around" the problems of distributed scaling by not letting you do it easily. SQL servers often only have master/slave or publisher/subscriber setups or otherwise partition the data between instances with sharding. There's no need for raft or paxos type algorithms because they don't attempt to implement a true multi-master environment. There's either a fixed overall master, or each server is the deterministic master of it's own little world, so you avoid consistency problems with distributed data. However, in doing so you sacrifice availability, since if a shard goes down so does all that data, or if the master is busy then you can't always submit queries to the slaves. Replication is used for redundancy, not scaling or load balancing. The solution RDBMSs had was sharding + master/slave replication for redundancy, which can get messy fast and has issues like hot spots or limited queries or variant performance. It's just a lot harder to do than it feels like it should be, and with storage as cheap as it is it feels like a waste of effort.

That said, some RDBMSs do allow you to use multimaster, bidirectional, or peer-to-peer replication, but most of those configurations basically warn you that you're sacrificing consistency by doing it and all of them that I've seen are a huge pain in the ass that makes shard + replicate look like child's play. They also have schema requirements that make life difficult, and they're somewhat notorious for being difficult both to administer and develop for. You have to design the whole thing from the ground up to work with this type of replication, it still feels like a house of cards, and it's this exact level of pain in the ass that encouraged the partitioning and availability focused NoSQL data stores.

However... most applications don't need that kind of scaling. They don't need a database in every time zone for single millisecond response times globally. They don't have the users to demand it, or don't have the quantity of data to require it, or have other requirements that make a traditional RDBMS desirable where you can't accept a system that allows for out-of-date data (which is when PACELC theorem kicks in because NoSQL typically doesn't have locking like an RDBMS does to mitigate this particular problem).

Re:MongoDB shares jump more than 30% in $192M IPO by kuschku on Thursday October 19, 2017 @06:20PM (#15512041)
Actually, the trend with NewSQL goes towards providing CAP consistency, even with multi-master replication.

Google’s Cloud SQL is a good example of that, by using TrueTime as transaction id, and an MVCC implementation, they are able to provide consistency, while also being good enough on the other metrics.

Some NewSQL implementations copy that concept, but unless you run GPS clocks yourself, you’ll get slightly worse results.

Re:MongoDB shares jump more than 30% in $192M IPO by bpicolo on Thursday October 19, 2017 @12:54PM (#15509512)
To be fair, Mongo is better than it's ever been. They even got through Jepsen just fine after wiredtiger.

That said, it's pretty hard to make sense of when you would want non-relational dbms these days, especially in an era where you can get 100core systems in AWS/GCP. Write-scaling is still a pretty obvious reason, though things like Citus might help here.

Re:MongoDB shares jump more than 30% in $192M IPO by dsp1234 on Thursday October 19, 2017 @01:41PM (#15509904)
They even got through Jepsen just fine after wiredtiger.

With non-default settings[0].

The Jepsen tests passed with the "linearizable" read concern. The default read concern is "local", which "Provides no guarantee that the data has been written to a majority of the replica set members (i.e. may be rolled back)."[1] This is like having "READ UNCOMMITTED" be the default read level in a traditional database system.

The Jepsen tests passed with the "majority" write concern. The default write concern is "1", which means only the "primary" in a replica set needs to acknowledge the write[2]. This does not guarantee safety in the face of network partitions.

It's still not safe out of the box.

[0] - https://jepsen.io/analyses/mongodb-3-4-0-rc3

"With the v1 protocol, majority writes, and linearizable reads, MongoDB 3.4.1 (and the current development release, 3.5.1) pass all MongoDB Jepsen tests:"

[1] - https://docs.mongodb.com/manual/reference/read-concern/

[2] - https://docs.mongodb.com/manual/reference/write-concern/

Re:MongoDB shares jump more than 30% in $192M IPO by stingraycharles on Thursday October 19, 2017 @02:23PM (#15510308)
These kind of default settings make sense, though. If you really care about lineair writes, you know how to configure it.

Same goes for example for PostgreSQL [1], that uses Read Committed rather than Serializable transaction isolation by default because for the majority of the people, this is fine, and the performance tradeoffs are worth it.

[1] https://www.postgresql.org/docs/9.5/static/transaction-iso.h...

Re:MongoDB shares jump more than 30% in $192M IPO by bpicolo on Thursday October 19, 2017 @03:07PM (#15510692)
Yeah, and you can turn off fsync in postgres if you want a blazing fast db that loses your data. :D
Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @04:03PM (#15511103)
This meme isn't even funny anymore.

It was a bug that was fixed many, many years ago and was only true if you didn't use any client libraries.

Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @04:06PM (#15511123)
Not sure if you know much about databases but those are standard defaults.

Cassandra as well doesn't require a full quorum to acknowledge writes. It just relies on the closest node. Likewise for Oracle.

http://docs.datastax.com/en/archived/cassandra/2.0/cassandra...

Re:MongoDB shares jump more than 30% in $192M IPO by growse on Thursday October 19, 2017 @01:42PM (#15509914)
> That said, it's pretty hard to make sense of when you would want non-relational dbms these days. Write-scaling is still a pretty obvious reason, though things like Citus might help here.

Personally, I find a non-relational database useful when my data model is non-relational.

Re:MongoDB shares jump more than 30% in $192M IPO by hungerstrike on Thursday October 19, 2017 @01:53PM (#15510011)
What is an example of non-relational data?

A tree is relational. Each child has a relation to its parent.

I can't imagine data that has no relation (no connection) to anything else. Maybe what you meant was heterogeneous (e.g. data elements that do not all have the same attributes) - but even then I can't readily come up with an example.

Re:MongoDB shares jump more than 30% in $192M IPO by balfirevic on Thursday October 19, 2017 @02:23PM (#15510314)
Word "relational" in relational databases does not stand for relationships between the tables [0]. That being said, relational model is a great fit for plenty (most?) of the data.

[0] - https://en.wikipedia.org/wiki/Relation_(database)

Re:MongoDB shares jump more than 30% in $192M IPO by hungerstrike on Thursday October 19, 2017 @04:30PM (#15511298)
Thanks for the technical correction. That also being said, I think that definition is terrible and that anybody trying to understand what a relational database is would be better off not reading that article.

Yes, I agree that most types of data can be stored in tabular form (or an "n-ary relation" per Wikipedia). I'm just wondering what concrete types of data one would rather store in a document.

I don't think there is a good example. The decision to store some data outside of an RDBMS must have more to do with the processing model or something else.

Re:MongoDB shares jump more than 30% in $192M IPO by growse on Friday October 20, 2017 @05:56AM (#15514619)
> I don't think there is a good example. The decision to store some data outside of an RDBMS must have more to do with the processing model or something else.

What else other than the processing model and business requirements would determine how you model and store your data?

Re:MongoDB shares jump more than 30% in $192M IPO by hungerstrike on Friday October 20, 2017 @12:08PM (#15516897)
That was my point. The person I responded to said that they only store "non-relational data" in NoSQL so I was asking what that was.
Re:MongoDB shares jump more than 30% in $192M IPO by balfirevic on Saturday October 21, 2017 @06:49AM (#15521420)
To clear up the possible confusion, the person you are currently responding to said that, not me.
Re:MongoDB shares jump more than 30% in $192M IPO by dandermotj on Thursday October 19, 2017 @02:39PM (#15510446)
Sparse heterogeneous data is often the type of data stored in NoSQL dbs. Modelled in a relational way, this produces many tables with many NULL fields, while keeping it in a key value format is neat and tidy.

I'd recommend the paper What Goes Around Comes Around[1], the first paper in Readings in Database Systems[2]

[1] https://scholar.google.com/scholar?cluster=73661829057771494... [2]redbook.io

Re:MongoDB shares jump more than 30% in $192M IPO by wvenable on Thursday October 19, 2017 @02:46PM (#15510518)
> Sparse heterogeneous data is often the type of data stored in NoSQL dbs.

I still can't imagine what sparse heterogeneous data exists in the world that makes sense to store. Any type of querying or processing requires some kind of structure (even if implicit in the code) which you can just put in different table structures.

You have to make sense of data to process it and that kind of implies a structure, doesn't it? Am I missing some obvious example of heterogeneous data?

Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @04:16PM (#15511196)
Customer Analytical Record / Feature Engineering Store

One customer column, tens of thousands of attribute columns.

If you need everything about a customer it is a single, O(1) fetch operation which makes it perfect for driving chat bots, call centres, websites, operational decisioning engines, dashboards etc. Almost every large company will have one of these.

You can't really do it in relational systems properly because (a) you hit the column limit, (b) often it is sparse i.e. lots of NULLs everywhere, (c) you need this system to be distributed since it often gets a lot of load.

Re:MongoDB shares jump more than 30% in $192M IPO by rwallace on Thursday October 19, 2017 @05:49PM (#15511829)
What would the attribute columns consist of? My experience has been with named columns defined individually by humans, of which I've never seen more than a few hundred; how do you get tens of thousands? Are they a different kind of thing?
Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @06:37PM (#15512124)
Most companies who do it purely by humans can easily get into the thousands of attributes. Have seen it many times before where you hit the column limit of a SQL database.

But where you get into tens/hundreds of thousands is when you have machine learning models automatically selecting and storing important features from the data.

Re:MongoDB shares jump more than 30% in $192M IPO by growse on Thursday October 19, 2017 @04:32PM (#15511321)
Tick (market) data is another good example of this. A given 'Tick' is just an event that can have any of up to thousands of different attributes set (often just a handful).
Re:MongoDB shares jump more than 30% in $192M IPO by bpicolo on Thursday October 19, 2017 @02:42PM (#15510481)
Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @04:12PM (#15511169)
No.

EAVT is great as an intermediate format but it is absolutely useless to query for since most of the time you are trying to find a set of attributes for a given entity i.e. full table scan.

What you want is a "wide table". One entity column and all the attribute columns to the right. Often with most of the values set to null.

This is the dream use case for MongoDB since it you can ignore sparse values yet when you query it via their drivers it will appear as a wide table. You can't do this at all in PostgreSQL since you will hit a column limit.

Re:MongoDB shares jump more than 30% in $192M IPO by flukus on Thursday October 19, 2017 @06:43PM (#15512160)
> EAVT is great as an intermediate format but it is absolutely useless to query for since most of the time you are trying to find a set of attributes for a given entity i.e. full table scan.

This is what indexes are for. An index on the entity id should avoid any full table scans.

Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @11:30PM (#15513365)
EAVT table with 100 million entities and 10000 attributes = one trillion row table.

And you want to build indexes on half the table ?

Good luck with that.

Re:MongoDB shares jump more than 30% in $192M IPO by flukus on Thursday October 19, 2017 @11:51PM (#15513443)
> Often with most of the values set to null.

Your math is at odds with your own requirements, null values don't need a row.

Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Friday October 20, 2017 @01:02AM (#15513635)
You clearly don't understand what you're talking about.

Sparcity is an issue for the wide table not the EAVT form.

Re:MongoDB shares jump more than 30% in $192M IPO by kuschku on Thursday October 19, 2017 @05:23PM (#15511664)
> You can't do this at all in PostgreSQL since you will hit a column limit.

JSONB is designed for exactly this, isn’t it?

Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @06:39PM (#15512139)
Sure. But MongoDB is far better at scaling, has infinitely better drivers (including Spark) and is about an order of magnitude faster than PostgreSQL for partial updates.

The lack of a Spark driver alone renders PostgreSQL useless for most companies.

Re:MongoDB shares jump more than 30% in $192M IPO by growse on Thursday October 19, 2017 @04:35PM (#15511344)
Any data can be modelled in a relational way, I guess. It doesn't mean it's the best representation.

Try modelling a cyclic graph in a relational way and you'll quickly tie yourself in knots trying to update and query it.

The point is, relational databases a great for storing data that you've decided to model relationally. If you decide not to, then you probably want some other sort of database.

Re:MongoDB shares jump more than 30% in $192M IPO by gaius on Friday October 20, 2017 @02:29AM (#15513868)
The point is, relational databases a great for storing data that you've decided to model relationally. If you decide not to, then you probably want some other sort of database.

Sure. But that database is not MongoDB.

Re:MongoDB shares jump more than 30% in $192M IPO by growse on Friday October 20, 2017 @05:52AM (#15514611)
Oh, I totally agree!

The "you only need relational databases" mantra bugs me though, because it's so obviously not true.

Re:MongoDB shares jump more than 30% in $192M IPO by mygo on Friday October 20, 2017 @11:11AM (#15516391)
such a naive outlook. MongoDB has two things that are being incredibly overlooked right now: 1- company stability. So you don't have to redo your database in 3 years. 2- developer community / pervasiveness. So you have an easier time integrating it into your projects, even with its technical shortcomings.

I bet two years ago there was someone out there saying "if you're going to do NoSQL you better use RethinkDB over MongoDB"

How great the technology is, is absolutely not the only factor. Good thing people can take in many different factors when making their decisions.

Re:MongoDB shares jump more than 30% in $192M IPO by pcsanwald on Thursday October 19, 2017 @03:04PM (#15510657)
instead of non-relational, think of it as denormalized. I also can't think of any cases where you wouldn't want some relationships. I can absolutely rattle off tons of cases where applications benefit greatly from some kind of denormalization.

In years past, people called these "data warehouses" and essentially took snapshots of their production DBs and denormalized the hell out of them so that aggregations wouldn't crash the server.

Re:MongoDB shares jump more than 30% in $192M IPO by bpicolo on Thursday October 19, 2017 @01:47PM (#15509953)
Sure. The most direct argument against that is that Postgresql jsonb is just non-relational data support in a first class relational DB, which is pretty great, so to an extend you get the best of both worlds, though I'm sure you can find a case where it's not quite optimal vs some nosql db.

This talk is a pretty nifty perf overview:

https://www.percona.com/live/e17/sessions/high-performance-j...

That said, if you know beforehand that horizontal scaling will be a crucial factor, probably postgres isn't the first choice. But with how fast CPUs are these days it's usually not important for a long time.

Re:MongoDB shares jump more than 30% in $192M IPO by jsjohnst on Thursday October 19, 2017 @02:11PM (#15510190)
> But with how fast CPUs are these days it's usually not important for a long time.

That’s a very naive statement to make.

Re:MongoDB shares jump more than 30% in $192M IPO by takeda on Friday October 20, 2017 @12:35PM (#15517100)
If you grow and you hit hardware limits then congratulations you are the next facebook/google/etc. Also there's nothing stopping you from switching your current database to something else.

Absolutely majority of the companies will do just fine, because the hardware improves faster than their demands. Starting out with a distributed system "because one day we might need it" is just silly, because chances are you'll never hit it, and you'll have to pay for the overhead of having a distributed system (which is non trivial).

Actually my company started using PG and had presentation and someone asked if we considered a distributed database so we can scale. The presenter nicely said it was evaluated and this solution worked best, but that was too nice.

1. It's only about 100GB of data

2. The hardware is barely utilized, we didn't tune it (except some standard memory settings), because there's no need yet.

3. Our data is relational (in fact most data from most companies is relational)

Re:MongoDB shares jump more than 30% in $192M IPO by bpicolo on Thursday October 19, 2017 @02:21PM (#15510284)
Is it? Because there are a ton of companies out there running postgres, mysql and scaling workloads just fine.
Re:MongoDB shares jump more than 30% in $192M IPO by jsjohnst on Thursday October 19, 2017 @02:41PM (#15510466)
I upvoted you because you’re technically right for many cases, but if you’d ever dealt with a database you couldn’t scale further (we were using multiple of the largest instances EC2 had at the time) and new data was flowing in faster than you could delete it and downtime wasn’t an option, you too would hate any predecessors who said “you can always scale higher” before things got so bad it was almost impossible to recover.
Re:MongoDB shares jump more than 30% in $192M IPO by bpicolo on Thursday October 19, 2017 @02:53PM (#15510581)
Yeah. There are definitely cases where the scaling options make sense along different axis for sure. My point is mostly that relational DBs tend to strike a good default ground if you aren't sure what axis you'll care about.
Re:MongoDB shares jump more than 30% in $192M IPO by threeseed on Thursday October 19, 2017 @04:08PM (#15511135)
PostgreSQL JSONB doesn't have a dedicated driver though i.e. you can't do partial updates via the JDBC/ODBC drivers.

Which means you can't use it for any big data/analytics use cases. MongoDB has fantastic client libraries e.g. Spark, Java.

Re:MongoDB shares jump more than 30% in $192M IPO by takeda on Thursday October 19, 2017 @04:48PM (#15511417)
Why wouldn't you be able to do partial updates with JDBC drivers?
Re:MongoDB shares jump more than 30% in $192M IPO by kuschku on Thursday October 19, 2017 @05:21PM (#15511651)
The JDBC driver for postgres fully supports partial updates with JSONB, though?
Re:MongoDB shares jump more than 30% in $192M IPO by collyw on Thursday October 19, 2017 @01:48PM (#15509969)
That makes complete sense, but it seems to be very rare that data is non relational in my experience.
Re:MongoDB shares jump more than 30% in $192M IPO by _jordan on Thursday October 19, 2017 @12:55PM (#15509515)
I sorta feel the same way - but then I think about the 800(?) employees they have and their combined skillset in database administration, internals, research, philosophy and I'm left feeling like there has got to be a very strong technical and business use case that I just don't see. Like I would imagine that if I were locked in a room with their Sr. product people and devs, they could easily convince most people of mongodb. I would pay money to see a debate style db-off between Postgres' core devs, and representatives from Mongodb.
Re:MongoDB shares jump more than 30% in $192M IPO by VintageCool on Thursday October 19, 2017 @01:08PM (#15509628)
Mongo is no longer as "hip", but it is slowly breaking into the enterprise as people learn the right use cases for it.
Re:MongoDB shares jump more than 30% in $192M IPO by takeda on Thursday October 19, 2017 @04:51PM (#15511445)
I still have trouble to find proper use cases for MongoDB that a more solid database couldn't handle.
Re:MongoDB shares jump more than 30% in $192M IPO by lotyrin on Thursday October 19, 2017 @01:16PM (#15509687)
And as it matures to meet more cases (e.g. new consensus, storage solutions).
Re:MongoDB shares jump more than 30% in $192M IPO by mirekrusin on Tuesday October 31, 2017 @02:26PM (#15595371)
This fact has not dribbled down from programmers to higher management yet, it seems.
Re:MongoDB shares jump more than 30% in $192M IPO by rhizome on Thursday October 19, 2017 @01:25PM (#15509761)
I had a phone screen with a company just a couple of months ago that ran on MongoDB and they were committed to it.
Re:MongoDB shares jump more than 30% in $192M IPO by gaius on Friday October 20, 2017 @02:29AM (#15513874)
Sounds like you dodged a bullet!
Re:MongoDB shares jump more than 30% in $192M IPO by stuffedBelly on Thursday October 19, 2017 @01:44PM (#15509933)
It's not hip anymore, but it's still relevant. A company might need to be hip to hype up their technology at the initial stage to gain audiences but eventually they need to settle on a mature business model that might not seem exciting but would let the company survive.
Re:MongoDB shares jump more than 30% in $192M IPO by gordon_freeman on Thursday October 19, 2017 @07:43PM (#15512500)
whenever I hear people say such things as "Oh..this app won't work well with RDBMS and it definitely needs a Document style Db.", I recall that facebook from its beginning and still use MySQL (RDBMS) database. This proves that RDBMS is relentlessly scalable and can work with very complex apps.
Re:MongoDB shares jump more than 30% in $192M IPO by ryanianian on Friday October 20, 2017 @06:30PM (#15519544)
and facebook has had to spend millions in making it work for their use-cases. it's not like facebook just enables the --scale flag for vanilla mysql and then walks away. not saying they'd be able to make vanilla mongo scale to their needs without serious investment either, but saying "facebook uses this so therefore it's good enough for me" discounts a lot of work that goes into making those solutions work for their needs/scale.
Re:MongoDB shares jump more than 30% in $192M IPO by meritt on Thursday October 19, 2017 @12:44PM (#15509434)
That's precisely why they IPO'd. Private investors needed an exit while they shift their money to Docker Inc for the next tech hype train.

https://www.hntrends.com/2017/september.html?compare1=Mongod...

Re:MongoDB shares jump more than 30% in $192M IPO by zzzcpan on Thursday October 19, 2017 @02:32PM (#15510394)
Postgres is actually much less solid, it's a database from the different era and doesn't come close to any post-CAP database, even to the infamous Mongodb.
Re:MongoDB shares jump more than 30% in $192M IPO by orf on Thursday October 19, 2017 @09:05PM (#15512851)
yeah... no. Can you explain why being "from a different era" (and so having a hell of a lot more development time and battle testing) is a bad thing.

While you're at it you could also elaborate on why Postgres is much less "solid" than a database that literally eats writes without any consensus as to if they are valid and/or actually written. After that you could explain why "post-cap" is a thing.

Until you do, your comment is pretty useless and it sounds like you could do with a nice shot of consistent, well designed database right to the heart.