

Gay marriage: the database engineering perspective - Sujan
http://qntm.org/?gay

======
yters
What a speciest. Or rather, what a sentiencetist. Sure, marrying myself is a
tax scam, but marrying my rock isn't. My rock needs regular polishing, and why
should sentient beings get all the rights? They just happen to have a more
complex AI algorithm than my rock does, and that's not its fault.

He should get rid of the 'human' heading altogether and just have 'thing.'
Plus, things aren't static, they are composed of matter, and the matter is
always changing form and mixing and matching with other matter. Not sure how
this should be represented, though. Maybe each particle should have its own
entry, though those aren't static either.

Database design is tough.

~~~
Sujan
> Maybe each particle should have its own entry

Premature Databaseation...

~~~
yters
How would you construct the DB?

------
tdoggette
I love Sam "sam512" Hughes, the owner of qntm.org. I first ran into his
writing on Everything2, the old-but-not-dead collaborative writing site.

His science fiction is absolutely exemplary, especially the "Ed Stories" and
the "Fine Structure" series. I would suggest that you all check it out, along
with some of the other essays on qntm.org.

~~~
mnemonicsloth
His "How to Destroy The Earth" is a perfect example of a form we could use a
lot more of these days -- comic science.

------
sridharvembu
Here is fully normalized relational model. I will adopt a simple notation

 _Table: <PrimaryKeyID>, Column1, Column2_

where the <> denotes the column to be primary key and Column1, Column2 etc.
denote regular non-key attributes. The notation ForeignKeyID from SomeTable
denotes a foreign key referring to a row in SomeTable.

 _Persons: <PersonID>, Name, DateOfBirth_

Men and Women are defined in separate tables, to enforce integrity constraints
later, which is why it is not modeled as a Gender attribute in Persons table.
These tables have no attributes, simply a listing of men and women. It is a
perfectly valid relation that has only one column, by the way. Note that the
foreign key here is also the primary key of the table.

 _Men: <PersonID from Persons>_

 _Women: <PersonID from Persons>_

This represents a basic marriage, the only attribute of which is the date.
Many specific forms of marriage are captured below.

 _Marraiges: <MarriageID>, DateOfMarriage_

MarriageID is the primary key for the tables below. The design below permits
polygamy, so further integrity constraints would be needed to restrict it. If
a marriage is not permitted to be dissolved and no polygamy is permitted, we
can place a uniqueness constraint on both Men and Women attributes below. If
all types of marriages are permitted in all jurisdictions, these 3 tables
below could be unified.

 _ConventionalMarriages: <MarriageID from Marriages>, PersonID from Men,
PersonID from Women_

 _GayMarriages: <MarriageID from Marriages>, PersonID from Men, PersonID from
Men_

 _LesbianMarriages: similar to above_

Notice how a marriage has to exist for a divorce to exist

 _Divorces: <MarriageID from Marriages>, DivorceDate_

Some features of the model: if a person A & B marry and then they terminate a
marriage, and remarry again, it gets a new marriageID.

Some integrity constraints:

a) Zero or One marriage at a time rule:

If a PersonID occurs more than once in the Marriages table, then order the
marriages by marriage date, order Divorces by DivorceDate, and enforce the
rule:

    
    
      for all except last MarriageID in Ordered(Marriages), ensure Divorces(MarriageID) exists, and DivorceDate(MarriageID) < MarriageDate(next(MarriageID))
     

b) Polygamy would require more complex integrity constraints.

The nice thing about thinking about the problem relationally is that you focus
on the data and its interrelationships, and avoid language considerations.
Notice how a fully normalized relational model captures a lot of the
constraints automatically, and only the most complex of constraints need to be
separately stated.

Finally, note that this is an _abstract model_ and should be separated from
details of storage.

------
kiplinger
I find this article kind of silly as it pertains to Gay Marriage as a
political issue. The politicians who are voting (or in most cases, not voting)
on this issue care little and understand less about the data management side
of things, and furthermore when has government EVER been efficient?

