Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2006
    Posts
    20

    Lightbulb Unanswered: Surrogate keys necessary?

    Consider the foll. dependencies.
    ABC->D and BCE->F

    For the above dependencies, is it better to have a surrogate key (no practical use whatsoever), S and create the foll. tables:-
    SBC, ASD and SEF
    (Since ASBCD or ABCEF would have a dependency which prevents it from being in 2NF).
    Or will DB2 automatically take care, i mean, will it have no effect on the efficiency of the DB if the foll. tables:-
    ABCD and BCEF
    are used instead?

    The no. of tables created in case surrogate keys are used is also more. Besides that, how do we depict the surrogate key table in the ER diagram in case surrogate keys are used? If they are depicted in the normal way, they won't make any sense. So what do we do? Do we design the ER diagram in the non-optimized form (without surrogate keys)? I don't think that is acceptable.
    Last edited by trss; 10-06-06 at 13:03.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    The use of surrogate keys instead of natural keys is debatable and highly contentious. Personally, I like natural keys if they don't have a lot of columns, but there are always exceptions.

    Performance is “usually” not a big issue unless the surrogate keys get large.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Sep 2006
    Posts
    20

    I request more details

    Quote Originally Posted by Marcus_A
    The use of surrogate keys instead of natural keys is debatable and highly contentious.
    Do u mean use of surrogate keys instead of a combination of keys being used as a natural primary key as shown in the eg.?

    Quote Originally Posted by Marcus_A
    Performance is “usually” not a big issue unless the surrogate keys get large.
    Can u expand on that please. I mean, it is not specific. What exactly does large mean?

Posting Permissions

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