Download
100% FREE
Office Document APIs for .NET
Online: 632
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
Sql Server
>
Loading ...
What Primary key and Unique key?
Posted by
Poster
on 4/24/2008 | Category:
Sql Server Interview questions
| Views: 13922
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
Primary key are used with Foreign key to enforce referential integrity. Unique constraints allows nulls to be inserted into the field. But there can't be null in Primary key.
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
What is Prototyping?
Next > :
What is the difference between Truncate and Delete ...
Comments or Responses
Posted by:
Vishvvas
on: 9/3/2011 |
Points: 10
Lets walk through a little deeper. As many would be aware of ER (entity relationship) which form the foundation of designing the database. The set of attributes (one or more) whose values uniquely identify the entities are defined as super keys. Candidate keys are minimal Super keys with null values. Such candidate keys are called as Unique keys for general usage. Out of such many candidate keys, one of the keys with not null values is selected to be a primary key.
Entity set is generally gets translated into the tables in RDBMS.
Posted by:
Vivekjj
on: 10/5/2012 |
Points: 10
primary key and unique key does not allow repeated values but one difference is primary key not allow null values but unique key allows null values
Login to post response
More Interview Questions by Poster
What is the difference between Truncate and Delete?
What is a collection?
What is application domain?
Is overriding of a function possible in the same class?
Latest Interview Questions
Write code for a html table that will have one row and one column?
What is RSS?
What is UML?
What is Satellite Assembly?
What is Delegates?
What is EnableViewStateMAC?
Can Struct be inherited?
What is Virtual method?
More ...