News for hackers. Stuff that matters.
Re:Reddit’s database has two tables (2012) by hardware2win on Wednesday August 10, 2022 @03:02AM (#32408603)
Indeed, I do wonder why industry still defaults to sql/relational instead of mature nosqls (there aint just mongo)
Re:Reddit’s database has two tables (2012) by kortilla on Wednesday August 10, 2022 @03:14AM (#32408682)
Because schemas let you agree on the shape of the data without having to pull in applications to query things for reporting, analysis, etc.

Additionally, forcing things into a correct schema also protects you from a lot of data inconsistencies out of the box.

Finally, the dbms is going to be far better at JOINs than your application will. Nearly every web application needs JOINs at some point. Developers just don’t recognize what they are doing so they don’t realize what they are missing out on by doing it at the application layer.

Re:Reddit’s database has two tables (2012) by hardware2win on Wednesday August 10, 2022 @06:49AM (#32410000)
"At some point", but how much? I believe it is up to modeling skills

Anyway - Schema slows development as hell, you need to maintain mapper layer between domain models and db models unless you model your system with anemic model mixed with tech stuff(db), but it is mess

Additionally you deal with either stringly typed sql

Or ORMs that require months of practice to be proficient even in c# which has LINQ

Re:Reddit’s database has two tables (2012) by senttoschool on Wednesday August 10, 2022 @03:29AM (#32408781)
Besides all the benefits of relational DBs, I'll give you my main reason for not starting with a NoSQL database:

Because eventually, you'd want to analyze that data and it's a huge pain to do it with NoSQL. Imagine if you hired a business analyst and she needs to look at the data. Are you going to expect her to learn Javascript to query the data? Are you going to write an ETL pipeline to move data from a NoSQL db to an SQL db?

Note: I know many NoSQL DBs now support SQL queries.

Re:Reddit’s database has two tables (2012) by corobo on Wednesday August 10, 2022 @03:24AM (#32408747)
Personally it's a lack of trust.

I've set up databases, I've broken databases, I've restored databases, I've scaled databases, and I've migrated them. Never lost so much as a nibble of data.

My introduction to NoSQL was an article about Mongo losing someone's production data. Not even all of the data - partial data loss, the worst kind of data loss.

I'm just gonna head off that massive headache at day 0 and use an ACID compliant database.

From there it's lack of experience. Same reason I wouldn't decide to write my next thing in a new language unless I was specifically learning that language.

Re:Reddit’s database has two tables (2012) by bpicolo on Wednesday August 10, 2022 @01:07PM (#32415297)
MongoDB supports a variety of sorts of ACID transactions in the current day and age

https://www.mongodb.com/basics/acid-transactions

Re:Reddit’s database has two tables (2012) by hardware2win on Wednesday August 10, 2022 @06:54AM (#32410027)
But as I prev. said NoSQL is not limited to Mongo

Ppl hate nosql cuz of mongo when there are other dbs, e.g RavenDB

>I'm just gonna head off that massive headache at day 0 and use an ACID compliant database.

It is just ACID vs BASE

Re:Reddit’s database has two tables (2012) by corobo on Wednesday August 10, 2022 @09:04AM (#32411223)
I don't hate nosql. I nothing it. I do not have any knowledge or skillset that includes it. I am most definitely naive towards any strengths and capabilities it may have over an SQL database.

I also have no reason to learn it at this time, an SQL database wins uncontested whenever I need to store data.

If I was to start a new project I wouldn't pick that moment to learn a new programming language. Same thing, different part of the stack

Honestly what it'd take would be the next WordPress or whatever using nosql by default. Make it need learning

Re:Reddit’s database has two tables (2012) by jd_mongodb on Wednesday August 10, 2022 @03:59AM (#32409012)
Do you have a reference to that article?
Re:Reddit’s database has two tables (2012) by corobo on Wednesday August 10, 2022 @05:23AM (#32409513)
Honestly we're talking at least a decade ago or so at this point, sorry.

It was a first impressions thing that stopped any further investigation, not a comment on the current state of NoSQL

Re:Reddit’s database has two tables (2012) by hardware2win on Wednesday August 10, 2022 @06:56AM (#32410042)
Imma guess

Jepsen

Re:Reddit’s database has two tables (2012) by goto11 on Wednesday August 10, 2022 @11:04AM (#32413203)
Because a relational database give you schemas, constraints and a query language out of the box.