Should I use a document
database?
Elemar Júnior
@elemarjr
elemarjr@ravendb.net
elemarjr.com
Hello, I am Elemar Jr
I am Microsoft MVP
I love to learn new things
I love compilers
I love to write compilers
I love Roslyn
I love Computer
Graphics
But ... again, Should I use a
Document Database?
Let me tell you a story...
A long time ago (2002) in a galaxy far far
away (Caxias do Sul, RS – Brazil) ...
A brave team started to write a new version, from the scratch, of a
popular Brazilian software
How to store furniture information?
4
.mdb
Why not?
.mdb
Schema?
Some common properties
... but a lot of specific properties
We could use
one table with nullable fields (like Sharepoint
AllUserData Table)
Sounds Strange!Right?
We could use
some complex relational database structure
Complex!Better?
.mdb
<xml
/>2002, remember?
XML is
Flexible (no Schema)
Perfect!
XML is almost
Human-readable
Good!
XML is
“DDD-Friendly”
Documents XML is are
“DDD-Friendly”
Entity
Value-Type
XML is
“DDD-Friendly”
Domain-Driven
Design
by Eric Evans (2004)
2002
.NET history
DDD means (2002)
“Document-Driven Design”
Entity
Value-Type
DDD means (2002)
“Document-Driven Design”
JSON would be better
Primitive types support
Documents Collections
reference
flexible data types
Quick access using an
Index
0
1
2
3
4
Easy Sharding
0
1
2
3
4
Easy Hashing
0
1
2
3
4
#MD5
#MD5
Easy Caching
0
1
2
3
4
#MD5
#MD5
Easy Caching
Azure BLOB
Desktop
Desktop
Desktop
NoSQL is not new ...
NoSQL is NoNEW ...
Coming back to the original
question...
again, Should I use a
Document Database?
It depends...
Do you need a flexible schema?
BETTER QUESTION
Is it an opportunity?
What about event sourcing?
What about CQRS?
Do you need to scale?
What about sharding?
What about caching?
What about replication?
Today, we have RavenDB!
RavenDB supports transactions!
Querying is easy with RavenDB
again, Should I use a
Document Database?
Why not!?
Thank you!
Should I use a document
database?
Elemar Júnior
@elemarjr
elemarjr@ravendb.net
elemarjr.com

Should I use a document database?