What NoSQL databases are actually good?
As I understand, MongoDB is not rly a good idea due to scaling reasons (maybe others idk)
I asked an AI and it answered this, what do you think?
68 Replies
Filesystems
What do you mean?
there are multiple nosql options
document dbs (mongodb)
graph (neo4j)
kv store (dynamo)
about why: sql is quite limited
if you take a hash map to the extreme, you land close to dynamo and cassandra
A hash map?
yes
where with sql you would have something like this
with kv store you would make something like this
why "hash" map?
interesting
unique values that can scattered around
instead of a big big big machine with all values, you can have 10 smaller machines
key = 'danyella'
is on machine number 7, ask thereyou mean, instead of storing the values you store the hashes ?
keys
I don't think I understand
what
the more you're explaining the less I understand I think- sry
one sec
im creating a image
okay
"sql"
what?
kv
I don't even understand how i'm supposed to read it
ahh
wait I think I understand
take your time
You say with sql, you have to go through all the data before having the one you want?
well
the keys
I remember the B-Tree thing
or B+Tree?
anyways
yep
so that, while kv just finds what you're asking for?
yep
okay, but how does it work?
I kinda understand how some SQL DBs work simply but how do you "calculate" the place where the data is?
hash maps ๐
yeah, but how are hash maps working then?
well no I think I understand kinda
but, how does kv knows where something is by its hash?
that is the magic sause
๐
and what are the ingredients of that sauce then?
internal code
ah so we don't know?
for a specific kv like dynamo no
what are the benefits of doing such a great thing and not making it oss- ah yes, money
yep
dynamo is crazy fast
Are there any open source "KV"s then?
redis
๐
It's not open source anymore you know that r?-
it's "source-available" shit
But anyways thank you
But well if I don't use Ubuntu because Canonical works with Amazon I'm clearly not using that for my project haha
And you talked about Dynamo AND Cassandra
is it a KV too or something else?
DynamoDB is aws keyvalue database
its key-key-value
but who cares
ValKey https://valkey.io/
Damn their site is ugly
Well mostly the footer
anyways sorry
if you think that kv is hard to understand
kkv (both dynamo and cassandra) allows you to make compund keys
Ahh it's one of the Redis replacer
I've heard of it
Not really now that I understand the principle
Compound keys? What are those?
where with kv you have one key, with kkv you have multiple keys
Like SQL?
I mean in SQL you can have a bunch of unique/primary keys (it's a bad idea) for one table
ahhh
pretty cool
yep
Wait, Cassandra is built by Apache? But
they also have Spark SQL?
cassandra was created on facebook but apache develops it now
I guess they have to work in both worlds
ahhh
okay
but people use sql still? for (k)kv stores you can't simply get all values
Ahh so no
data integrity as well
yep
annoying
ah
its the tradeoff for "instant access"
where sql queries take as much time as is to compare each row, kv stores most time is taken calculating where the value will be
o(n) and o(1)
what? I was told that SQL queries are said to be more like o(log n)?
when you use the primary key tho I think
thanks the way they are stored, the B-Tree thing
o(something that is slower)
lmao
๐คน
that's a way to put it
I mean, o(log n) can be smaller than o(1) with a tiny db
(i'm joking
Hey wait
That's looks like SQL (the language
its correct
indeed
its called cql
Ik ik
I said that it looked like
the KEYSPACE keyword doesn't exist in SQL for ex
well at least not in MariaDB
(i'm only familiar with MariaDB and SQLite
what is your problem and what do you want to solve?
do you want something realtime?
something with high read speeds?
something with high write speeds?
do you want something in which everything is abstracted or do you want to write everything yourself?
for which languages do you need an orm or something similar?
after the answers to all these questions we maybe can find the best db for your use case
Well, it's simple, I wanna learn x)
But at the moment I don't havee any special needs
For the very small side projects I do
Fast or slow who cares, it's only for me
That's why I kinda like MongoDB anyways
Ok, then choose a db that looks like fun