title: Optimising a database with two separate category tables
body: <p>I have a database for a website that provides all the data storage capabilities of the website. It stores articles in a knowlegebase, and services for internal and end-user access. </p>
  
  <p>Both articles and services are stored in categories which can have an indefinite amount of parent categories by self-referencing. It is possible to add multiple categories to either via the connecting table.</p>
  
  <p><a href="https://i.stack.imgur.com/sKexZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sKexZ.png" alt="The Schema"></a></p>
  
  <p>It needs to be possible to find the categories of a service or an article, including all the way up the category-parent tree. It also needs to be possible to find the services or articles of a category. Of course, a category can't have both.</p>
  
  <p>Is this an optimal way of doing this? It doesn't feel right, and I'd welcome alternate ideas.</p>
  
  <p>EDIT: Does this way usually work? The categories all have roughly the same content, just a name and description and perhaps an image.</p>
  
  <p><a href="https://i.stack.imgur.com/Q6NsC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q6NsC.png" alt="Alternative"></a></p>