added readonly, added database scripts