You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 046_mongodb/00_about-nosql/README.md
+11-16Lines changed: 11 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ SQL doesn't scale well.
12
12
13
13
Scales well, however, it is eventual consistent.
14
14
15
-
FYI: NoSQL can also be thought of a schemaless. You do not define any schema. There is no defining that a table is this way or that way. There is no defining that tables are connected in different ways. With SQL, the schema is imposed by the RDBMS. With schemaless nosql, the schema needs to be imposed by the developer; the developer needs to make it all work.
15
+
FYI: NoSQL can also be thought of a **schemaless**. You do not define any schema. There is no defining that a table is this way or that way. There is no defining that tables are connected in different ways. With SQL, the schema is imposed by the RDBMS. With schemaless nosql, the schema needs to be imposed by the developer; the developer needs to make it all work.
16
16
17
17
## Types
18
18
@@ -27,25 +27,23 @@ You can use KV dbs for memcache, tracking transient data, large object storage.
Like a key-value store but the value has greater structure, such as JSON or BSON (binary encoding of JSON).
37
35
38
-
Denormalizing data is common with document dbs: data this is frequently queried together should be stored together. Example: a blog post would have the blog post, comments, and likes all stored together.
36
+
**Denormalizing data is common with document dbs**: data that is frequently queried together should be stored together.
37
+
38
+
Example: a blog post would have the blog post, comments, and likes all stored together.
39
39
40
40
Document dbs have indexing and querying capability (you can look data up by more than just the key).
41
41
42
42
You can use document dbs for web apps, data with variable schema, JSON, denormalized data (structures embedded in structures).
43
43
44
-

44
+

45
45
46
-
Examples:
47
-
1. Mongodb
48
-
1. couchdb
46
+
Examples: Mongodb, couchdb
49
47
50
48
### Column
51
49
@@ -61,10 +59,7 @@ With column nosql, data is stored in columns. This has performance gains.
61
59
62
60
"Relational databases store all the data in a particular table’s rows together on-disk, making retrieval of a particular row fast. Column-family databases generally serialize all the values of a particular column together on-disk, which makes retrieval of a large amount of a specific attribute fast. This approach lends itself well to aggregate queries and analytics scenarios where you might run range queries over a specific field." [source](http://www.jamesserra.com/archive/2015/04/types-of-nosql-databases/)
63
61
64
-
Examples:
65
-
1. Big Table (google)
66
-
1. Cassandra (facebook)
67
-
1. HBase
62
+
Examples: Big Table (google), Cassandra (facebook), HBase
68
63
69
64
Use this if you are creating the next facebook social network, the next google search engine, big science, stock market analysis, writing vast amounts of data quickly and being able to query it.
70
65
@@ -78,9 +73,9 @@ Stores information about networks such as social relations.
78
73
79
74
The [world's leading NoSQL database](http://db-engines.com/en/ranking).
80
75
81
-

76
+

82
77
83
-
## Database --> Collection --> Document
78
+
## Mongo --> Database --> Collection --> Document
84
79
85
80
A nosql database has collections which have documents.
86
81
A rdbms database has tables which have records.
@@ -96,7 +91,7 @@ The value is a dynamic schema - it can change from document to document. Documen
0 commit comments