Results 1 to 3 of 3

Thread: DateTime as Primary Key?

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    7

    DateTime as Primary Key?

    Good Morning Everyone,
    We are designing a set of tables for metadata and are wondering about the pros and cons for using the datetime stamp for the primary key of our tables. The reason it comes up that everyone wants to know when the data was received and so since the primary key would get migrated to the child/detail tables, it seems like an easy way to let everyone know when the records are recieved, since all they'd have to do is select the primary key.
    However me and some others believe the primary key should either be the unique business representation of the entity and records, or should be a sequence number generated as a surrogate for the business key (which could be a compound key of multiple columns).
    Your thoughts and discussion are welcome as are pointers to other references where this topic is covered.
    Thanks in advance for your time and attention.


  2. #2
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: DateTime as Primary Key?

    As you mentioned a compound is a better option in my openion.


  3. #3
    RPSHOD
    Guest

    Re: DateTime as Primary Key?

    DATE AND TIME CAN BE PRIMARY KEY UNTIL IT GENERATES SEQUNETIALLY, WITHOUT DUPLICATION

    RPS
    MADURAI

    Last edited by RPSHOD; 01-13-2011 at 10:49 AM. Reason: NAME

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact