Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. choosing primary key

choosing primary key

Scheduled Pinned Locked Moved The Lounge
securityquestionlounge
28 Posts 16 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jith iii
    wrote on last edited by
    #1

    Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died now,after say 50 years there is a possibility for the SSN being reassigned. Is it right?

    S N S M M 7 Replies Last reply
    0
    • J jith iii

      Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died now,after say 50 years there is a possibility for the SSN being reassigned. Is it right?

      S Offline
      S Offline
      Sathesh Sakthivel
      wrote on last edited by
      #2

      Democratic and Republican politicians on Thursday both promised to enact new federal laws by the end of the year that would restrict some commercial uses of Social Security numbers, which are often implicated in identity fraud cases.

      R T 2 Replies Last reply
      0
      • J jith iii

        Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died now,after say 50 years there is a possibility for the SSN being reassigned. Is it right?

        N Offline
        N Offline
        Nish Nishant
        wrote on last edited by
        #3

        jith - iii wrote:

        Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died after 50 years there is a possibility for the SSN being reassigned. Is it right?

        SSNs are not reused. See http://www.ssa.gov/history/hfaq.html Q20: Are Social Security numbers reused after a person dies? A: No. We do not reassign a Social Security number (SSN) after the number holder's death. Even though we have issued over 415 million SSNs so far, and we assign about 5 and one-half million new numbers a year, the current numbering system will provide us with enough new numbers for several generations into the future with no changes in the numbering system. There have been instances of accidental duplication though, and some instances of numbers getting invalidated due to their use in advertising.

        Regards, Nish


        Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
        My latest book : C++/CLI in Action / Amazon.com link

        D J 2 Replies Last reply
        0
        • J jith iii

          Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died now,after say 50 years there is a possibility for the SSN being reassigned. Is it right?

          S Offline
          S Offline
          Shog9 0
          wrote on last edited by
          #4

          It used to be that SSNs were not to be used as identifiers... but by now, they've been abused so much that it's pretty much accepted. Of course, that creates an even better reason to not use them as primary keys - they can change. Since they're used as identifiers in so may places, they've become an important bit of information for identity thieves... and the last thing you want to be telling a stressed-out victim calling in to change her # in your system is that you can't change it because of a bad DB design, but we can create a new account - it'll take only a half hour...

          ----

          i hope you are feeling sleepy for people not calling you by the same.

          --BarnaKol on abusive words

          1 Reply Last reply
          0
          • N Nish Nishant

            jith - iii wrote:

            Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died after 50 years there is a possibility for the SSN being reassigned. Is it right?

            SSNs are not reused. See http://www.ssa.gov/history/hfaq.html Q20: Are Social Security numbers reused after a person dies? A: No. We do not reassign a Social Security number (SSN) after the number holder's death. Even though we have issued over 415 million SSNs so far, and we assign about 5 and one-half million new numbers a year, the current numbering system will provide us with enough new numbers for several generations into the future with no changes in the numbering system. There have been instances of accidental duplication though, and some instances of numbers getting invalidated due to their use in advertising.

            Regards, Nish


            Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
            My latest book : C++/CLI in Action / Amazon.com link

            D Offline
            D Offline
            Dan Neely
            wrote on last edited by
            #5

            Nishant Sivakumar wrote:

            the current numbering system will provide us with enough new numbers for several generations into the future with no changes in the numbering system.

            About 2 generations or so. The last I heard they were expected to run out about the same time as the Y2039bug hits give or take demographic projection errors.

            -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

            X 1 Reply Last reply
            0
            • S Sathesh Sakthivel

              Democratic and Republican politicians on Thursday both promised to enact new federal laws by the end of the year that would restrict some commercial uses of Social Security numbers, which are often implicated in identity fraud cases.

              R Offline
              R Offline
              Roger Wright
              wrote on last edited by
              #6

              It's actually illegal to use the SSN for any purpose other than Social Security, according to the legislation that created it, and that was one of the things that made it possible to get the law passed. Americans have long opposed any universal numbering system, even more so in the past than now. The fact that the IRS, most other government agencies, banks, and almost all employers have flagrantly violated this federal law for decades seems to have escaped the notice of the Supreme Court.

              "A Journey of a Thousand Rest Stops Begins with a Single Movement"

              J 1 Reply Last reply
              0
              • S Sathesh Sakthivel

                Democratic and Republican politicians on Thursday both promised to enact new federal laws by the end of the year that would restrict some commercial uses of Social Security numbers, which are often implicated in identity fraud cases.

                T Offline
                T Offline
                Tarakeshwar Reddy
                wrote on last edited by
                #7

                :confused: What has this got to do with what Jith posted? You seem to prove that you are nothing more than a bot.

                V 1 Reply Last reply
                0
                • R Roger Wright

                  It's actually illegal to use the SSN for any purpose other than Social Security, according to the legislation that created it, and that was one of the things that made it possible to get the law passed. Americans have long opposed any universal numbering system, even more so in the past than now. The fact that the IRS, most other government agencies, banks, and almost all employers have flagrantly violated this federal law for decades seems to have escaped the notice of the Supreme Court.

                  "A Journey of a Thousand Rest Stops Begins with a Single Movement"

                  J Offline
                  J Offline
                  Jim Crafton
                  wrote on last edited by
                  #8

                  As well as most of the public, who hand it over like nothing (myself included, though I think I'd be a little more reluctant now). I hear stuff like this all the time, yet I don't know anyone who actually challenges that. Too bad :(

                  ¡El diablo está en mis pantalones! ¡Mire, mire! Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! VCF Blog

                  1 Reply Last reply
                  0
                  • D Dan Neely

                    Nishant Sivakumar wrote:

                    the current numbering system will provide us with enough new numbers for several generations into the future with no changes in the numbering system.

                    About 2 generations or so. The last I heard they were expected to run out about the same time as the Y2039bug hits give or take demographic projection errors.

                    -- You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer

                    X Offline
                    X Offline
                    Xiangyang Liu
                    wrote on last edited by
                    #9

                    dan neely wrote:

                    About 2 generations or so.

                    By that time, the government will probably have switched to GUID, and it will be tattooed in 10 different places on everyone's body. :)

                    My .NET Business Application Framework My Home Page

                    1 Reply Last reply
                    0
                    • J jith iii

                      Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died now,after say 50 years there is a possibility for the SSN being reassigned. Is it right?

                      M Offline
                      M Offline
                      Marc Clifton
                      wrote on last edited by
                      #10

                      A primary key should never represent any real value like a SSN. Marc

                      Thyme In The Country
                      Interacx

                      People are just notoriously impossible. --DavidCrow
                      There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                      People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                      V J R 3 Replies Last reply
                      0
                      • T Tarakeshwar Reddy

                        :confused: What has this got to do with what Jith posted? You seem to prove that you are nothing more than a bot.

                        V Offline
                        V Offline
                        Vikram A Punathambekar
                        wrote on last edited by
                        #11

                        Don't you notice the change in language? He (It? :~)copy-pasted it from somewhere.

                        Cheers, Vıkram.


                        Déjà moo - The feeling that you've seen this bull before. Join the CP group at NationStates. Password: byalmightybob

                        T 1 Reply Last reply
                        0
                        • M Marc Clifton

                          A primary key should never represent any real value like a SSN. Marc

                          Thyme In The Country
                          Interacx

                          People are just notoriously impossible. --DavidCrow
                          There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                          People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                          V Offline
                          V Offline
                          Vikram A Punathambekar
                          wrote on last edited by
                          #12

                          So you fall into the "PKs should only be GUIDs" camp?

                          Cheers, Vıkram.


                          Déjà moo - The feeling that you've seen this bull before. Join the CP group at NationStates. Password: byalmightybob

                          M M S 3 Replies Last reply
                          0
                          • V Vikram A Punathambekar

                            Don't you notice the change in language? He (It? :~)copy-pasted it from somewhere.

                            Cheers, Vıkram.


                            Déjà moo - The feeling that you've seen this bull before. Join the CP group at NationStates. Password: byalmightybob

                            T Offline
                            T Offline
                            Tarakeshwar Reddy
                            wrote on last edited by
                            #13

                            Yeah thats what I am trying to tell, why does he need to copy paste the information about social security number. It is the bots which do stuff like this and give irrelevant information. BTW he seems to have already changed his post:doh:, he has a different text now.

                            1 Reply Last reply
                            0
                            • N Nish Nishant

                              jith - iii wrote:

                              Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died after 50 years there is a possibility for the SSN being reassigned. Is it right?

                              SSNs are not reused. See http://www.ssa.gov/history/hfaq.html Q20: Are Social Security numbers reused after a person dies? A: No. We do not reassign a Social Security number (SSN) after the number holder's death. Even though we have issued over 415 million SSNs so far, and we assign about 5 and one-half million new numbers a year, the current numbering system will provide us with enough new numbers for several generations into the future with no changes in the numbering system. There have been instances of accidental duplication though, and some instances of numbers getting invalidated due to their use in advertising.

                              Regards, Nish


                              Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                              My latest book : C++/CLI in Action / Amazon.com link

                              J Offline
                              J Offline
                              jith iii
                              wrote on last edited by
                              #14

                              Ok.But I have read somewhere(could not get that article though I'm searching it for an hour) that in some cases like a missing identity or something like that the SSN may be reused. Like we may see more than one person with the same SSN in a 100 year period,if other guy had expired or missing long before.

                              N 1 Reply Last reply
                              0
                              • J jith iii

                                Some where I read that SSN(social security number) can not be considered as primary key in complex applications. I also heard that if a person died now,after say 50 years there is a possibility for the SSN being reassigned. Is it right?

                                M Offline
                                M Offline
                                Member 96
                                wrote on last edited by
                                #15

                                Bad idea to use it. Here in Canada there are very strict laws against that kind of thing and probably in other jurisdictions as well. A good old GUID will never set you wrong.


                                "110%" - it's the new 70%

                                1 Reply Last reply
                                0
                                • M Marc Clifton

                                  A primary key should never represent any real value like a SSN. Marc

                                  Thyme In The Country
                                  Interacx

                                  People are just notoriously impossible. --DavidCrow
                                  There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                                  People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                                  J Offline
                                  J Offline
                                  jith iii
                                  wrote on last edited by
                                  #16

                                  Ok..then what is your opinion, can it be used as a unique key.

                                  M 1 Reply Last reply
                                  0
                                  • V Vikram A Punathambekar

                                    So you fall into the "PKs should only be GUIDs" camp?

                                    Cheers, Vıkram.


                                    Déjà moo - The feeling that you've seen this bull before. Join the CP group at NationStates. Password: byalmightybob

                                    M Offline
                                    M Offline
                                    Marc Clifton
                                    wrote on last edited by
                                    #17

                                    Vikram A Punathambekar wrote:

                                    So you fall into the "PKs should only be GUIDs" camp?

                                    Absolutely. :) Marc

                                    Thyme In The Country
                                    Interacx

                                    People are just notoriously impossible. --DavidCrow
                                    There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                                    People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                                    1 Reply Last reply
                                    0
                                    • J jith iii

                                      Ok..then what is your opinion, can it be used as a unique key.

                                      M Offline
                                      M Offline
                                      Marc Clifton
                                      wrote on last edited by
                                      #18

                                      jith - iii wrote:

                                      Ok..but can it be used as a unique key.

                                      Ah, for indexing? That I don't know. Marc

                                      Thyme In The Country
                                      Interacx

                                      People are just notoriously impossible. --DavidCrow
                                      There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
                                      People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith

                                      J 1 Reply Last reply
                                      0
                                      • V Vikram A Punathambekar

                                        So you fall into the "PKs should only be GUIDs" camp?

                                        Cheers, Vıkram.


                                        Déjà moo - The feeling that you've seen this bull before. Join the CP group at NationStates. Password: byalmightybob

                                        M Offline
                                        M Offline
                                        Member 96
                                        wrote on last edited by
                                        #19

                                        I've been doing db related business apps for...well forever and I've come to learn that it's a wise person who uses Guid's as primary keys. Besides all the uniqueness reasons and ease of combining databases etc it's a huge performance benefit because you can generate them at the client and do single trips to the db server for just about any operation.


                                        "110%" - it's the new 70%

                                        B 1 Reply Last reply
                                        0
                                        • J jith iii

                                          Ok.But I have read somewhere(could not get that article though I'm searching it for an hour) that in some cases like a missing identity or something like that the SSN may be reused. Like we may see more than one person with the same SSN in a 100 year period,if other guy had expired or missing long before.

                                          N Offline
                                          N Offline
                                          Nish Nishant
                                          wrote on last edited by
                                          #20

                                          jith - iii wrote:

                                          Ok.But I have read somewhere(could not get that article though I'm searching it for an hour) that in some cases like a missing identity or something like that the SSN may be reused. Like we may see more than one person with the same SSN in a 100 year period,if other guy had expired or missing long before.

                                          That article was incorrect then. The site I linked to is the official govt website.

                                          Regards, Nish


                                          Nish’s thoughts on MFC, C++/CLI and .NET (my blog)
                                          My latest book : C++/CLI in Action / Amazon.com link

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups