Home > front end >  Table Design for Invoice
Table Design for Invoice

Time:09-08

I'm developing an software in vb.net with accessdb for a small business. In this I had to make an invoice I have product table, client table I have to make an invoice / order / transaction now. I'm confused in items like custem A buy 10 items on diffrent quantaty and diffrente rate how should I store those 10 items it can be 5 or 15 or more than that how shoul I store it. what will be the best way to do this. I was thinkning to make a new row for each items but it will be waste of storage. is there any smart way to do this.

CodePudding user response:

Save the data normalized.

the bridge table Order_product has a m:n relation ship.

you can extend the schema, by adding a city table country table and so on so that you save only integers instead of city names

Customer   product     order     Order_Product
c_id       p_id        o_id      o_id
c_name     p_name      o_date    p_id
c_adress               c_id      qty
c_city                           rate

Joining all tables by their foreign keys you can easily get all nformation yu want

  • Related