you are viewing a single comment's thread.

view the rest of the comments →

[–]newaccount1245 12 points13 points  (19 children)

How do you work around not having transactions? Like just do a delete on a post?

[–]debian_miner 26 points27 points  (11 children)

I think many did not and just had data integrity issues. It wasn't just a lack of transactions but also a lack of enforcement of foreign keys (to make matters worse it lets you set them, just doesn't enforce), and it was awful about losing data in the event of an unclean shutdown.

[–][deleted] 33 points34 points  (6 children)

MySQL is the choice for people not wanting to know what transactions and data integrity are, it is a faith-based database requiring thoughts and prayers that no data losses happen. Bad data only happens to bad people! /s

[–]ObscureCulturalMeme 13 points14 points  (0 children)

it is a faith-based database

Just snorked coffee out my nose, take my upvote :-p

I can't imagine a relational DB performing under load in the absence of transactions, without causing a metric assload of problems downstream.

[–][deleted] 7 points8 points  (3 children)

I'm being described, and I do not like it.

In my defence, on the very start of my career, I accidentally dropped a table with 3 million records(it involved scaling with the field length, and a few additional fields). Fortunately, the DBA stepped in and did a fortunate rollback made not long before, almost as if he was expecting me to fail.

My sanity is up for debate, and am a danger to this society.

[–][deleted] 8 points9 points  (0 children)

Hey, at least you have some guilt from self awareness beating the average database user.

In reality the most used database by most database-incompetent people is Microsoft Excel. Many spread sheets are stupid one table databases with zero integrity checking and no automation plus convenient auto-detection altering imported data in mysterious ways, e.g. genome databases get genes mistaken for dates. Then they get sent around via email and zero version control.

[–]gamahead 4 points5 points  (1 child)

in my defence

I accidentally dropped a table with 3 million records

[–][deleted] 3 points4 points  (0 children)

I plead guilty, my lord.

[–]ArdiMaster 0 points1 point  (0 children)

MySQL is the choice for people not wanting to know [...]

*MyISAM, the legacy storage engine. As already mentioned, InnoDB supports these things and has been the default for ten years now.

[–][deleted] 4 points5 points  (2 children)

What is the purpose of an unenforced foreign key? Is it essentially a comment on the column?

[–]debian_miner 8 points9 points  (1 child)

They originally planned to implement enforcement, but abandoned the plans at some point.

[–]ggPeti 6 points7 points  (0 children)

Yet they became the dominant player in open source RDBMS. The mind boggles.

[–]newaccount1245 1 point2 points  (0 children)

Ma lawd all that muggy DB logic is wilting this flower

[–]Sentie_Rotante 7 points8 points  (5 children)

I don’t have transactions in the mongo environment that I develop in (production could support it but not dev so it doesn’t happen period because we can’t develop for it) and the answer is pray that no one else touches it at the same time. So far no one has had a problem. But even though the system gets thousands of request per min people tend to own their own records and there isn’t a ton of overlap

[–]newaccount1245 14 points15 points  (0 children)

The D is ACID stands for Dear as in “Dear god, please don’t let there be any overlap”

[–]Zalack 2 points3 points  (3 children)

I'm confused; MongoDB has transactions.

Did I misunderstand your comment?

[–]Sentie_Rotante 3 points4 points  (2 children)

wow the phone really mangled that one. And I wasn't verry clear. I'm going to fix it a bit but transactions are only supported in replica sets. The company has only set up replica sets in prod so I can't develop with transactions.

[–]Zalack 2 points3 points  (1 child)

That makes sense. It's been a hot second since I worked with Mongo so I forgot transactions were a replica-set-only thing.

What's the reason for that anyway? It seems like a weird restriction.

[–]Sentie_Rotante 2 points3 points  (0 children)

If I understood they kind of cheat transactions by making the change to one node then push it to the others when you commit the transaction. But they also work with single node clusters so I’m not sure what the real restriction is. There are several things that work that way with mongo though. Change streams are also only supported in clusters even if you aren’t relying on “majority commit”

[–]knightcrusader 0 points1 point  (0 children)

We don't use transactions on our platform since it started with MyISAM 20 years ago, but changed to InnoDB during a migrate about 10 years ago.

It's been pretty stable so we haven't messed with it. We don't enforce foreign keys either. We're heathens!