I believe that you have confused the concept of inheritance (which can be seen here ), with object relationships.
As far as I understand, you have a Product class, in which you want to have the Name, Sales Price and Category information, and you also have another Category class that you have the Name information.
Well, to know which category the product in question belongs to, you have to normalize the classes first, thus:
Product Class with attributes product_id, category_id, name,
preco_venda.
Class Category with the attributes id_category, name.
This is how you make the correct relationship of objects.
In order to work your data query, you should read the concepts of primary key and foreign key here.