A table named “Customer” has following columns : (2)
CustId, Name, City, MobileNo
Identify which column(s) cannot be specified as Primary key and why ?
Answers
Answered by
0
First of all we will know what is primary key.?
It is nothing but an attribute of a database that uniquely identifies each record. It is also known as unique key.
so according to definition, i think the attribute "city" can not be specified as a primary key. Because If you are trying to search a particular person's record through city attribute, there is strong possibility of getting many persons related to same city. But definition says that it must identify each record uniquely.
In the same way attribute "Name" has the possibility to be same but not a strong possibility so this attribute has the ability to become a primary key so this attribute is called secondary or candidate key.
It is nothing but an attribute of a database that uniquely identifies each record. It is also known as unique key.
so according to definition, i think the attribute "city" can not be specified as a primary key. Because If you are trying to search a particular person's record through city attribute, there is strong possibility of getting many persons related to same city. But definition says that it must identify each record uniquely.
In the same way attribute "Name" has the possibility to be same but not a strong possibility so this attribute has the ability to become a primary key so this attribute is called secondary or candidate key.
Answered by
1
Heya Mate ,
Add a button which links to a JavaScript Function. Inside the JavaScript Function, use the JavaScript default function to call the print dialog box. ...
Use DOM onload Event in body tag. Use window alert method for pop-up dialog-box and window. ...
Use <a> href attribute to hyperlink text.
Similar questions