database - design decision for inventory system -


that's class diagram @ moment:

enter image description here

i believe can control level of stock @ each venue difference between quantity of purchased ingredient , quantity of beverage sold (as each beverage composed ingredient).

however, have requirement should allow users transfer ingredients between venues, , wondering best approach that...

a new purchase order add product 1 venue's inventory, how can remove other one?

just in case question, here goes solution:

i decided create table transfer_stocks register transfers between venues. table used solve discrepancy when stock counted (when recipient_id nil, means wastage or stock missing in venue -sender_id).

the products in stock calculated de difference between purchases, sales , stock transferred.

my class diagram:

enter image description here


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -