Question: Say I want to implement a simple NoSql database containing a list of users. I want both the username and the email of the user to be unique. Which NoSql database can achieve this.

Answer: 
This solution is valid in MongoDB.

You need to put a [unique index](http://docs.mongodb.org/manual/tutorial/create-a-unique-index/) on these fields:

```
db.collection.ensureIndex({
  username: 1,
  email : 1
}, {
  unique: true
})

```

Whenever you try to add a document with a username and email combination that already exists, an exception will be raised. You just need to catch the exception and tell this to customer.

P.S. if you want these fields to be individually unique, you can instead ensure two indexes:

```
db.collection.ensureIndex({ username: 1 }, { unique: true });
db.collection.ensureIndex({ email : 1 }, { unique: true });

```
you can user the incr command on a key in redis .
you will have something like thing like this

```
127.0.0.1:6379> INCR key
(integer) 1
127.0.0.1:6379> INCR key
(integer) 2
127.0.0.1:6379> INCR key
(integer) 3
127.0.0.1:6379> INCR key
(integer) 4

```

redis is very interressing database who can manage cache (like memcache but with persistence with a lot of keys types) and pub/sub.Can be very light and very effective.

I use it on a lot of case (Session, InterProcessCommunication, persistance, realtime messaging, light data storing, geopos calculation in lua,...) i love it.
 [more infomation](http://redis.io/documentation)