You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Vikas Mayur <vi...@hotwaxmedia.com> on 2009/08/08 14:14:16 UTC

Primary key(s) in a table

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


Re: Primary key(s) in a table

Posted by Raj <ra...@gmail.com>.
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 <vi...@hotwaxmedia.com>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