Koen Verbeeck (7/30/2013)
Grant Fritchey (7/30/2013)
A pretty common use of unique keys is when you have an artificial primary key for a table, the single most common example is the identity field, but you still need to define the logical key (and any other alternate keys) in order to prevent duplicate storage within the table.
True dat. A common scenario is in data warehousing, where you have a clustered index on the surrogate key of a dimension, and a unique index on the business key of the dimension.
+1 excellent example.
Pablo (Paul) Berzukov
Author of Understanding Database Administration
available at Amazon and other bookstores.Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.