Interesting from a database POV, though.

------
jrockway
This article convinced me to write a blurb about why I like object databases:

<http://news.ycombinator.com/item?id=372935>

Much cleaner than any of the models from the article, IMHO.

------
lst
This kind of problems arise when people decide to change what Nature decided
to be a Constant...

~~~
kiplinger
at some odd level, your post intrigues me, are you saying that gay
relationships being "unnatural" is why design data around it is so tough?

~~~
mnemonicsloth
Does this kind of inquisitorial behavior really achieve anything?

------
kirse
Is this how were going to sneak useless articles onto the front page now?

Take completely-unrelated-to-Hacking topic X and apply secondary
"Engineering/Hacker opinion" Y to it?

"Well, condition Y now makes this Hacker-related, let's submit it!"

~~~
Sujan
Have you read it?

It is more about the connection of database engineering and "the real world"
than about gay marriage.

~~~
kirse
I did, in fact, read the article before posting this, and would have been
entirely fine with the article if it just objectively looked at the database
issues without injecting...

\-- This:

 _It's asinine to do it this way. However, there is a good reason why I
haven't just skipped schemas (schemae?) One to Six. There are a lot of people
in the world who actually think like this. This is their for-real, no-joking
conception of "marriage". They do not grasp that men and women are
interchangeable, as a result of which homosexual marriages create repulsive
integrity problems in their heads. "But if they're both guys, which one is the
wife?" How sad._

\-- And this:

 _Finally we are reaching something which is non-stupid and non-sexist enough
that it might actually exist somewhere in reality. This schema is reasonably
sensible assuming you live in a fairly God-fearing administrative district._

\-- And this...

 _As an aside, I have actually considered that laws against (or implicitly
disallowing) gay marriage are, actually, sexist. For example, suppose I lived
somewhere with antihomonuptial legislation. As I am a man, any woman in that
district has the right to marry me. (As well they should.) But any man in that
district who wanted to marry me does not have that right. The women have a
right which the men do not have. Likewise, if there was a nubile woman nearby,
I (and any other man) would have the right to marry that woman. But any nearby
woman would not have that right. The men have a right which women do not have.
Sexist!

Anti-gay-marriage laws throw a very real legislative dividing line between two
sets of people on the world, and say, "all marriages must cross this line".
But any law which divides men from women is clearly sexist, and, as I've
stated above, closed-minded towards unconventional gender assignments who
don't clearly fall on either side._

And there's plenty more I won't quote for the sake of brevity. The article has
a full freaking ASIDE with personal opinion weighing into the issue of gay
marriage, it's pretty damn obvious this is just political opinion. Political
opinion with an Engineering slant, NOT something Hacker News worthy.

~~~
axod
I agree. It's just a political rant disguised as a database article.

"They do not grasp that men and women are interchangeable" - sure, because men
can give birth too. Right?

~~~
Sujan
marriage isn't about giving birth.

~~~
cousin_it
Whoa there. Marriage is not so much a right as a societal mechanism with many
purposes.

For the female: make sure the provider doesn't run away.

For the male: monogamy gives non-alpha males a chance of having offspring.

For the child: life support.

For government: bind people into clumsy units that you can tax, threaten etc.
at will.

For ethnic and religious groups: arranged marriage is a way around natural
selection, letting you enforce "proper" genetics and upbringing of the next
generation.

When people start talking about gay marriage, all of this gets instantly
forgotten.

~~~
IsaacSchlueter
_When people start talking about gay marriage, all of this gets instantly
forgotten._

What a strange sentiment.

You know, I and my wife aren't together romantically, don't live together,
don't share money, and don't have any offspring. Since we're amicably
separated, and that amicability is protected by a post-nuptial agreement, and
we have no intention of marrying anyone else, we haven't seen the point of
going through a divorce.

