News for hackers. Stuff that matters.
Re:The Great Migration from MongoDB to PostgreSQL by thiht on Friday March 29, 2024 @06:29AM (#39862447)
Postgres is not hype though. There's very few legitimate use cases for not using a RDBMS as a main data store, and Postgres happens to be the most popular nowadays, for good reasons.
Re:The Great Migration from MongoDB to PostgreSQL by bradleyjg on Friday March 29, 2024 @08:44AM (#39863397)
The number one reason being that it’s free. In a purely technical comparison it is not at the top of the list.
Re:The Great Migration from MongoDB to PostgreSQL by simonw on Friday March 29, 2024 @09:18AM (#39863757)
What's top of the list technically?
Re:The Great Migration from MongoDB to PostgreSQL by bradleyjg on Friday March 29, 2024 @09:26AM (#39863849)
Oracle
Re:The Great Migration from MongoDB to PostgreSQL by pmarreck on Friday March 29, 2024 @10:09AM (#39864312)
Oracle is a giant mess, is the sense I got from trying to work with it in the past.

While I am loathe to recommend any Microsoft product, SQL Server is at least coherent, and has actual transactions like Oracle (and not just "checkpoints")

Re:The Great Migration from MongoDB to PostgreSQL by paulryanrogers on Friday March 29, 2024 @10:29AM (#39864527)
Aren't MSSQL and Oracle just doing redo logs, like MySQL?

What do you consider not actual transactions?

Postgresql keeps dead tuples in place until vacuumed, which seems optimized for rollbacks. But isn't so bad if you're inserting much more than deleting or updating.

Re:The Great Migration from MongoDB to PostgreSQL by pmarreck on Saturday March 30, 2024 @08:55AM (#39874397)
Nestable transactions = “real transactions” to me, I guess.

I almost don’t see the point in non-nestable transactions

Re:The Great Migration from MongoDB to PostgreSQL by paulryanrogers on Saturday March 30, 2024 @09:44AM (#39874809)
SQL standardizes SAVEPOINT for such nesting. Is that not sufficient? FWIW Postgres supports it.
Re:The Great Migration from MongoDB to PostgreSQL by VWWHFSfQ on Friday March 29, 2024 @10:09AM (#39864304)
Anybody that has ever used Oracle knows how nice it is. But very few people have that experience because their company isn't spending millions of dollars on the database server.
Re:The Great Migration from MongoDB to PostgreSQL by bradleyjg on Friday March 29, 2024 @11:07AM (#39864980)
Yes, that was my point.

I get that working with Oracle and their army of lawyers is not cheap or pleasant but the db is still excellent.

Re:The Great Migration from MongoDB to PostgreSQL by oldsecondhand on Friday March 29, 2024 @08:50AM (#39863442)
In my experience MySql is more popular. Worked at several companies that used MySql, none that used Postgres.

Kids at universities still use XAMMP to learn databases.

Re:The Great Migration from MongoDB to PostgreSQL by lutoma on Friday March 29, 2024 @09:01AM (#39863576)
In my experience MySQL is still commonly used in the PHP world, but everything else is mostly Postgres
Re:The Great Migration from MongoDB to PostgreSQL by circusfly on Friday March 29, 2024 @10:20AM (#39864431)
I've nothing against Postgres but MySQL is a wonderful option that is likely still in far higher and heavier use, when considering open source databases.
Re:The Great Migration from MongoDB to PostgreSQL by kstrauser on Friday March 29, 2024 @10:44AM (#39864692)
In my mind, MySQL no longer exists. It’s a weird Oracle thing that I wouldn’t touch with a lineman’s pole. MariaDB is what happened after MySQL disappeared.
Re:The Great Migration from MongoDB to PostgreSQL by wlll on Friday March 29, 2024 @11:58AM (#39865597)
I wrote this in another comment, but it's relevant here I think:

" I do scaling and performance work, mostly with Rails apps, but a significant amount of the work is database level and not language specific. I've used both postgres and MySQL (and a few other databases) going back to 2000.

The best thing I can hear from a company when I start is "We use Postgres". If they're using postgres then I know there's likely a far smoother path to performance than with MySQL. It has better tooling, better features, better metadata. "

Right now I would not choose MySQL over Postgres at all, ever. I can't think of a single way it is materially better.

Re:The Great Migration from MongoDB to PostgreSQL by LtWorf on Friday March 29, 2024 @10:39AM (#39864629)
I think it gained popularity over a decade ago, when it was faster because it was unsafe.

In the end postgres is the better one. With mysql the defaults are bad.

Re:The Great Migration from MongoDB to PostgreSQL by darby_eight on Friday March 29, 2024 @11:27AM (#39865230)
> There's very few legitimate use cases for not using a RDBMS as a main data store

I don't think that's true—all the old cases that were legitimate before are still legitimate. The price of both persistent storage and memory has simply come way down to the point where many computational workloads are viable under vertically scalable databases again. I suspect the pendulum will swing the other way one day yet again (and of course there is a rich ecosystem of ways to query horizontally, if not transactionally, with SQL that will likely temper this swing even further).

Re:The Great Migration from MongoDB to PostgreSQL by wlll on Friday March 29, 2024 @11:54AM (#39865559)
The price of persistent storage and memory was the same for Mongo as it was for Postgres back when the NoSQL movement happened. Mongo wasn't made of magic scaling fairies and still needed resources. As soon as you cranked up the safety of Mongo to a nearly acceptable level it's performance fell through the floor. The only reason people though it performed amazingly was because of Mongo's rather deceptive marketing.

I use the term "nearly acceptable" because for a long time Mongo's data consistency was absolutely crap (https://jepsen.io/analyses)

Personally I think people used Mongo because it was new, shiny and exciting and it promised performance (though it didn't really deliver for most people).

Re:The Great Migration from MongoDB to PostgreSQL by darby_eight on Friday March 29, 2024 @02:31PM (#39867432)
I am certainly not going to defend mongo ever having being a good choice; I was referring to other "NoSQL" databases (namely, the large number of highly scalable key-value stores).
Re:The Great Migration from MongoDB to PostgreSQL by thiht on Saturday March 30, 2024 @05:30AM (#39873238)
But you wouldn’t use a key value data store as your main store. It’s a specialized kind of store. Of course Redis and friends have their place. Just not as a main store.
Re:The Great Migration from MongoDB to PostgreSQL by bradleyjg on Friday March 29, 2024 @12:09PM (#39865721)
In addition to changes in ephemeral and persistent memory, the other big difference between now and nosql’s heyday is improvements in distributed relational transactional databases (newsql).

We haven’t exactly circled the square on CAP but we’ve certainly bent it.

Re:The Great Migration from MongoDB to PostgreSQL by jimbokun on Friday March 29, 2024 @02:06PM (#39867139)
In my opinion the use case is when your data no longer fits on a single, potentially very large, server. Automatic distribution and replication and rebalancing of data is a tricky problem and something like Cassandra handles those very well.

Or Cockroach DB or similar, if you still need relational capabilities.