Briefly explain what is a primary key and give example-01061
This subjective question is related to the book/course vu cs615 Software Project Management. It can also be found in vu cs615 Mid Term Solved Past Paper No. 1.
Primary Key
The candidate key that is selected to identify tuples uniquely within the relation. A candidate key chosen by the database designer to act as key is the primary key. An entity type may have more than one candidate keys, in that case the database designer has to designate one of them as primary key, since there is always only a single primary key in an entity type. If there is just one candidate key then obviously the same will be declared as primary key. The primary key can also be defined as the successful candidate key. Figure 2 below contains the entity type STUDENT of figure 1 but with an additional attribute nIdNumber (national ID card Number).
Any of the candidate keys can be selected as primary key, it mainly depends on the database designer which choice he/she makes.