Skip to main content
4 events
when toggle format what by license comment
Jul 28, 2015 at 10:44 comment added Erwin Smout Having the Id or not does not solve any problem of enforcement of uniqueness of the "business" columns in your table. Enforcement of uniqueness must be done by declaring the appropriate keys (which you do - the fact that you used the syntactic word "CONSTRAINT" instead of "KEY" does not mean it isn't a key).
Jul 28, 2015 at 6:22 comment added Erwin Smout It is NOT the "rows" that must be unique, it is what the business says are their identifiers that must be. If that is a combination of attributes FOO and BAR, then it is the combination of attributes FOO and BAR.
Jul 28, 2015 at 6:19 comment added Erwin Smout If the business rules say that the combination of values in attributes FOO and BAR must be unique, then adding an ID is not going to achieve that. Adding the ID just facilitates avoiding having to include FOO and BAR as such in referencing tables. Which in turn necessitates more joins because the FOO and BAR attributes (which carry BUSINESS identifiers) are not where they could have been (and where they are very likely EXPECTED to be, at least from a business point of view).
Jul 27, 2015 at 13:58 history answered Erwin Smout CC BY-SA 3.0