I am creating app with PHP that uses Mysql DB to manage data. Tables are like this:
user purchasing medicine
____ ________ ________
id_user id_user id_medicine
username id_medic item
What really bogus me.. should insert values in purchasing(junction table) after i update user, and medicine table? Should I use transactions for it?
And second question is, are id_user and id_medic in junction table, indexes, or unique?
Sorry, Ive forgot a mysql. Thanks in advance