Embed presentation
Download to read offline




![● [GET] http://ipaddress:5984/database/column_key](https://image.slidesharecdn.com/couchdbgettingstart-151101143028-lva1-app6891/75/CouchDB-Getting-Start-5-2048.jpg)









![{
"_id":"1350783674236",
"_rev":"1-fed6ba9a837d66c8fb086b32294d5f7d",
"sessionid":"1350783674236",
"data":[
{
"player":"3WAUD..EZOHQ",
"name":"Caesar Chi",
"score":2
}
]
}](https://image.slidesharecdn.com/couchdbgettingstart-151101143028-lva1-app6891/75/CouchDB-Getting-Start-15-2048.jpg)
![function(doc) {
if(doc.data){
for(var i = 0 ; i < doc.data.length ; i++ ) {
if(doc.data[i].player && doc.data[i].score){
emit({player:doc.data[i].player,name:doc.data[i].name}, doc.data[i].score);
}
}
}
}
列舉data並以
({player: player_id, name: player_name}: score)
建立View
Source:
一筆scores資料
Result:
一筆view資料](https://image.slidesharecdn.com/couchdbgettingstart-151101143028-lva1-app6891/75/CouchDB-Getting-Start-16-2048.jpg)


















The document is a guide on getting started with CouchDB, covering installation, configuration, and user authentication. It includes sample code for replicating data and creating views to summarize player scores. The document also provides examples of functions for data manipulation and analysis.




![● [GET] http://ipaddress:5984/database/column_key](https://image.slidesharecdn.com/couchdbgettingstart-151101143028-lva1-app6891/75/CouchDB-Getting-Start-5-2048.jpg)









![{
"_id":"1350783674236",
"_rev":"1-fed6ba9a837d66c8fb086b32294d5f7d",
"sessionid":"1350783674236",
"data":[
{
"player":"3WAUD..EZOHQ",
"name":"Caesar Chi",
"score":2
}
]
}](https://image.slidesharecdn.com/couchdbgettingstart-151101143028-lva1-app6891/75/CouchDB-Getting-Start-15-2048.jpg)
![function(doc) {
if(doc.data){
for(var i = 0 ; i < doc.data.length ; i++ ) {
if(doc.data[i].player && doc.data[i].score){
emit({player:doc.data[i].player,name:doc.data[i].name}, doc.data[i].score);
}
}
}
}
列舉data並以
({player: player_id, name: player_name}: score)
建立View
Source:
一筆scores資料
Result:
一筆view資料](https://image.slidesharecdn.com/couchdbgettingstart-151101143028-lva1-app6891/75/CouchDB-Getting-Start-16-2048.jpg)
















