lunes, 6 de julio de 2015

Couchbase (NoSQL) & Java SDK

Couchbase Basic Concepts Link
https://es.wikipedia.org/wiki/CouchDB
https://en.wikipedia.org/wiki/Couchbase_Server
http://docs.couchbase.com/admin/admin/Misc/admin-basics.html
http://docs.couchbase.com/admin/admin/Views/views-intro.html

Couchbase example (install, create data and query data) 
http://tugdualgrall.blogspot.com.ar/2012/07/couchbase-101-install-store-and-query.html

Couchbase querying
http://docs.couchbase.com/admin/admin/Views/views-querySample.html
http://hardlifeofapo.com/basic-couchbase-querying-for-sql-people/

Couchbase & Java
http://docs.couchbase.com/developer/java-2.1/java-intro.html
http://docs.couchbase.com/developer/java-2.1/documents-basics.html
http://www.javacodegeeks.com/2013/01/couchbase-101-create-views-mapreduce-from-your-java-application.html
https://dzone.com/articles/hello-world-couchbase-and-java

Just to know:
  • 8092 is the Couch API REST port used to access data (where 8091 is the port for the Admin console)
  • default is the bucket in which the document is stored
  • A bucket is used by Couchbase to store data. It could be compared to a “database” in RDBMS world.
  • Couchbase can store any type of data, but when you need to manipulate some data with a structure the best way is to use JSON Documents. 
  • Access document directly from its ID: Use the REST API in port 8092)
  • Search your data with queries: Use Views (written in javascripts)

Quickly creation (via REST API / port 8092)

You can use the REST API to create the documents or buckets (databases)

Bucket (database) creation:
  • curl -X PUT 'http://localhost:8092/defaultDB
Document creation:
  • curl -X PUT 'http://localhost:8092/defaultDB/10' -d '{"name":"My Name 1"}'
In the couchbase server you will find the following new json document with the ID = 10:

{
"name": "My Name 1"

}

No hay comentarios:

Publicar un comentario