Results 1 to 5 of 5

Thread: Table Design

  1. #1
    Join Date
    Jun 2009
    Posts
    5

    Angry Unanswered: Table Design

    HI
    I m doing a proj on birth-death automation.wat shall i hav as primary key whether any id or name....

  2. #2
    Join Date
    Jun 2009
    Posts
    7
    Generate a id for each person and keep it as a primary key or keep a composite key such as date and name.

  3. #3
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    As every person has certain identification number (depending on country you live in, its name may vary; one of the most "popular" is the US Social Security Number (SSN)), it might be a good choice as everyone has it and it is unique.

    "Date + name" combination doesn't have to be unique so - I'd rather not choose it to be used as a primary key.

  4. #4
    Join Date
    Jun 2009
    Posts
    5
    tats fine, but v hav to allot no(SSN) to every1...
    but our superior is asking as to keep a register no which wil reset for every year..
    so can v keep year(date) and register no as prim key..

  5. #5
    Join Date
    Dec 2007
    Posts
    253
    Please write in English. Many people here do not have English as their first language so posting in IM speak or phonetics makes it very difficult to understand.
    so can v keep year(date) and register no as prim key..
    No idea. We don't know your data, you do. Why not look up the properties of what a Primary Key is meant to be. Then find the appropriate column/column combination that fits the model. If there is no appropriate combination, then simply create a surrogate PK for the table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •