10. Why CouchDB
● Implemention for ACID Properties
○ Multi-Version Concurrency Control (MVCC)
○ B-Tree indexes
● Schema-Free document-oriented database
● RESTful default support (JSON document)
● View model / JavaScript View Functions
● Replication (Peer-based distributed
databases), Distributed, featuring robust,
incremental replication with bi-directional
conflict detection and management.
11. User Friendly of CouchDB
● Install: http://wiki.apache.org/couchdb/Installation
configuration
status check
query
user auth.
management
replocate
REST server
12. User Friendly of CouchDB
● [GET] http://ipaddress:5984/database/column_key
18. Schema-Free
var cradle = require('cradle');
var db = new(cradle.Connection)().database('starwars');
db.save('skywalker', doc-key
{
force: 'light',
name: 'Luke Skywalker' document
}, callback);
starwars
Key skywalker
Value force name
light Luke
Skywalker
19. Schema mapping to RDBMS
Document to save, free schema and dynamic
NoSQL change.
Key skywalker
Value force name ---
light Luke Skywalker ---
force name sex
light Richard W. M
Schema create first, insert later...
Every column add, need schema update, and all
RDBMS data effected DML
id (pk) force name sex
skywalker light Luke Skywalker
... ... ... ...
24. Example Data - Guess Game Raw
{
"_id":"1350783674236",
"_rev":"1-fed6ba9a837d66c8fb086b32294d5f7d",
"sessionid":"1350783674236",
"data":[
{
"player":"3WAUD..EZOHQ",
"name":"Caesar Chi",
"score":2
}
]
}
33. Reference 2: Some Acronyms
● RDBMS: Relational Database Management System.
● SQL: Structured Query Language, also used to refer to
databases that use SQL as their query language.
● NoSQL: Also called Distributed Database Management
Systems, used to refer to a class of databases that are
non-relational and do not use SQL as their query
language.
● ACID: Atomicity, Consistency, Isolation, Durability.
● CAP: Consistency, Availability, Partition tolerance.
● MVCC: Multi-Version Concurency Control