this post was submitted on 02 Mar 2025
38 points (97.5% liked)

Learn Programming

1625 readers
3 users here now

Posting Etiquette

  1. Ask the main part of your question in the title. This should be concise but informative.

  2. Provide everything up front. Don't make people fish for more details in the comments. Provide background information and examples.

  3. Be present for follow up questions. Don't ask for help and run away. Stick around to answer questions and provide more details.

  4. Ask about the problem you're trying to solve. Don't focus too much on debugging your exact solution, as you may be going down the wrong path. Include as much information as you can about what you ultimately are trying to achieve. See more on this here: https://xyproblem.info/

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 2 years ago
MODERATORS
 

I’m versed enough in SQL and RDBMS that I can put things in the third normal form with relative ease. But the meta seems to be NoSQL. Backends often don’t even provide a SQL interface.

So, as far as I know, NoSQL is essentially a collection of files, usually JSON, paired with some querying capacity.

  1. What problem is it trying to solve?
  2. What advantages over traditional RDBMS?
  3. Where are its weaknesses?
  4. Can I make queries with complex WHERE clauses?
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 1 day ago (2 children)

A place where this type of DB really shines is in messaging. For example Discord uses NoSQL. Each message someone sends is a row, but each message can have reactions made on it by other users. In a SQL database there would be 2 tables, one for messages and one for reactions with a foreign key to the message. But at the scale of Discord they can't use a single SQL server which means you can't really have 2 tables and do a join to find reactions on a message. Obviously you could shard the databases. But in NoSQL you just lookup the message and the reactions are just stored alongside it, not in another table, making the problem simpler.

[–] [email protected] 5 points 1 day ago

Right, and you’d never do a search for messages with a particular reaction, so there’s no functionality loss is this use case.

[–] [email protected] 3 points 1 day ago

It's not really messaging that's the differentiator here - it's scale (specifically write scale). If you can't have a single master database then sure you might need NoSQL. But you almost certainly aren't anywhere near that scale. Giant sites like Stackoverflow and Shopify aren't.