Add database documentation

Closed #124.