best way to add Entity id & entity types in database
Make "Entity" an entry in attributes_list and treat it as any other attribute.

Also, do the same for "Category" (whatever your categories might be) and drop Category_details table