Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Invoices have natural identifiers (numbers) but only for the ones you write. What about the ones you get? They have InvoiceNumbers but they overlap (because two companies use the same one and both send you an invoice). In this situation your InvoiceID is unique, the Number isn't and what makes it unique would be the Customername which is no good identifier for data (too long, changes too often, may contain obscure characters...) Commented Nov 13, 2013 at 21:26
  • @AngeloNeuschitzer - If the user can uniquely identify an invoice by Customer name and number, the user doesn't need the InvoiceID PK, but the database and underlying code can use it. They're mutually exclusive functions. Commented Nov 13, 2013 at 22:44
  • See cases 1 - 3 of my example. In none of that cases Customer Name is a useful way of addressing that Object for the User (be it human or machine). InvoiceID PK is. Commented Nov 14, 2013 at 6:11