I’m a tech interested guy. I’ve touched SQL once or twice, but wasn’t able to really make sense of it. That combined with not having a practical use leaves SQL as largely a black box in my mind (though I am somewhat familiar with technical concepts in databasing).

With that, I keep seeing [pic related] as proof that Elon Musk doesn’t understand SQL.

Can someone give me a technical explanation for how one would come to that conclusion? I’d love if you could pass technical documentation for that.

  • BombOmOm@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    3
    ·
    edit-2
    6 days ago

    Why would one person, one SSN ever have two different birth dates? That sounds like an issue all onto itself.

    • geoff@lemm.ee
      link
      fedilink
      arrow-up
      15
      ·
      6 days ago

      I think what he means is that the unique identifier for a database record is a composite of two fields: SSN + birth date. That doesn’t mean that SSN to birth date is a one-to-many relation.

      • DahGangalang@infosec.pubOP
        link
        fedilink
        arrow-up
        4
        arrow-down
        2
        ·
        6 days ago

        But they are implying SSN to SSN+Birthdate is a one-to-many relationship. Since SSN to SSN should be one-to-one, you can conclude the SSN to Birthdate is one-to-many, right?

        • Nate Cox@programming.dev
          link
          fedilink
          English
          arrow-up
          11
          ·
          6 days ago

          No, who said there was a relationship?

          A compound key is a composite key where one or both sides can be foreign keys to other tables themselves; it’s a safe assumption this is probably true in a large data set like social security. A composite key is a candidate key (a uniquely identified key) made up of more than one column.

          This basically means that there is a finite number of available SSNs because they’re only 10 digits long and someone intends to recycle SSNs after the current user of one dies. Linking it to birthday is “unique enough” as to never recur.

          • DahGangalang@infosec.pubOP
            link
            fedilink
            arrow-up
            1
            ·
            6 days ago

            I think I was getting some wires crossed and/or misunderstood what geoff (parent commentor to my last comment) was saying, so my comment may be misdirected some.

            But according to The Social Security FAQ page, SSNs are not recycled, so that data (especially when compounded and hashed with other data) should be able to establish a one-to-one relationship between each primary key and an SSN, thusly having SSNs appear associated with multiple primary keys is a concern.

            Other comments have pointed to other explanations for why SSNs could appear to occur multiple times, but those amount to “it appeared in a different field associated with the same primary key”. I think thats the most likely explanation of things.

            • jj4211@lemmy.world
              link
              fedilink
              arrow-up
              7
              ·
              edit-2
              6 days ago

              Note that it being only part of a key is a technology choice that does not require the reality map to it. It may seem like overkill, but someone may not trust the political process to preserve that promise and so they add the birthdate, just in case something goes sideway in the future. Lots of technical choices are made anticipating likely changes and problems and designing things to be extra robust in the face of those

    • DahGangalang@infosec.pubOP
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      edit-2
      6 days ago

      A weak example would be my grandma. She was born before social security and was told as a kid she was born in 1938. Because I guess in the olden days, you just didn’t need to pass your birth certificate around for anything, it wasn’t until she went to get married at ~age 25 that she needed her birth certificate and when she got it, it actually said she was born in 1940 (I forget the actual years, but I remember it was a two year and two day gap between dates).

      Its a weak example that should apply to only a microscopic portion of the population, but I could see her having some weird records in the databases as a result.

      Edit: brain dropped out and I forgot part of a sentence.