Chris Shiflett shares a solution to emulate the MySQL auto_increment with MongoDB. While you should read his post, the proposed solution is: db.seq.findAndModify({ query: {"_id":"users"}, update: {$inc: {"seq":1}}, new: true }); ☞ shiflett.org Kenny Gorman warns that the above solution is not exactly optimal: When using this technique each insert would require both the insert as well as the findAn