Database design and retrieve category from Database