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 });

```
In Dynamo you can't, at least in a direct way. That's up to your model. For example, if your key is the username, and the range key is the email, you will be able to do it. However, if one of these fields are in the value, you won't be able to achieve uniqueness