0

I am creating a purchase order system where someone can store details of their purchase. So I created a database, with tables for supplier information from which we will buy stuff and another table where we store what we are buying.

In the PurchaseOrder table, there are columns for :

  • PurchaseOrderNo (Primary)
  • BuyerInitials
  • DateOfPurchase
  • ProjectCode
  • Items (linking to the PurchaseItems table)

I want to add another column with Items' details, so I created another table PurchaseItems which has the following columns:

  • PurchaseOrderNo. (this would be repeat for each part)
  • PartNo
  • Description
  • Quantity
  • UnitAmount
  • VATAmount
  • TotalAmount

Logically it seems simple, but I can't seem to get my head around on how I would link the tables. Thank you very much for the help :)

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Vinny
  • 48
  • 8

1 Answers1

0

Create a seperate table say OrderedItems which maps the PartNo and PurchaseOrderNo. This avoids the repetition of PurchaseOrderNo in each row and also maintains the relation between PurchaseOrder and PurchaseItems table.