Primary key(s) in a table

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Primary key(s) in a table

Vikas Mayur-3
Hi,

What is the best approach and pattern followed while creating primary  
key for a table that have a fromDate field. For example in  
ProductStoreSurveyAppl table fromDate is not part of primary key but  
there are many examples where fromDate is part of primary key in tables.

Thanks,
Vikas


smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Primary key(s) in a table

Raj-57
HI Vikas
The defaination of primary key's says :

The primary key of a relational table uniquely identifies each record in the
table. It can either be a normal attribute that is guaranteed to be unique .

Is your fromDate uniquely identifies each record in the table? For
ProductStoreSurveyAppl table fromDate is not part of primary key because
this is not uniquely identifies each record in the table.




On Sat, Aug 8, 2009 at 5:44 PM, Vikas Mayur <[hidden email]>wrote:

> Hi,
>
> What is the best approach and pattern followed while creating primary key
> for a table that have a fromDate field. For example in
> ProductStoreSurveyAppl table fromDate is not part of primary key but there
> are many examples where fromDate is part of primary key in tables.
>
> Thanks,
> Vikas
>
>


--
Regards
Raj Kumar Sav

http://www.capgemini.com

Office : 91.20.276.01000 - 14170