Spends is just an intermediate table between tx and input, it carries the sequence and pointers. Sequence is just the tx.sequence field. The index is not stored, it's just an array offset in the puts table, which associates tx->spends->inputs and tx->outputs. It's important to factor output/input script/witness from the other tables due to their size, as that dramatically reduces paging/reads. input.sequence and output.value are required at different validation phases, which is they aren't stored symmetrically.
(edited)