Magento 2: How to make a post that relate to a category

I am creating a blog extension. However, I don’t know how to make the post relate to a category. I only make two table, one table post and one table category. But how to make it relate to each other