get_db_data function can connect database