Hacker News new | past | comments | ask | show | jobs | submit login
Gay marriage: the database engineering perspective (qntm.org)
55 points by janpio on Nov 21, 2008 | hide | past | favorite | 55 comments



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.


It would make sense to me that every cell in your body is in a polygamist marriage, which is you, which can in turn marry other things.

But does that mean that your liver cell is married to your partner's brain cell? Not at all.

What this means is that marriages are potential partners as well! Model that.


> Maybe each particle should have its own entry

Premature Databaseation...


How would you construct the DB?


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.


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


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.


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.


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.


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


People are not part of nature?


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?


Does this kind of inquisitorial behavior really achieve anything?


It seems I need to explain better:

Nature decided that so called "gays" (an artificial term, created in our modern times) can't procreate, so if you would make an island for them, good old Nature would answer with extinction...

(I think Nature is really discriminating here. Someone should sue It.)


Well Nature (or God or whatever) decided that some people (through illness, genetical defect or whatever) are sterile and can't procreate... So they shouldn't be allowed to marry?


All homosexual marriages are sterile.

Some heterosexual marriages are sterile, too.

In my country, children are (currently!) really fortunate: they are guaranteed to have a mother and a father (yes, I know already your objections), and, as psychology is able to demonstrate, this is still the sanest and most harmonic way to grow children.

Why do we always exclude children from this reasoning?


a hole is a hole...


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!"


Have you read it?

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


I find it very interesting because the solution he came to is actually how it works in many cultures - i.e. binary marriages.

Different cultures have different contexts when it comes to marriage. Some are monogamous, but even more are polygamous, where the husband marries the wives, or the wife marries the husbands... It all screams "graph", and I think in the end that's the only way we can represent it.

Which is funny, because that's already how we represent any other form of human relationships - romantic or otherwise...


I think a graph is too static and either/or ish. Instead, there should be links defining the relationship between everyone and everyone, where the links' values are a function of something; such as time, or the values of other links, etc.

But then this raises the question of how this maps to the legal/social realm? Well, first we have to chip everyone. Then, once we've extracted the global social network, we can define, in real time, the legal and social value and rights a person has at any given instant.


There's a combinatorial explosion if you do that - the point is to focus on modeling relevant information. Note that the author throws out the fields for sex and gender identity, because they complicate things, and aren't really needed when just creating a database for who is married to whom for (presumably) tax purposes.


And what do we do with combinatorial explosions? Stochastic algorithms and metaheuristics!


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.


Are you saying that hackers don't have political opinions, or that we don't like discussing them?

Either way, the fact that you have such a strong opinion about it seems to disprove your own argument, don't you think?

I'm finding this article very entertaining. And it's clearly stimulating some rousing commentary on this board already.

The great thing about HN is that you can just ignore anything you think shouldn't be here. Don't vote it up, don't comment on it, and if others agree with you and do the same, it'll fall off. Lots of articles never make the front page.

If you were intrigued enough to read it, and then moved enough to comment on it, then that proves it should be here.


So he has an opinion on this subject, big deal. How is this any different than a guy writing about "Java sucks" or "Ruby rocks"?

I suspect the only reason you objective to this "political slant" is because you disagree with it.

And to be fair, although he is obviously pro-gay marriage, the article was actually fairly tame in terms of promoting it, or condemning the opposition. It's a lot tamer than most anti-gay marriage writings I've seen.

And is there any fault in pointing out that places prohibiting gay marriage (especially in America) tend to be more religious?


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?


marriage isn't about giving birth.


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.


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"?


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 :-)


The argument is that a certain class of people ought to have the same rights as all others do unless there is a just reason to deny those rights. Surely you can think up an argument to support that notion. The exercise of those rights isn't important, i.e. I should not be denied the right to a fair trial simply because I don't intend to commit any crimes and thus don't "need" the right.

Moreover, while the institution of marriage may serve a societal purpose, the denial of marriage rights is itself a mechanism of social control independent of that purpose. Hence, "gay marriage" is the subject of debate, while "marriage" is not.


It's like the science fiction cliche where humans puzzle over artifacts of ancient alien technology. A mind brought up on modern politics is bound to be often baffled by strange and archaic things seemingly created by nonhuman beings. What's common law? What's religion? What's marriage? Our only framework for understanding is the idea of democracy and human rights, but this stuff predates human rights by hundreds or thousands of years, and the shoehorning fails.

Slightly exaggerating, if you call marriage a "human right" today, you must also believe that free speech mandates taxpayer-sponsored newspapers to publish everyone's words :-) First make marriage totally non-binding on both partners and the government. Make divorce as easy as signing a paper. Abolish alimony and child support. Drop the tax breaks. Make hospital visitation rights, etc., a matter of civil contract. Those measures will change marriage from a state-sponsored targeted subsidy into a proper "human right".


At no point did I suggest that state-sponsored marriage must exist. Nor did I use the term "human right". In fact I don't think I'd be opposed to its abolition, as you've described. But that's like "helping" someone fix a flat tire by telling them to buy a new car. It's a solution, yes, but not a practical one in a democracy where the vast majority of the voting populace, regardless of their stance on gay marriage, does not oppose marriage in general.

I'm sorry if that isn't broad-minded enough for you, but I can't help but view a modern political issue through the lens of modern politics. Arguing in the abstract strikes me as a convenient way of avoiding the problem entirely.


a.k.a abolish institutionalized marriage. all in favor say aye. aye.


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.


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.)


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.


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.


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.

???


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.


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.


hospital visitation rights? Legal right to make decisions for him if he is incapable?


I agree. But you can't claim that "men and women are interchangeable", when for some things, they are clearly not.


I understood his point was that in marriage (without the stuff culturally connected to it) they are. And this sounds valid to me.


no, not now, but it used to be.


Ah yes, sneaky. Because of course there's no way for HN readers to discover the full content of the article before voting on it.


It's a pretty good article about how assumptions manifest in database schemas, sometimes unintentionally, and these can lead to major maintenance problems down the line.


It was very interesting to me. Our start up is a dating site an I did not allow gay couples. It is not a moral thing, it just seemed that it made the database design very complicated. The article describes several approaches that may be useful to me.



I'll get downmodded for saying this, but HN is basically: web programming - the gay perspective.


is this a minus or just a way to seperate these two things like in a headline or title? (sorry, not a native speaker. these little things sometimes irritate me)


As a native speaker, I'm pretty sure it's a separator. Reading it as "web programming: the gay perspective" may help.

I'm disregarding the content of their point, but that's the form.


thank you.


I bet if some famous gay hacker (you know who you are) wrote a book with this title, it would sell.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: