Difference between CouchDB and Couchbase

I think there are some essential differences between CouchDB and Couchbase Server that need to be pointed out. I will not write about the advantages of switching from CouchDB to the Couchbase Server because those are described pretty much everywhere (see The Future of CouchDB by Damien Katz or Couchbase vs. Apache CouchDB by Couchbase). … Read more

Add new field to every document in a MongoDB collection

Same as the updating existing collection field, $set will add a new fields if the specified field does not exist. Check out this example: > db.foo.find() > db.foo.insert({“test”:”a”}) > db.foo.find() { “_id” : ObjectId(“4e93037bbf6f1dd3a0a9541a”), “test” : “a” } > item = db.foo.findOne() { “_id” : ObjectId(“4e93037bbf6f1dd3a0a9541a”), “test” : “a” } > db.foo.update({“_id” :ObjectId(“4e93037bbf6f1dd3a0a9541a”) },{$set : … Read more

How do you query for “is not null” in Mongo?

This will return all documents with a key called “IMAGE URL”, but they may still have a null value. db.mycollection.find({“IMAGE URL”:{$exists:true}}); This will return all documents with both a key called “IMAGE URL” and a non-null value. db.mycollection.find({“IMAGE URL”:{$ne:null}}); Also, according to the docs, $exists currently can’t use an index, but $ne can. Edit: Adding … Read more

When to use CouchDB over MongoDB and vice versa

Of C, A & P (Consistency, Availability & Partition tolerance) which 2 are more important to you? Quick reference, the Visual Guide To NoSQL Systems MongodB : Consistency and Partition Tolerance CouchDB : Availability and Partition Tolerance A blog post, Cassandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase vs Membase vs Neo4j … Read more

Difference between scaling horizontally and vertically for databases [closed]

Horizontal scaling means that you scale by adding more machines into your pool of resources whereas Vertical scaling means that you scale by adding more power (CPU, RAM) to an existing machine. An easy way to remember this is to think of a machine on a server rack, we add more machines across the horizontal … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)