working database check for uid