This is a lovely article on how you represent marital relationships in a database — and how you have to keep coming revising your database schema as the definition of marriage change: http://qntm.org/gay
The lesson to take from all this (if you can follow it along, and I tink it's pretty understandable for much of the way) is that how you structure your data constrains what you can do with it. This is something any programmer or database admin is painfully aware of.("Oh, you know that condition we said last week would never, ever happen? Well, one VP wants to allow it just for his office and on alternating Tuesdays. Can we have that updated by next Monday.") Poor planning and inflexible implementations can't stop the march of history for long, but it can sure make life difficult for those being dragged along in it.
This was written back in 2008. The author made an update at http://qntm.org/support after the SCOTUS decision on marriage equality in Obergefell v. Hodges. Also fun.
(h/t +George Wiman and several others)

