So far in my program I do the product registration in which the cost, the stock and all that data are already found.
But what I can not do is that every sale that is registered is stored in the same database. How can I relate the tables so that in the sales table you can enter the id of the product and thus be able to take the cost of the product and some more data. I would greatly appreciate your help.
I am developing the project in Java with the IDE Netbeans
and the database is MySQL
since WampServer