A SQL table is a bag, so duplicate rows are allowed.

highlighted = computed this step

A SQL table is a bag

A SQL table can keep duplicate rows instead of rejecting them. That is the first sharp edge after Book One set algebra. Note: the rendered table is the source of row details.

bag table\text{bag table}

Duplicate rows are kept

The recomputed row count is 5 and the recomputed arity is 3. Note: the duplicate appears because bag semantics preserve multiplicity.

rows=5,arity=3\text{rows}=5,\quad \text{arity}=3

SQL bag/multiset + three-valued NULL logic, deterministic but surprising; tiny finite tables; no engine/perf claims. Set algebra is Book 1.

Grades bag Grades arity 3 rows 5
Grades sid course grade s1 DB 90 s1 DB 90 s2 DB NULL s2 OS 80 s3 OS 70

Summary

SQL tables are bags unless an operation says otherwise. Note: this book owns bag and NULL behavior; set algebra was Book One.

bag boundary\text{bag boundary}