Initial database persistence working