i noticed that most sample apps are using person’s or item’s name as the primary key. how can that to be used as a UNIQUE key? is this a good practice?
I want to create 2 Tables.
Table Customer CustomerID (primary key) Name Date
Table Item ItemID(primary key) ItemName ItemPrice Quantity Date
How do I connect these 2 tables together in a relationship?
Do i need to create another column in Table Item called fkCustomerID(foreign key) and connect this column as a REF to Table Customer?
Table Item ItemID(primary key) ItemName ItemPrice Quantity Date fkCustomerID
I also want to add up the total ItemPrice for that a Customer and sum it up the total that this customer has bought in between a specified Date.