3. @parasquid (also in fb/github)
works (here) at Mindvalley
helps organize KLMUG with Mark
did my rounds (from servers to
frontend and back)
settled in as an app developer
Thursday, April 25, 13
6. two years ago
joffrey was the first mongo-based
prototype Mindvalley in Mindvalley
oathkeeper was the second
got used in production
still in production
(unfortunately)
Thursday, April 25, 13
8. Relational
Impedance Mismatch
An order, which
looks like a
single aggregate
structure in the
UI, is split into
many rows from
many tables
Thursday, April 25, 13
9. NoSQL
Model alignment
The storage data
model closely
resembles how the
aggregate is
represented in the
domain (especially
in document
databases)
Thursday, April 25, 13
16. they actually are not that much
different conceptually
mostly: you store and access a key-
value store via a key (but not
always)
mostly: you store and access a
document database via a query (but
not always)
Thursday, April 25, 13
19. key-value store
aggregate is
opaque to the
database
db doesn’t care
about the
structure
document db
database
knows the
structure
db knows this
field is a
string/date/
integer/etc
Difference
Thursday, April 25, 13
20. Difference
key-value store
we can store
whatever we
like in the db
same field
names may hold
different types
of objects
document db
defines
allowable
structures
and types
structure
supports
flexibility
Thursday, April 25, 13
21. I’ve never used
a column db before so
no comments on that :)
Thursday, April 25, 13
22. But first, a word
about “Schema-less”
Thursday, April 25, 13
23. I actually prefer the term
“schema-free”
once you start querying data, your
data starts to have an implicit
schema
“schema-free” is great for non-
uniform data but you need some
structure if you want to start
querying for data
Thursday, April 25, 13
24. NoSQL shifts the schema
into the application
code that accesses it
this can be a good thing or a bad thing
Thursday, April 25, 13
26. Key-Value Stores
when to use:
session data
user preferences
shopping cart data
when NOT to use:
relationships
among data
multi-operation
transactions
query by data
Thursday, April 25, 13
27. Document Databases
when to use:
event logging
content management
systems / blogging
platforms
web analytics
e-commerce
when NOT to use:
complex
transactions
spanning different
operations
queries against
varying aggregate
structure
Thursday, April 25, 13
29. Conclusion
use the right tool for the right job
look at the tradeoffs and decide
accordingly
in the end, it’s a business decision
(supported by technical capabilities)
Thursday, April 25, 13