A friend of mine has lived with his partner for 15 years. They're happy, share
money, live together, and love each other in a very romantic way. I wouldn't
be surprised if they adopted a kid.

So, who's REALLY destroying the so-called "institution of marriage"?

~~~
cousin_it
I'm not against gay marriage, but after pattern-matching the particular story
of your friend I don't see why he needs to marry. It's like getting a
government-sponsored car that you don't want to drive.

Is it for the tax breaks? Think of it like this: they're a way to lure the
provider into marriage. If you don't buy the traditional view of marriage,
you'll have a hard time justifying tax breaks. I don't believe you can build a
logical line of argument from romantic love to tax breaks :-)

~~~
IsaacSchlueter
Marriage is a convenient shorthand for a sort of contract that is useful and
common. Like LLC or NDA, it's one of those things that might have little
differences from case to case, but in general, it's handy to talk about as one
sort of thing.

A marriage is actually two contracts. It is a contract between the spouses,
where they agree to grant one another certain rights (inheritance, medical
decision power, financial support, etc.) It is also a contract with the two
spouses on one side, and the society at large on the other, whereby society
agrees to recognize the contract between the couple and treat them as one
"unit" for purposes of taxes and such, and the couple agrees to be clear and
explicit if they ever terminate the marriage.

The tax breaks are absolutely NOT "just a way to lure the provider into
marriage." Generally, the thing that lures the provider is the comfort and
security of long-term romantic companionship, and the desire to provide for
someone they love.

There is nothing stopping a gay couple from formulating a contract between the
two of them, signing it, getting it notarized, and even changing their names.
But the other part of that contract, between society and the couple, that is
allowed only for hetero couples in most states, and not for gay couples.

This is gender-based discrimination. There's just no other way to look at it.
You can make the case that the discrimination is sensible, as some sorts of
discrimination indeed are. (I.e., the ageism in prohibiting children from
buying firearms.) However, legal discrimination based on gender is a VERY hard
thing to justify rationally.

I'm not saying that tax breaks ought to exist or that they ought to be
abolished. But, the fact is, they DO exist, and they're not going to be
abolished any time soon. The qualification to receive this treatment from the
government is that you enter into a specific sort of contract with a spouse.
However, gays who enter into this sort of contract do not receive the same
treatment by the government; their union is not recognized.

 _I don't see why he needs to marry._

Well, personally, I don't really see why ANYONE needs to marry, but my own
situation has left me understandably cynical ;) The point is that, in my
opinion, the _law_ should be gender-blind. If marriages are worth special
treatment apart from other sorts of committed relationships—and I think you
could make a strong case that they are—then fine. But the _gender_ of the
partners should be immaterial in the eyes of the law.

~~~
cousin_it
_legal discrimination based on gender is a VERY hard thing to justify
rationally_

No, it's actually very easy to justify rationally: for example, sending young
men to war lets you replenish the population faster than if you'd sent
everyone equally. Nature discriminates on gender, making it useful for us to
do the same. It's only hard to justify if you subscribe to a certain system of
irrational axioms, one of which says discrimination is generally bad.

You conceptualize marriage as a universally available contract to "legalize"
romantic love, unfortunately tainted with gender discrimination by backwards
people. I have nothing against this idea, but invent a new word for it, it's
not marriage. ("Civil union" would be fine.) I can imagine _elephants_
inventing marriage, but I can't imagine them accepting gay marriage on the
same terms as straight. This is the elephant in the room: your concept ignores
the both the purpose and the practical workings of marriage all through human
history, long before anyone thought of contracts, romance or discrimination.

For example, I have explained how tax breaks for married couples benefit
society: they give the provider an extra incentive to get and stay married,
thus encouraging good offspring. I have similarly cynical explanations for
other aspects of the institution of marriage which are IMO utterly
unexplainable from the human rights perspective. Let's focus on the tax
breaks. Isaac, by what mechanism do they benefit society in your opinion?

