I am working on a winform (.NET) application that includes Orders, Invoices, Service Orders, Tickets, etc.
Do these enities need to be consistent in the numbering of their identifiers? IMO no. Take an order, for example, it can only be valid after it passes at the business level, during this subsequent creation a different order could be created, approved and saved with number 2, while the order that was created earlier with error 1 with error.
This seems to open up a can of worms about which layer assigns the order number, no?
I am currently using unclassified numbers with an identifier prefix for the object. For example, order uses OR-123. Is that a good idea?
thanks
Connected:
Unique but simple identifiers in SQL Server .
source
share