%YAML 1.2
---
lang: en-US

type: structure

uri: https://gedcom.io/terms/v7/UID

standard tag: 'UID'

specification:
  - Unique Identifier
  - |
    A globally-unique identifier of the superstructure, to be preserved across
    edits. If a globally-unique identifier for the record already exists, it should
    be used without modification, not even whitespace or letter case normalization.
    New globally unique identifiers should be created and formatted as described in
    [RFC 4122].
    
    This is metadata about the structure itself, not data about its subject.
    Multiple structures describing different aspects of the same subject would have
    different `UID` values.
    
    Because the `UID` identifies a structure, it can facilitate inter-tool
    collaboration by distinguishing between a structure being edited and a new
    structure being created. If an application allows structures to be edited in a
    way that completely changes their meaning (e.g., changing all the contents of
    an `INDI` record to have it describe a completely different person) then any
    `UID`s should also be changed.
    
    <div class="note">
    
    Some systems used a 16-byte UUID with a custom 2-byte checksum for a total of
    18 bytes:
    
    - checksum byte 1 = (sum of (byte~*i*~) for *i* 1 through 16) mod 256
    - checksum byte 2 = (sum of ((16 − *i*) × (byte~*i*~)) for *i* 1 through 16)
      mod 256
    
    Use of checksums for UIDs is discouraged except in cases where error-prone
    input is expected and an appropriate action to take in case of an error is
    known.
    
    </div>

label: 'Unique Identifier'

payload: http://www.w3.org/2001/XMLSchema#string

substructures: {}

superstructures:
  "https://gedcom.io/terms/v7/ADOP": "{0:M}"
  "https://gedcom.io/terms/v7/ANUL": "{0:M}"
  "https://gedcom.io/terms/v7/BAPM": "{0:M}"
  "https://gedcom.io/terms/v7/BARM": "{0:M}"
  "https://gedcom.io/terms/v7/BASM": "{0:M}"
  "https://gedcom.io/terms/v7/BIRT": "{0:M}"
  "https://gedcom.io/terms/v7/BLES": "{0:M}"
  "https://gedcom.io/terms/v7/BURI": "{0:M}"
  "https://gedcom.io/terms/v7/CAST": "{0:M}"
  "https://gedcom.io/terms/v7/CHR": "{0:M}"
  "https://gedcom.io/terms/v7/CHRA": "{0:M}"
  "https://gedcom.io/terms/v7/CONF": "{0:M}"
  "https://gedcom.io/terms/v7/CREM": "{0:M}"
  "https://gedcom.io/terms/v7/DEAT": "{0:M}"
  "https://gedcom.io/terms/v7/DIV": "{0:M}"
  "https://gedcom.io/terms/v7/DIVF": "{0:M}"
  "https://gedcom.io/terms/v7/DSCR": "{0:M}"
  "https://gedcom.io/terms/v7/EDUC": "{0:M}"
  "https://gedcom.io/terms/v7/EMIG": "{0:M}"
  "https://gedcom.io/terms/v7/ENGA": "{0:M}"
  "https://gedcom.io/terms/v7/FAM-CENS": "{0:M}"
  "https://gedcom.io/terms/v7/FAM-EVEN": "{0:M}"
  "https://gedcom.io/terms/v7/FAM-FACT": "{0:M}"
  "https://gedcom.io/terms/v7/FAM-NCHI": "{0:M}"
  "https://gedcom.io/terms/v7/FAM-RESI": "{0:M}"
  "https://gedcom.io/terms/v7/FCOM": "{0:M}"
  "https://gedcom.io/terms/v7/GRAD": "{0:M}"
  "https://gedcom.io/terms/v7/IDNO": "{0:M}"
  "https://gedcom.io/terms/v7/IMMI": "{0:M}"
  "https://gedcom.io/terms/v7/INDI-CENS": "{0:M}"
  "https://gedcom.io/terms/v7/INDI-EVEN": "{0:M}"
  "https://gedcom.io/terms/v7/INDI-FACT": "{0:M}"
  "https://gedcom.io/terms/v7/INDI-NCHI": "{0:M}"
  "https://gedcom.io/terms/v7/INDI-RELI": "{0:M}"
  "https://gedcom.io/terms/v7/INDI-RESI": "{0:M}"
  "https://gedcom.io/terms/v7/INDI-TITL": "{0:M}"
  "https://gedcom.io/terms/v7/MARB": "{0:M}"
  "https://gedcom.io/terms/v7/MARC": "{0:M}"
  "https://gedcom.io/terms/v7/MARL": "{0:M}"
  "https://gedcom.io/terms/v7/MARR": "{0:M}"
  "https://gedcom.io/terms/v7/MARS": "{0:M}"
  "https://gedcom.io/terms/v7/NATI": "{0:M}"
  "https://gedcom.io/terms/v7/NATU": "{0:M}"
  "https://gedcom.io/terms/v7/NMR": "{0:M}"
  "https://gedcom.io/terms/v7/OCCU": "{0:M}"
  "https://gedcom.io/terms/v7/ORDN": "{0:M}"
  "https://gedcom.io/terms/v7/PROB": "{0:M}"
  "https://gedcom.io/terms/v7/PROP": "{0:M}"
  "https://gedcom.io/terms/v7/RETI": "{0:M}"
  "https://gedcom.io/terms/v7/SSN": "{0:M}"
  "https://gedcom.io/terms/v7/WILL": "{0:M}"
  "https://gedcom.io/terms/v7/record-FAM": "{0:M}"
  "https://gedcom.io/terms/v7/record-INDI": "{0:M}"
  "https://gedcom.io/terms/v7/record-OBJE": "{0:M}"
  "https://gedcom.io/terms/v7/record-REPO": "{0:M}"
  "https://gedcom.io/terms/v7/record-SNOTE": "{0:M}"
  "https://gedcom.io/terms/v7/record-SOUR": "{0:M}"
  "https://gedcom.io/terms/v7/record-SUBM": "{0:M}"

contact: "https://gedcom.io/community/"
...