From ff532f1fd631a134dc32cde377fb4fe70b6df808 Mon Sep 17 00:00:00 2001 From: syedmouaazfarrukh Date: Wed, 18 Jan 2023 07:19:41 -0800 Subject: [PATCH] Adding content to 101-nosql --- .../101-nosql/100-key-value-store.md | 11 ++++++++++- .../101-nosql/101-document-store.md | 11 ++++++++++- .../101-nosql/102-wide-column-store.md | 11 ++++++++++- .../101-nosql/103-graph-databases.md | 11 ++++++++++- .../content/111-databases/101-nosql/index.md | 16 +++++++++++++++- 5 files changed, 55 insertions(+), 5 deletions(-) diff --git a/src/roadmaps/system-design/content/111-databases/101-nosql/100-key-value-store.md b/src/roadmaps/system-design/content/111-databases/101-nosql/100-key-value-store.md index 49a59b60c..f2c7395df 100644 --- a/src/roadmaps/system-design/content/111-databases/101-nosql/100-key-value-store.md +++ b/src/roadmaps/system-design/content/111-databases/101-nosql/100-key-value-store.md @@ -1 +1,10 @@ -# Key value store \ No newline at end of file +# Key Value Store + +A key-value store generally allows for O(1) reads and writes and is often backed by memory or SSD. Data stores can maintain keys in lexicographic order, allowing efficient retrieval of key ranges. Key-value stores can allow for storing of metadata with a value. + +Key-value stores provide high performance and are often used for simple data models or for rapidly-changing data, such as an in-memory cache layer. Since they offer only a limited set of operations, complexity is shifted to the application layer if additional operations are needed. + +To learn more, visit the following links: + +- [Key–value database](https://en.wikipedia.org/wiki/Key%E2%80%93value_database) +- [What are the disadvantages of using a key/value table?](https://stackoverflow.com/questions/4056093/what-are-the-disadvantages-of-using-a-key-value-table-over-nullable-columns-or) \ No newline at end of file diff --git a/src/roadmaps/system-design/content/111-databases/101-nosql/101-document-store.md b/src/roadmaps/system-design/content/111-databases/101-nosql/101-document-store.md index df7f9e2b5..53cf39077 100644 --- a/src/roadmaps/system-design/content/111-databases/101-nosql/101-document-store.md +++ b/src/roadmaps/system-design/content/111-databases/101-nosql/101-document-store.md @@ -1 +1,10 @@ -# Document store \ No newline at end of file +# Document Store + +A document store is centered around documents (XML, JSON, binary, etc), where a document stores all information for a given object. Document stores provide APIs or a query language to query based on the internal structure of the document itself. Note, many key-value stores include features for working with a value's metadata, blurring the lines between these two storage types. + +Based on the underlying implementation, documents are organized by collections, tags, metadata, or directories. Although documents can be organized or grouped together, documents may have fields that are completely different from each other. + +To learn more, visit the following links: + +- [Getting started with Document Store](https://github.com/donnemartin/system-design-primer#document-store) +- [Document-oriented database](https://en.wikipedia.org/wiki/Document-oriented_database) \ No newline at end of file diff --git a/src/roadmaps/system-design/content/111-databases/101-nosql/102-wide-column-store.md b/src/roadmaps/system-design/content/111-databases/101-nosql/102-wide-column-store.md index 676178990..90e00af50 100644 --- a/src/roadmaps/system-design/content/111-databases/101-nosql/102-wide-column-store.md +++ b/src/roadmaps/system-design/content/111-databases/101-nosql/102-wide-column-store.md @@ -1 +1,10 @@ -# Wide column store \ No newline at end of file +# Wide Column Store + +A wide column store's basic unit of data is a column (name/value pair). A column can be grouped in column families (analogous to a SQL table). Super column families further group column families. You can access each column independently with a row key, and columns with the same row key form a row. Each value contains a timestamp for versioning and for conflict resolution. + +Google introduced Bigtable as the first wide column store, which influenced the open-source HBase often-used in the Hadoop ecosystem, and Cassandra from Facebook. Stores such as BigTable, HBase, and Cassandra maintain keys in lexicographic order, allowing efficient retrieval of selective key ranges. + +Learn more from the following links: + +- [A brief of Wide Column Store](https://github.com/donnemartin/system-design-primer#Wide%20column%20store) +- [Bigtable architecture](https://www.read.seas.harvard.edu/~kohler/class/cs239-w08/chang06bigtable.pdf) \ No newline at end of file diff --git a/src/roadmaps/system-design/content/111-databases/101-nosql/103-graph-databases.md b/src/roadmaps/system-design/content/111-databases/101-nosql/103-graph-databases.md index 54a5a1640..be340da15 100644 --- a/src/roadmaps/system-design/content/111-databases/101-nosql/103-graph-databases.md +++ b/src/roadmaps/system-design/content/111-databases/101-nosql/103-graph-databases.md @@ -1 +1,10 @@ -# Graph databases \ No newline at end of file +# Graph Databases + +In a graph database, each node is a record and each arc is a relationship between two nodes. Graph databases are optimized to represent complex relationships with many foreign keys or many-to-many relationships. + +Graphs databases offer high performance for data models with complex relationships, such as a social network. They are relatively new and are not yet widely-used; it might be more difficult to find development tools and resources. Many graphs can only be accessed with REST APIs. + +Learn more from the following links: + +- [Graph database](https://en.wikipedia.org/wiki/Graph_database) +- [Introduction to NoSQL](https://www.youtube.com/watch?v=qI_g07C_Q5I) \ No newline at end of file diff --git a/src/roadmaps/system-design/content/111-databases/101-nosql/index.md b/src/roadmaps/system-design/content/111-databases/101-nosql/index.md index a6b54c76c..a6b6108db 100644 --- a/src/roadmaps/system-design/content/111-databases/101-nosql/index.md +++ b/src/roadmaps/system-design/content/111-databases/101-nosql/index.md @@ -1 +1,15 @@ -# Nosql \ No newline at end of file +# NoSQL + +NoSQL is a collection of data items represented in a key-value store, document store, wide column store, or a graph database. Data is denormalized, and joins are generally done in the application code. Most NoSQL stores lack true ACID transactions and favor eventual consistency. + +BASE is often used to describe the properties of NoSQL databases. In comparison with the CAP Theorem, BASE chooses availability over consistency. + +- Basically available - the system guarantees availability. +- Soft state - the state of the system may change over time, even without input. +- Eventual consistency - the system will become consistent over a period of time, given that the system doesn't receive input during that period. + +Learn more from the following links: + +- [SQL or noSQL?](https://github.com/donnemartin/system-design-primer#sql-or-nosql) +- [Brief of noSQL Patterns](http://horicky.blogspot.com/2009/11/nosql-patterns.html) +- [Introduction to NoSQL](https://www.youtube.com/watch?v=qI_g07C_Q5I) \ No newline at end of file