블로그 이미지
LifeisSimple

calendar

1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

Notice

'CouchDB'에 해당되는 글 2

  1. 2010.12.29 Programming CouchDB with Javascript
  2. 2010.12.29 Document Databases Compared: CouchDB, MongoDB, RavenDB
2010. 12. 29. 17:30 Brain Trainning/NoSQL
좀 오래되긴 했지만... 그래도 간단하게 잘 설명된것 같습니다. 


To illustrate how easy and straightforward writing applications for CouchDB is, we are going to build a simple todo-list application in Javascript. You should be familiar with HTMLand Javascript and the DOM. You do not need any Ajaxexperience. Although we are going to use it, all will be abstracted away.

The interface is quite plain, as is the functionality. This is only to demonstrate how to work with CouchDB and not meant as a real application. We could turn this into something nice with some spit & polish.

Say hello to our todo app

How it works

We take a top level view here, working our way from the user’s perspective down to the actual code. This ensures we do not screw up the application for the user by mapping its inner workings to the user’s model.

When you open the app you are greeted with an empty input box and a list of todos (or no todos, in case you were working hard). You can type in a single-line todo item, hit enter and that line appears on top of the list. Finally, the input field gets reset and you can enter another item. To mark an item done, click the X next to it. It will disappear.

Boy this looks trivial, but it captures the essence of a todo list. There are plenty of opportunities how to improve things, but let’s nail the basics first.


....


posted by LifeisSimple
2010. 12. 29. 14:29 Brain Trainning/NoSQL


Document Databases Compared: CouchDB, MongoDB, RavenDB

by Alex Popescu

Brian Ritchie has two posts (☞ here and ☞ here) covering three document databases: CouchDB, MongoDB, and RavenDB concluding with the matrix below:

But before using this as a reference material there are a couple of corrections needed:

They have some special characteristics that make them kick some serious SQL.

  • Objects can be stored as documents: The relational database impedance mismatch is gone. Just serialize the object model to a document and go.
  • Documents can be complex: Entire object models can be read & written at once. No need to perform a series of insert statements or create complex stored procs.
  • Documents are independent: Improves performance and decreases concurrency side effects
  • Open Formats: Documents are described using JSON or XML or derivatives. Clean & self-describing.
  • Schema free: Strict schemas are great, until they change. Schema free gives flexibility for evolving system without forcing the existing data to be restructured.
  • Built-in Versioning: Most document databases support versioning of documents with the flip of a switch.
  1. Judging by the growing number of document database mapping tools, I’m not sure impedance mismatch is really gone (related to 1st point above)
  2. Using embedded format is not always the best solution for mapping relationships and other more complex data structures. (related to 2nd and 3rd points above)
  3. Versioning is an extra-feature that is not fundamental to document databases. MongoDB and CouchDB do not support it by default, but there are different solutions available

Related to the matrix comparison:

  1. Versioning is not supported by either MongoDB and CouchDB. MVCC should not be confused for document versioning
  2. Sharding: CouchDB doesn’t support sharding out of teh box. There are different solutions for scaling CouchDB, using Cloudant Dynamo-like scaling solution for CouchDB, or evenrunning CouchDB with a Riak backend
  3. Replication: both MongoDB and CouchDB support master/master and master/slave
  4. Security: check firstly the NoSQL databases and security post and decide for yourself and the “basic” level is enough for your app

posted by LifeisSimple
prev 1 next