you can't have it both ways
Quote:
Originally Posted by groove
partcode (this should be unique)
|
AND
Quote:
Originally Posted by groove
I'm afraid the solution is not that simple.. what if two unique values of partno refer to the same part (object)..??
|
either partcode IS unique, or it isn't.
if it isn't then you may need to define another mechansim to make it unique. the only way I can see of doing that is if the partnumber is supplied from one or more suppliers and each supplier uses the same partcode for an equivalent part.
in that event the partcode would still be unique, but you would need a table to identify suppliers and an intersection tabel to associate suppliers with specific partcodes.
incidentally I'm surprised to find an ID column on what you pass off as a unique part, surely the partcode by itself is unique, or are you changing the rules (again), or merely being frugal with the business requirement