Super Key is defined as a set of attributes within a table that can uniquely identify each record within a table.
Let's take a simple Student table, with fields student_id, name, phone and age. Let's try to understand about all the keys using a simple example. To avoid all this, Keys are defined to easily identify any row of data in a table. How many trials before you get the right data? Now to fetch any particular record from such dataset, you will have to apply some conditions, but what if there is duplicate data present and every time you try to fetch some data by applying certain condition, you get the wrong data. Tables generally extends to thousands of records stored in them, unsorted and unorganised. In real world applications, number of tables required for storing the data is huge, and the different tables are related to each other as well.Īlso, tables store a lot of data in them.
The video below covers all about the different keys in an RDBMS. They are used to establish and identify relationships between tables and also to uniquely identify any record or row of data inside a table.Ī Key can be a single attribute or a group of attributes, where the combination may act as a key. Keys are very important part of Relational database model.