Single Category Table For Entire Site Or Different For Different Use Case

product table has category, media table has category, tickets table has category.

Each of these has a HasMany relation with category table. There are two ways of doing it:

  • Have a common Category table with probably a type column and have intermediatory table like MediaCategory, etc.

  • Have separate tables like MediaCategory with each having same structure as category

which one is better(speed, maintainability etc)

a category table (id, model, modelId, parentId, ordering, name, lft, rgt)

model = [product|media|ticket]

modelId = pk value of model

so how will relations be

could anybody tell me so how will relations be and how will the queries be