(Necessary disclaimer: this is not an ad against gay marriage. But if your
opinion on gay marriage is based on ideology instead of analysis, you're
wrong, even if the opinion itself is right. It's like having an incorrect
proof of a true theorem.)

~~~
IsaacSchlueter
_No, it's actually very easy to justify rationally: for example, sending young
men to war lets you replenish the population faster than if you'd sent
everyone equally._

I said it's difficult, not impossible. In times of tribal crisis, yes, men
must die first. As The Senior said so eloquently, _All societies are based on
rules to protect pregnant women and young children_ and anything else is
_automatically genocidal._ A lot of our biology has been geared towards this
because it had to in order for our species to survive.

I'm not saying that sexism is automatically and always bad. I am saying that,
in times of relative peace and plenty, when survival is not an issue, the
justification for sexism _in the eyes of the law_ is just not there.

We don't lose enough soldiers in war that we really need to worry overmuch
about replenishing the population. Even the losses in the Civil War or WWII
were a pretty insignificant piece of the population compared with the
genocidal battles that were common in antiquity, and still go on today. The
government in America has no reason to be sexist.

 _your concept ignores the both the purpose and the practical workings of
marriage all through human history_

Sorry, gotta call bullshit on that one. Exclusively heterosexual monogamy is a
relatively new concept, as far as human history goes. You don't have to look
very far to find polyamory (along with polygyny and polyandry),
bisexuality/homosexuality, and non-binary gender roles accepted as norms. Look
at feudal Japan, or classical Greece and Rome, or ancient Egypt, or the
various native American cultures. Throughout most of human history, the rich
have traditionally kept multiple lovers, often of varying genders; by
historical standards, we're all pretty damn rich today.

Each of those cultures had their own hang-ups, to be sure. My point is,
there's a wide enough spectrum that we should be skeptical of any statement
that tries to abstract directly from the mores of the West of the last few
centuries to a general statement about "all of human history".

 _I can imagine elephants inventing marriage, but I can't imagine them
accepting gay marriage on the same terms as straight._

I suspect a failure of your imagination, rather than a failure of elephants.
Giraffes, dogs, chimps, lions, flamingos, sheep, and rams have all been
observed engaging in homosexual behavior. Same-sex penguin couples have been
observed _pairing for life_. I don't know if this has ever been seen in
elephants, but as they are a very social and playful species, I'd be surprised
if they were any different from other pack mammals and birds in this regard.

Of course, there are a lot of "natural" things that we nonetheless don't
allow. Rape and murder, for instance, are pretty common among primates, and
humans have been doing this forever. And lots of cultures have had their own
weird sexual mores that we've thankfully abandoned. As humans, we get to sort
out what makes sense for us, on the basis of individual freedom.

My point is that, if you're going to take the position that committed
homosexual pairing is somehow "unnatural", or if you think there's no
evolutionary benefit to homosexuality, then You're Doing It Wrong. Evolution
is pretty smart. It knows what it's doing.

If you're a kid and you have a gay uncle, and that uncle is in a committed
relationship, then that's one set of cousins you don't have to compete with
for food and attention. You've basically got an extra set of parents to
provide for you.

 _For example, I have explained how tax breaks for married couples benefit
society: they give the provider an extra incentive to get and stay married,
thus encouraging good offspring._

Gay couples encourage good offspring as well. Just not their _own_ biological
offspring. They're quite likely to adopt, and are additional caretakers for
their family's kids. By being married, they're better at this.

Homosexual marriage also benefits society for several of the same reasons that
heterosexual marriage does. Married couples are generally more careful with
their spending, take better care of their homes, and tend to have a greater
investment in their neighborhoods and communities. We ought to encourage that
with our communal acceptance and respect, since it benefits us all.

 _Let's focus on the tax breaks._

