Expert Help required

J

Jim

Currently I working out a database for my company.I have created a table mean
for the storing my customer's purchase,another table is a list of products
they purchase from my company.
My problem is that how do i create another 'cost' field and link it with the
product.In this way i can just select the product and the price will appear
on the respective fields.
(It working just like the cashiering system whereby the cashier just have to
scan the barcode n the price will just appear)
can it be done?

Best Regards
Jimmy
 
T

tw

is a single product going to have more than one cost???
if not then you can add the field in the products table for cost, if it is a
cost that changes based on a specific sale and you want that sale linked to
the customer who purchased then you can have three tables

customer
product
customerpurchase

with a primary key in the customer table and a primary key in the product
table you can add records in the customer purchase table with includes the
cost for the specific purchase

i.e.
customer 1 key value = c1
customer 2 key value = c2
etc.

product 1 key value = p1
product 2 key value = p2
etc.

customer 1 purchased product 2 at a price of 30.00

table customerpurchase fields values for that record
customerkey = c1
productkey = p2
productcost = 30.00

customer 2 purchased product 2 at a price of 50.00
table customerpurchase fields values for that record
customerkey = c2
productkey = p2
productcost = 30.00

other fields such as purchase date can also be added.

Does this help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top