Statistics-first PK pick from streamed evidence. A column is a candidate ONLY if it is, over a
statistically meaningful number of rows, non-null on every row AND all-distinct (and its
uniqueness was provable — the distinct-cap wasn't hit). One candidate → that's the PK (p<0.05:
all-distinct over a large N is not chance). Several candidates → naming breaks the tie if it can;
otherwise it's flagged ambiguous for the LLM tiebreaker. Zero candidates → no PK (no fabrication).
Statistics-first PK pick from streamed evidence. A column is a candidate ONLY if it is, over a statistically meaningful number of rows, non-null on every row AND all-distinct (and its uniqueness was provable — the distinct-cap wasn't hit). One candidate → that's the PK (p<0.05: all-distinct over a large N is not chance). Several candidates → naming breaks the tie if it can; otherwise it's flagged ambiguous for the LLM tiebreaker. Zero candidates → no PK (no fabrication).