Getting the database ready