Implemented database initialisation