What Is Superkey?
If you've ever been to an RDBMS, you know there are more exciting places to be. They're usually grey and dull, with rows and columns and stuff. If you ask them what their favorite movie is, they'll probably give you a look of pity and tell you that they don't have time for film. One thing they like is uniqueness. They love it so much that some have gone so far as to create a particular term: superkey. A superkey is just what it sounds like a combination of columns that uniquely identifies any row within a table. A candidate key is a closely related concept where the superkey is reduced to the minimum number of columns required to identify each row uniquely. The most important thing to remember about superkeys is to ensure yours is unique! We're confident we've found the secret to happiness: a set of columns guaranteed to be unique to each customer! It's more than just an ID or some other boring thing. It will make your customers feel like they belong in your data. It makes them feel special, and you know what? They may be unique. So now you can give your customers something unique, and they'll feel part of something special just like you do! This is a classic "cart before the horse" problem. Every customer has a unique customer ID; however, it is not true that every customer has a unique SSN. If you were to store both on your table, you would risk keeping duplicate customer records. Your database must have a single key guaranteed not to repeat for your database to be truly unique. For a single key, there must be one piece of data that is always present and never repeated, and that piece of data must be the primary key.
Related Terms by Data Management
Join Our Newsletter
Get weekly news, engaging articles, and career tips-all free!
By subscribing to our newsletter, you're cool with our terms and conditions and agree to our Privacy Policy.