Skip to content

Commit 494ba3c

Browse files
authored
Merge pull request mattmakai#113 from mjhea0/gh-pages
added resource to nosql article
2 parents 7a5fbd1 + 6ebdf09 commit 494ba3c

File tree

1 file changed

+42
-41
lines changed

1 file changed

+42
-41
lines changed

source/content/pages/09-data/12-nosql.markdown

Lines changed: 42 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ meta: NoSQL data stores persistent data in different ways than traditional relat
88

99

1010
# NoSQL Data Stores
11-
Relational databases store the vast majority of web application
12-
persistent data. However, there are several alternative classifications of
11+
Relational databases store the vast majority of web application
12+
persistent data. However, there are several alternative classifications of
1313
storage representations.
1414

1515
1. Key-value pair
@@ -18,7 +18,7 @@ storage representations.
1818
1. Graph
1919

2020
These persistent data storage representations are commonly used to augment,
21-
rather than completely replace, relational databases. The underlying
21+
rather than completely replace, relational databases. The underlying
2222
persistence type used by the NoSQL database often gives it different
2323
performance characteristics than a relational database, with better results
2424
on some types of read/writes and worse performance on others.
@@ -30,9 +30,9 @@ on [hash map](http://en.wikipedia.org/wiki/Hash_table) data structures.
3030

3131

3232
### Key-value pair data stores
33-
* [Redis](http://redis.io/) is an open source in-memory key-value pair data
33+
* [Redis](http://redis.io/) is an open source in-memory key-value pair data
3434
store. Redis is often called "the Swiss Army Knife of web application
35-
development." It can be used for caching, queuing, and storing session data
35+
development." It can be used for caching, queuing, and storing session data
3636
for faster access than a traditional relational database, among many other
3737
use cases. [Redis-py](https://github.com/andymccurdy/redis-py) is a solid
3838
Python client to use with Redis.
@@ -55,7 +55,7 @@ on [hash map](http://en.wikipedia.org/wiki/Hash_table) data structures.
5555
* "[How To Install and Use Redis](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-redis)"
5656
is a guide for getting up with the extremely useful in-memory data store.
5757

58-
* This video on
58+
* This video on
5959
[Scaling Redis at Twitter](https://www.youtube.com/watch?v=rP9EKvWt0zo) is
6060
a detailed look behind the scenes with a massive Redis deployment.
6161

@@ -92,27 +92,27 @@ some advice on Reids security and guarding against data breaches.
9292

9393
* Redis, just as with any relational or NoSQL database, needs to be secured
9494
based on [security guidelines](http://www.antirez.com/news/96). There is
95-
also a post where the main author of Redis
95+
also a post where the main author of Redis
9696
[cracks its security](http://www.antirez.com/news/96) to show the tradeoffs
9797
purposely made between ease of use and security in the default settings.
9898

9999
* [Is your Redis server safe?](https://www.isredisallsafe.com/) is a tool
100-
to test that your Redis instances are locked down. The tool is based on
101-
the blog post
100+
to test that your Redis instances are locked down. The tool is based on
101+
the blog post
102102
[a few things about Redis security](http://www.antirez.com/news/96).
103103

104104

105105
## Document-oriented
106106
A document-oriented database provides a semi-structured representation for
107-
nested data.
107+
nested data.
108108

109109

110110
### Document-oriented data stores
111-
* [MongoDB](http://www.mongodb.org/) is an open source document-oriented
112-
data store with a Binary Object Notation (BSON) storage format that is
113-
JSON-style and familiar to web developers.
111+
* [MongoDB](http://www.mongodb.org/) is an open source document-oriented
112+
data store with a Binary Object Notation (BSON) storage format that is
113+
JSON-style and familiar to web developers.
114114
[PyMongo](http://docs.mongodb.org/ecosystem/drivers/python/) is a
115-
commonly used client for interfacing with one or more MongoDB
115+
commonly used client for interfacing with one or more MongoDB
116116
instances through Python code. [MongoEngine](http://mongoengine.org/)
117117
is a Python ORM specifically written for MongoDB that is built on top
118118
of PyMongo.
@@ -121,12 +121,12 @@ nested data.
121121
focused on availability, fault tolerance and large scale deployments.
122122

123123
* [Apache CouchDB](http://couchdb.apache.org/) is also an open source project
124-
where the focus is on embracing RESTful-style HTTP access for working with
124+
where the focus is on embracing RESTful-style HTTP access for working with
125125
stored JSON data.
126126

127127

128128
### Document-oriented data store resources
129-
* [MongoDB for startups](http://www.optinidus.com/blogs/guide-to-mongodb-for-startups/)
129+
* [MongoDB for startups](http://www.optinidus.com/blogs/guide-to-mongodb-for-startups/)
130130
is a guide about using non-relational databases in green field environments.
131131

132132
* The creator and maintainers of PyMongo review four decisions they regret
@@ -136,16 +136,18 @@ nested data.
136136
1. [copy\_database](http://emptysqua.re/blog/good-idea-at-the-time-pymongo-copy-database/)
137137
1. [MongoReplicaSetClient](http://emptysqua.re/blog/good-idea-at-the-time-pymongo-mongoreplicasetclient/)
138138

139-
* The
140-
[Python and MongoDB](https://talkpython.fm/episodes/show/2/python-and-mongodb)
141-
Talk Python to Me podcast has a great interview with the maintainer of the
139+
* The
140+
[Python and MongoDB](https://talkpython.fm/episodes/show/2/python-and-mongodb)
141+
Talk Python to Me podcast has a great interview with the maintainer of the
142142
Python driver for MongoDB.
143143

144144
* [MongoDB queries don’t always return all matching documents!](https://engineering.meteor.com/mongodb-queries-dont-always-return-all-matching-documents-654b6594a827)
145145
is a walkthrough of discovering how MongoDB queries actually work, and
146146
shows some potential pitfalls of relying on technologies where you do
147147
not fully understand how they operate.
148148

149+
* [Introduction to MongoDB and Python](https://realpython.com/blog/python/introduction-to-mongodb-and-python/)
150+
shows how to use Python to interface with MongoDB via PyMongo and MongoEngine.
149151

150152
## Column-family table
151153
A column-family table class of NoSQL data stores builds on the key-value
@@ -161,20 +163,20 @@ column family is similar to a table in the relational database model.
161163

162164
## Graph
163165
A graph database represents and stores data in three aspects: nodes, edges
164-
and properties.
166+
and properties.
165167

166-
A *node* is an entity, such as a person or business.
168+
A *node* is an entity, such as a person or business.
167169

168-
An *edge* is the relationship between two entities. For example, an
169-
edge could represent that a node for a person entity is an employee of a
170-
business entity.
170+
An *edge* is the relationship between two entities. For example, an
171+
edge could represent that a node for a person entity is an employee of a
172+
business entity.
171173

172-
A *property* represents information about nodes. For example, an entity
174+
A *property* represents information about nodes. For example, an entity
173175
representing a person could have a property of "female" or "male".
174176

175177

176178
### Graph data stores
177-
* [Neo4j](http://www.neo4j.org/) is one of the most widely used graph
179+
* [Neo4j](http://www.neo4j.org/) is one of the most widely used graph
178180
databases and runs on the Java Virtual Machine stack.
179181

180182
* [Cayley](https://github.com/google/cayley) is an open source graph data
@@ -186,7 +188,7 @@ representing a person could have a property of "female" or "male".
186188

187189
### Graph data store resources
188190
* [Introduction to Graph Databases](http://www.slideshare.net/maxdemarzi/introduction-to-graph-databases-12735789)
189-
covers trends in NoSQL data stores and compares graph databases to other
191+
covers trends in NoSQL data stores and compares graph databases to other
190192
data store types.
191193

192194

@@ -198,7 +200,7 @@ representing a person could have a property of "female" or "male".
198200
## NoSQL data store resources
199201
* [NoSQL databases: an overview](http://www.thoughtworks.com/insights/blog/nosql-databases-overview)
200202
explains what NoSQL means, how data is stored differently than in
201-
relational systems and what the Consistency, Availability and
203+
relational systems and what the Consistency, Availability and
202204
Partition-Tolerance (CAP) Theorem means.
203205

204206
* [CAP Theorem overview](http://natishalom.typepad.com/nati_shaloms_blog/2010/10/nocap.html)
@@ -209,11 +211,11 @@ representing a person could have a property of "female" or "male".
209211
of NoSQL databases are doing under the covers.
210212

211213
* The [CAP Theorem series](http://blog.thislongrun.com/2015/03/the-cap-theorem-series.html)
212-
explains concepts related to NoSQL such as what is ACID compared to CAP, CP
214+
explains concepts related to NoSQL such as what is ACID compared to CAP, CP
213215
versus CA and high availability in large scale deployments.
214216

215-
* [NoSQL Weekly](http://www.nosqlweekly.com/) is a free curated email
216-
newsletter that aggregates articles, tutorials, and videos about
217+
* [NoSQL Weekly](http://www.nosqlweekly.com/) is a free curated email
218+
newsletter that aggregates articles, tutorials, and videos about
217219
non-relational data stores.
218220

219221
* [NoSQL comparison](http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis)
@@ -222,24 +224,23 @@ representing a person could have a property of "female" or "male".
222224

223225
* Relational databases such as MySQL and PostgreSQL have added features in
224226
more recent versions that mimic some of the capabilities of NoSQL data
225-
stores. For example, check out this blog post on
227+
stores. For example, check out this blog post on
226228
[using MySQL as a key-value pair store](http://engineering.wix.com/2015/12/10/scaling-to-100m-mysql-is-a-better-nosql/)
227229
and this post on
228230
[storing JSON data in PostgreSQL](https://blog.codeship.com/unleash-the-power-of-storing-json-in-postgres/).
229231

230232

231233
## NoSQL data stores learning checklist
232-
1. Understand why NoSQL data stores are better for some use cases than
233-
relational databases. In general these benefits are only seen at large
234+
1. Understand why NoSQL data stores are better for some use cases than
235+
relational databases. In general these benefits are only seen at large
234236
scale so they may not be applicable to your web application.
235237

236-
1. Integrate Redis into your project for a speed boost over slower persistent
237-
storage. Storing session data in memory is generally much faster than
238-
saving that data in a traditional relational database that uses persistent
239-
storage. Note that when memory is flushed the data goes away so anything
240-
that needs to be persistent must still be backed up to disk on a regular
238+
1. Integrate Redis into your project for a speed boost over slower persistent
239+
storage. Storing session data in memory is generally much faster than
240+
saving that data in a traditional relational database that uses persistent
241+
storage. Note that when memory is flushed the data goes away so anything
242+
that needs to be persistent must still be backed up to disk on a regular
241243
basis.
242244

243-
1. Evaluate other use cases such as storing transient logs in a
245+
1. Evaluate other use cases such as storing transient logs in a
244246
document-oriented data store such as MongoDB.
245-

0 commit comments

Comments
 (0)