How to handle multiple products in single invoice

+3 Altaf Husain Neva · January 15, 2015
I have an invoice table in which the fields are: 1) invoice_id(PK)   2)product_id (FK)    3)total_amount.
Now if the customer is buying multiple products than how should i store multiple products? I have heard that using mul Key is not a good way. Any other solution?

Post a Reply


Oldest  Newest  Rating
0 Altaf Husain Neva · January 17, 2015
Wow! I got it. Thanks for the help. I mean not just a thank but lots of it. I was working with my final year project on Supply Chain Management and i was extremely in need of this.

Ohh yes one more question. In the 3rd table you have not created any primary key and i have heard that without a primary key you can't join tables and all. So do I have to create one or it will work without it ?
  • 1

SQL & Databases


Everything SQL and Databases related in here!

Bucky Roberts Administrator