Important Computer Awareness for IBPS Exams 2017 (Day-5) – DBMS Part-5:
Dear Readers, IBPS Exams are approaching shortly, we all knew that Computer Awareness is one of the important section, which will help you to increase your score easily.
Many of our followers were asking us to provide Important Computer Awareness Notes along with the model questions, here we have planned to provide the Topic wise Important Computer Awareness Materials on Daily basis, and also we will provide MCQs based on these topics daily. Kindly follow us regularly and make use of it.
Many of our followers were asking us to provide Important Computer Awareness Notes along with the model questions, here we have planned to provide the Topic wise Important Computer Awareness Materials on Daily basis, and also we will provide MCQs based on these topics daily. Kindly follow us regularly and make use of it.
Database Management Systems (DBMS) – PART 5
TYPES OF KEYS:
1. Candidate key:
A candidate key is a column, or set of columns, in a table that can uniquely identify any database record without referring to any other data.Â
Minimum set of attributes used to uniquely different records of the table is candidate key.
For example: The best way to define candidate keys is with an example. For example, a bank’s database is being designed. To uniquely define each customer’s account, a combination of the customer’s birth date and a sequential number for each of his or her accounts can be used. So, Mr. Andrew Smith’s checking account can be numbered 120344-1, and his savings account 120344-2. A candidate key has just been created.
2. Primary key:
Each table may have one or more candidate keys, but one candidate key is unique, and it is called the primary key. This is usually the best among the candidate keys to use for identification.
3. Composite key:
When a key is composed of more than one column, it is known as a composite key. Composite key consists two or more attributes that uniquely identify entity occurrence.
4. Foreign key:
 A foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table or the same table.
In simpler words, the foreign key is defined in a second table, but it refers to the primary key or a unique key in the first table. For example, a table called Employee has a primary key called employee_id. Another table called Employee Details has a foreign key which references employee_id in order to uniquely identify the relationship between both tables.
5. Super key:
A super key is a combination of columns that uniquely identifies any row within a relational database management system (RDBMS) table. A candidate key is a closely related concept where the super key is reduced to the minimum number of columns required to uniquely identify each row.
6. Alternate key:
If any table have more than one candidate key, then after choosing primary key from those candidate key, rest of candidate keys are known as an alternate key of that table. Like here we can take a very simple example to understand the concept of alternate key.
Suppose we have a table named Employee which has two columns EmpID and EmpMail, both have not null attributes and unique value. So both columns are treated as candidate key. Now we make EmpID as a primary key to that table then EmpMail is known as alternate key.
7. Natural key:
A natural key (also known as business key) is type of unique key, found in relational model database design that is formed of attributes that already exist in real world.It is used in business-related columns.Â
In other words, a natural key is a candidate key that has a logical relationship to the attributes within that row. A natural key is sometimes called domain key.
Natural key is a unique key that cannot be repeated in any of the dataset.
Example: Finger prints, DNA, mobile number, these can’t be ever be in any other data set.
8. Prime attributes:
The attributes which are part of candidate key are known as Prime attributes.
Â
ONE LINER:
1. Minimum set of attributes used to uniquely different records of the table is –candidate key.
2. The key which is unique but not null –Primary key.
3. The unique id which is used to refer the other table –foreign key.
4. Candidate key + Zero/more attributes –super key.
5. Minimal super key is a –candidate key.
6. The key which is unique and can be represented in other data set –Standard primary key.
7. A unique key that cannot be repeated in any of the data set –Natural key
8. A key is composed of more than one column –Composite key
9. The attributes which are part of candidate key are known as –Prime attributes
Subscribe
1 Comment