• state_electrician@discuss.tchncs.de
    link
    fedilink
    arrow-up
    0
    ·
    4 months ago

    I don’t think that holds true in all scenarios. You need to use a key that has some guarantees. In many systems you will use data you don’t control, like email addresses, IBANs, ISBNs, passport IDs and many more. You have zero control over those keys, but because each comes with certain guarantees, they might be suitable as a foreign key in your context.

    • Kissaki@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 months ago

      People regularly change email addresses. Listing that as an example is a particularly bad example in my opinion.

        • smaximov@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          3 months ago

          Well, I use the same self hosted Email address since the late 80‘s

          Personal anecdotes are rarely pose a valid argument (unless you are designing a database specifically for users who use the same email address since the late 80’s).

        • Kissaki@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          ·
          3 months ago

          Ignoring secondary email addresses, what was my primary [onlineaccount] E-Mail address has changed four times.