Initialize database on opened page