database and modelling doc