User and group basic db functions