DATOMIC 
Jordan Leigh - @AlwaysBCoding
< > 
STACKS 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
2
< > 
STACKS 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
3 
Ruby 
Rails 
jQuery 
PostgreSQL
< > 
STACKS 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
4 
Ruby MongoDB 
Rails Express 
jQuery AngularJS 
PostgreSQL NodeJS
< > 
STACKS 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
5 
Ruby MongoDB Clojure 
Rails Express ClojureScript 
ReactJS 
Datomic 
jQuery AngularJS 
PostgreSQL NodeJS
< > 
DATOMIC 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
6 
Ruby MongoDB Clojure 
Rails Express ClojureScript 
ReactJS 
Datomic 
jQuery AngularJS 
PostgreSQL NodeJS
THE DATABASE AS A VALUE
WHAT IS A VALUE
42 
VALUE
[1, 2, 3] 
VALUE
:name “John Wall” 
:age 24 
VALUE 
{ 
}
<0x00000101a958d8> 
NOT A VALUE
person = Person.new(“John Wall”, 24) 
NOT A VALUE
Postgres Database 
NOT A VALUE
< > 
ADVANTAGES OF VALUES 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
15
< > 
ADVANTAGES OF VALUES 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
16 
Easy to Share
< > 
ADVANTAGES OF VALUES 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
17 
Easy to Share 
Reproducible Results
< > 
ADVANTAGES OF VALUES 
Reproducible Results 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
18 
Easy to Share 
Easy to Fabricate
< > 
ADVANTAGES OF VALUES 
Reproducible Results 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
19 
Easy to Share 
Easy to Fabricate 
Language Independent
< > 
ADVANTAGES OF VALUES 
Reproducible Results 
Language Independent 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
20 
Easy to Share 
Easy to Fabricate 
Aggregate to Values
WHAT IS A FACT
John Wall plays for the Wizards 
WHAT IS A FACT
John Wall played for the Wizards 
on November 8th 2014 
WHAT IS A FACT
Theodore Roosevelt 
held the position 
President of the United States 
on March 5th 1905 
WHAT IS A FACT
Theodore Roosevelt 
March 5th 1905 
WHAT IS A FACT 
position 
president
Theodore Roosevelt 
March 5th 1905 
WHAT IS A FACT 
position 
president 
entity
Theodore Roosevelt 
March 5th 1905 
WHAT IS A FACT 
position 
president 
attribute
Theodore Roosevelt 
position 
president value 
March 5th 1905 
WHAT IS A FACT
Theodore Roosevelt 
March 5th 1905 
WHAT IS A FACT 
position 
president 
timestamp
OO MODEL
OO MODEL
OO MODEL
FACT BASED MODEL
FACT BASED MODEL 
Timestamp
Timestamp Timestamp 
FACT BASED MODEL
Timestamp Timestamp Timestamp 
FACT BASED MODEL
A B C 
Timestamp Timestamp Timestamp 
GIT
< > 
ADVANTAGES OF VALUES 
Reproducible Results 
Language Independent 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
38 
Easy to Share 
Easy to Fabricate 
Aggregate to Values
< > 
ADVANTAGES OF VALUES 
Reproducible Results 
Language Independent 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
39 
Easy to Share 
Easy to Fabricate 
Aggregate to Values
{…} 
timestamp 
ONE FACT
[{…}, {…}, {…}, {…}, {…}, {…}] 
time 
A SERIES OF FACTS OVER TIME
[entity, attribute, value, timestamp] 
STRUCTURE OF A FACT
[entity, attribute, value, timestamp] 
[Wizards Ticket, price, $60, 11-11-2014 12:00pm] 
STRUCTURE OF A FACT
[entity, attribute, value, timestamp] 
[Wizards Ticket, price, $60, 11-11-2014 12:00pm] 
DATOM 
STRUCTURE OF A FACT
[DATOM, DATOM, DATOM, DATOM, DATOM] 
time 
A SERIES OF DATOMS OVER TIME
[DATOM, DATOM, DATOM, DATOM, DATOM] 
time 
DATOMIC 
A SERIES OF DATOMS OVER TIME
QUERY
APP 
HOW ARE WE DOING THIS NOW
APP 
HOW ARE WE DOING THIS NOW
APP 
“…” 
HOW ARE WE DOING THIS NOW
APP 
“…” 
HOW ARE WE DOING THIS NOW
APP 
“…” 
value 
HOW ARE WE DOING THIS NOW
APP 
“…” 
value 
HOW ARE WE DOING THIS NOW
APP 
“…” 
value 
manipulate with code 
HOW ARE WE DOING THIS NOW
DATOMIC 
APP
DATOMIC 
APP
DATOMIC 
APP 
value
DATOMIC 
APP 
db 
value
DATOMIC 
APP 
db 
value 
value
manipulate with code 
DATOMIC 
APP 
db 
value 
value
[{…}, {…}, {…}, {…}, {…}, {…}] 
time 
A SERIES OF FACTS OVER TIME
[{…}, {…}, {…}, {…}, {…}, {…}] 
PATTERN 
[{…}, {…}, {…}] 
PATTERN MATCHING
datomic.db.Db@4163cc8b 
[:find ?name :where 
[?eid :nba.team/city “washington”] 
[?eid :nba.team/name ?name]] 
#{[“wizards”]} 
DATALOG
APP 
“…” 
value 
HOW ARE WE DOING THIS NOW
[{…}, {…}, {…}, {…}, {…}, {…}] 
QUERY 
RESULT 
PATTERN MATCHING
[{…}, {…}, {…}, {…}, {…}, {…}] 
QUERY 
RESULT 
PATTERN MATCHING
[{…}, {…}, {…}, {…}, {…}, {…}] 
QUERY 
RESULT 
PATTERN MATCHING
[{…}, {…}, {…}, {…}, {…}, {…}] 
QUERY 
RESULT 
PATTERN MATCHING
SCHEMA
< > 
SCHEMA CONCEPTS 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
70
< > 
SCHEMA CONCEPTS 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
71 
Declaration of Entity Types
< > 
SCHEMA CONCEPTS 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
72 
Declaration of Entity Types 
Whitelist of Attributes by 
Entity Type
< > 
SCHEMA CONCEPTS 
Whitelist of Attributes by 
Entity Type 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
73 
Declaration of Entity Types 
Declaration of which 
attributes are references
Entity 
SCHEMA CONCEPTS
NBA Team 
SCHEMA CONCEPTS
NBA Team 
SCHEMA CONCEPTS 
City: STRING 
Name: STRING 
Logo: URI
NBA Team 
SCHEMA CONCEPTS 
City: “washington” 
Name: “wizards” 
Logo: http://cdn.something.com/nba/logos/wizards.svg
NBA Player 
SCHEMA CONCEPTS
NBA Player 
SCHEMA CONCEPTS 
Name: STRING 
Birthdate: INSTANT 
CurrentTeam: REF
NBA Player 
Birthdate: #inst September 6 1990 
SCHEMA CONCEPTS 
Name: “John Wall” 
CurrentTeam: 176523498213
Wizards 
John 
Wall 
CurrentTeam 
SCHEMA CONCEPTS
SCHEMA CONCEPTS 
John 
Wall 
Wizards 
PLAYER 
TEAM
SCHEMA CONCEPTS 
John 
Wall 
Wizards 
wizards 
vs. 
nets 
PLAYER 
TEAM 
GAME
SCHEMA CONCEPTS 
John 
Wall 
Wizards 
wizards 
vs. 
nets 
PLAYER 
TEAM 
GAME 
Dunk @ 
7:00 1Q 
GAME EVENT
SCHEMA CONCEPTS 
John 
Wall 
Wizards 
wizards 
vs. 
nets 
PLAYER 
TEAM 
GAME 
Dunk @ 
7:00 1Q 
GAME EVENT 
scored by
SCHEMA CONCEPTS 
John 
Wall 
Wizards 
wizards 
vs. 
nets 
PLAYER 
TEAM 
GAME 
Dunk @ 
7:00 1Q 
GAME EVENT 
Otto 
Porter 
PLAYER 
scored by 
assisted by
SCHEMA CONCEPTS 
John 
Wall 
Wizards 
wizards 
vs. 
nets 
PLAYER 
TEAM 
GAME 
Dunk @ 
7:00 1Q 
GAME EVENT 
Otto 
Porter 
PLAYER 
scored by 
assisted by
OTHER NOTES
< > 
THE GOOD 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
89
< > 
THE GOOD 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
90 
Decoupled from Storage
< > 
THE GOOD 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
91 
Decoupled from Storage 
Functions in the Database
< > 
THE GOOD 
Functions in the Database 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
92 
Decoupled from Storage 
TX Report Queue
< > 
THE BAD 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
93
< > 
THE BAD 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
94 
Not open source
< > 
THE BAD 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
95 
Not open source 
Paid license to use in 
production
< > 
THE BAD 
Paid license to use in 
production 
LOGO HERE 
Slogan line here www.website.com │ contact@website.com 
96 
Not open source 
Documentation around 
deployment is rough
CODE

Datomic