How do NoSQL databases work? Simply Explained!

preview_player
Показать описание
NoSQL databases power some of the biggest sites. They're fast and super scalable but how do they work?

Behind-the-scenes, they use a keyspace to distribute your data across multiple servers or partitions. This allows them to scale horizontally across many thousand servers.

NoSQL databases can operate in multiple modes: as key-value store, document store or wide column store.

You can run your own NoSQL database with software like Cassandra, CouchDB, MongoDB or Scylla. You can also use a cloud version like AWS DynamoDB, Google Cloud BigTable or Azure CosmosDB.

💌 Sign up for Simply Explained Newsletter:
Monthly newsletter with cool stuff I found on the internet (related to science, technology, biology, and other nerdy things)! No spam. Ever. Promise!

🌍 Follow me

📚 Sources used to make this video:

#database #aws #amazon #dynamodb #simplyexplained
Рекомендации по теме
Комментарии
Автор

In SQL, you can also partition databases and it's called sharding. You can also duplicate your databases and it's master and slave databases

fa
Автор

This video incorrectly conflates query language with storage architecture. These concepts are independent of each other. Columnar, distributed storage provides most of the horizontal scaling discussed in this video. In today's leading distributed/columnar databases, the data can be accessed with either SQL or NoSQL depending on the access requirements of the application problem you need to solve while realizing the performance benefits of horizontal scaling.

markrosenthal
Автор

In MySQL, you don't HAVE to use the relational structuring of your data. you can simply have multiple tables and treat them as truely separate tables where you run multiple queries to get all your data, each query runs on one table for example. Then you can kame the relations in your program if you need it.

powerpc
Автор

Relational databases can be way more efficient at acessing well structured data, as it is placed in predictable memory locations, and the relation keeping processing needed isn't comparable with the overhead a noSQL DB has at acessing data.
The choice of SQL vs noSQL really depends on the specific application, one isn't better than the other.

paulodpereira
Автор

You can store key value in relational database. And you can partition relational database to multiple servers based on primary key or something else. Relational db can do everything nosql can, but not the other way around

nickpelov
Автор

"EVERYTHING OLD IS NEW AGAIN !"

What you are describing is also called an Indexed Sequential Access Method (ISAM) database/file. I believe it was invented by IBM in the 60s or 70s. This was long before relational database existed. Other types of databases existed but they were very complex and hard to program and maintain. In those days "management" want reports about what was n these data files. IBM invented software to "query" these file called Report Program Generator (RPG). It was easy to use and could be setup to do various queries quickly. It was supperseeded by RPG-II that lived on for many, many years.

Digital Equipment Corporation (DEC) had their own version that came out in the 70s on PDP-11 and VAX computer systems. It had its own querey/report generator language cal Datarieve. Datatieve was a bit query as it was both an interactive as well "fixed" report generator.

jackpatteeuw
Автор

2:50 is such a surprising random indian accent moment

skullteria
Автор

Thanks for this great simple and short explanation of data storage in NoSQL-databases. Exactly what I was looking for 🙂

alexandermelchers
Автор

Teradata (since the 1980's) and IBM's DB2 Parallel Edition (since the mid-1990's) are examples of SQL databases that use sharding to scale horizontally in a linear fashion. Although both of these typically have more than just a key and a single value, they could be used with only one value (or one value in XML format) just like NoSQL databases, but they can also have multiple values.

The problem with Teradata and DB2 Parallel Edition is that the cost of license is significantly higher than NoSQL databases, which are typically open-source software with only support fee costs.

mark
Автор

@3:30 a hash is used rather than just the primary key's range directly because the hash will always partition evenly (i.e. the magnitude of the computed hash is randomly spread throughout the range)

merlinjim
Автор

There has been a style of database around since the late 1960’s that offers the best of both, plus many features that both SQL and NoSQL lack. It’s Pick and it’s many variants and descendants. Hashed, variable length, delimited, and it’s native programming language is a high-octane version of that old favorite, BASIC. It may not scale to Amazonian proportions, but it is great for most of the real world. The company I worked for started using it in 1996. By the time I retired in 2009, they had grown to over $100 million in annual sales and are still thriving on Pick clone Unidata.

LandNfan
Автор

I have been doing this for over 30 years with relational db's. We have never used fixed foreign keys (db managed ones), but always done this ourselves inside the code. This means our relational db's have been stand alone tables (with indexing) since the start and all queries we do just link the keys to get the data. Still scaling is an issue, but we can split chop, remove data into archives/servers at will and the db doesnt break.

WayneAtkinsonEntrepreneur
Автор

Me: *watch this video then go to google* "What database does Facebook Use?".
Google: "MySQL".
Me: "Yep I'm good with relational databases then."

gerars
Автор

I feel like NoSQL is what you get when a coder creates a database that never learned to clean up his room or organize anything.

ellisz
Автор

2 & a half minutes, and I know what NoSql is. Thanks video creator.

AlbertusVanSchalkwyk
Автор

The comments on this video make me very happy. Lots of people calling out the inaccuracies and bullshit in this video. Shows that there are still many people out there who actually understand databases and tradeoffs.

Me__Myself__and__I
Автор

Was looking for an explanation regarding NoSQL and this was the best one I've found. Straight to the point and complete. Congrats! Subscribed and looking for more videos in your channel :)

eduardovalentim
Автор

So relational databases are for developers who design the system they are working on, and NoSQL databases are for developers who just bang away at their keyboard without any thinking.

matthewbaynham
Автор

A lot of hate to NoSQL in comments 😂

I was looking for an efficient way to implement a shipping system, the problem was in storing some data and I found that using NoSQL is the easiest, fastest and efficient method to do that.

SQL and NoSQL are both a "powerful tools" to achieve goals, stoo comparing them and enjoy them both.

CoentraDZ
Автор

Ouf... There are so many debatable stuff in there, I don't know where to start. Let me just say that NoSQL databases have lot more disadvantages than what is explained here. The main one being that they are very slow in input (write) operations, making them unusable for most real life use - no supermarket chain or telecomm company would use a NoSQL database to capture real time transactions. Their market acceptance, which is still very low, testifies that NoSQL databases are a niche product.

robertmainville