document database access