Barking up the wrong tree, buddy. I'm against the taxes that marriage provides
breaks from. If the government can't get enough by asking for the money, it
doesn't have the right to take it by force. The IRS makes less from income tax
than we spend on our military empire—one injustice to pay for another.

Just as I would encourage a slave who breaks the law to escape his slavery, I
support anyone getting out of whatever taxes they can dodge by any loopholes
they can find. More power to ’em.

~~~
cousin_it
Good arguments. I was wrong about homosexuality in animals, thanks.

 _that's one set of cousins you don't have to compete with for food and
attention_

In all situations except extreme crisis, having cousins is good for your
inclusive genetic fitness because your cousins share a lot of your genes.
That's why instinct generally tells us to help cousins, not compete with them.
So having a gay uncle is bad for you, sorry :-)

 _I'm against the taxes that marriage provides breaks from._

Of course I'd agree to allow gay marriage if we abolish taxes at the same time
- no argument here.

~~~
IsaacSchlueter
_In all situations except extreme crisis, having cousins is good_

Ah, but genes are selected in times of extreme crisis! We have all sorts of
genes that only make sense in times of extreme crisis, but which we
nevertheless carry with us through times of prosperity when they are often a
liability.

 _That's why instinct generally tells us to help cousins, not compete with
them. So having a gay uncle is bad for you, sorry :-)_

It also tells us to help nephews and nieces. So, no, having a gay uncle is
actually GREAT for _me_. The question is whether _being_ gay is great for the
proliferation of gay genes.

I started writing a model to play with some probabilities, then realized that
I'm just procrastinating and have real work to do. :) Maybe I'll come back to
it some day, or maybe it'll just rot on the back burner with so many other
bits of nerdery...

Anyway, even if you could show that being gay is definitely bad for any
hypothetical gay-causing genes, it wouldn't rule out evolutionary causes. It
could be an emergent property of a collection of individually beneficial
genes. Or it could be the result of hormonal features of the mother that are
otherwise beneficial.

(I mean "beneficial" here in the evolutionary sense, as in "likely to cause a
certain gene to be passed on", not in any kind of normative sense.)

 _Of course I'd agree to allow gay marriage if we abolish taxes at the same
time_

Would you agree to allow gay marriage if the taxes are left as they are?

Why should a gay couple be any different, from a society's point of view, from
a heterosexual couple that adopts or doesn't have children at all? Hell, many
gay couples DO raise their own biological offspring (or at least, the
biological offspring of one of the partners.)

Seriously, what's the justification argument against gay marriage that doesn't
come down to: _"Yeah, but like, who's tha wife, then? Ew."_ I mean, here you
are arguing for analysis over ideology, and it's pretty obvious that gay
coupling is ethically and legally fair, it's a natural thing primates do, and
it's economically beneficial for society.

 _???_

~~~
cousin_it
_So, no, having a gay uncle is actually GREAT for me._

In the hedonic sense yeah, in the genetic sense no (like obesity), because you
could have cousins with extra copies of your genes. But that was just a
digression - I wasn't trying to argue that homosexuality should eradicate
itself genetically, I don't even believe that.

 _Why should a gay couple be any different, from a society's point of view,
from a heterosexual couple that adopts or doesn't have children at all?_

It's different because it has no chance of having biological offspring, while
for hetero couples society can't know it in advance.

On your other points - I'm going into a corner to think. You made many correct
statements.

~~~
IsaacSchlueter
_no chance of having biological offspring, while for hetero couples society
can't know it in advance._

What about hetero couples where one or both of the partners are known to be
sterile, possibly due to elective surgery?

Also, as I noted above, many gay couples _do_ in fact raise (one of) their
biological offspring.

 _On your other points - I'm going into a corner to think. You made many
correct statements._

A winnar is you, then, if you get new thoughts. Thanks for prodding me to
justify all this. It's been fun. Conversations like this are why I love HN.

