Added method "addDoc" to add a document to a database