Connect to db and search for categories and search for locations and add elements to them both