Added database support for categories