-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme
More file actions
9 lines (6 loc) · 773 Bytes
/
readme
File metadata and controls
9 lines (6 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
I am making an inventory database for supermarket. It has two tables, one is item table, for recording the number of items in a store. The other one is purchase table. It is used to record each purchase made by customers. Their relationship is one-to-many.
I have finished CRUD of both tables, with a little style css. All the basic functions are added successfully.
I have created a trigger in purchase table in T-sql. ItemID is the primary key for item table and foreign key for purchase table.
Once a new purchase is made, the item number having the same ItemID with the purchase will be subtracted by the purchase number.
Therefore, the item table will be updated automatically.
Video demonstration: https://www.youtube.com/watch?v=4IhGnN3SItg&ab_channel=KaWingChan