Add categories db functions