QUOTE(CrazedAzn @ 25 Jun, 2009 - 11:22 AM)

Hey DIC,
I'm working on designing the back-end and front-end of a freight forwarding company.
So, my situation is:
The company has multiple branches (NY, SEA, SFO, etc.). Each branch fills out something called an AirWaybill which contains details on the shipment. Each AirWaybill has a Master Airwaybill number which will be its Primary Key since it is unique. However, each AirWaybill also has an internal reference number that is unique to each branch but NOT unique to the whole company.
For example, you can have a reference number E0906241 that can exist in both the NYE branch and the SEA branch. How can I store this in a database effectively?
My current thought is to append the branch to the front of the reference number. (i.e. SEA-E0906241 and NYE-E0906241). Problem is, there would be a lot of redundancy (NYE-*, SEA-*, etc.). Is this the best way to do this?
Thanks for taking the time to read.
Why not set the Branch id & reference # as the primary key in the file?
Kurt