• by nivertech on 8/20/2024, 12:03:07 PM

    Blog post:

    UPID is as UPID does

    https://rdrn.me/upid/

    ---

    BTW: Hi/Lo scheme for Primary Keys / IDs was invented long before Stripe existed. Partcularly, I used short up to 3 letters prefixes to make IDs Human-readable (and writable!) more than 20 years ago. 5 years later Amazon started using similar scheme in their AWS product, i.e i-NNNNN for instances, etc.[1].

    In theory there are 2 kinds of ID schemes: technical/surrogate and natural/business/semantic (i.e. those derived from the natural properties of the object the ID refers to).

    Adding a prefix with the type, makes ID scheme hybrid. "Hi" part (prefix) is natural, and "Lo" part is technical. In case of UPID/ULID/UUIDv7 even the "Lo" part is hybrid, since it includes an information when the entity was created (or at least inserted into the database/system).

    ---

    [1] List of some AWS ID prefixes:

      i-  
      vol-  
      snap-  
      ami-  
      eni-  
      sg-  
      vpc-  
      subnet-  
      acl-  
      rtb-  
      igw-  
      dopt-  
      vpn-  
      vgw-  
      cgw-  
      nat-  
      rds-  
      lb-