Forgot your password?

typodupeerror

Comment: Re:Not getting RDMS (Score 1) 283

by Joey Vegetables (#40027261) Attached to: Moving From CouchDB To MySQL
Some people would still insist on a separate table. I probably would not (even though Deaths probably should be). In most contexts, we can adopt the convention here that a birth date of NULL should be interpreted as "unknown." Again, I'm breaking the relational model - very slightly - but in a way I'm fairly confident, from experience, should not cause too many problems. BTW, there are contexts in which this model might *not* make sense. How about a maternity unit in a hospital? We might want to start recording information about a baby who has not yet been born. He or she most certainly exists, and may have various attributes that we can know and wish to make use of, yet birth date may not be one of them, because it hasn't happened yet and we don't know for sure when it will (or even if it will). There are good relational ways to model all of these attributes, and a nullable BirthDate column may or may not be an acceptable compromise. In my opinion (which is not shared by relational purists), it depends largely on whether there is a single, unambiguous meaning for that NULL.

Comment: Re:Not getting RDMS (Score 4, Informative) 283

by Joey Vegetables (#40021059) Attached to: Moving From CouchDB To MySQL
From a purely pragmatic point of view, it may not seem unreasonable to model it that way. But you should be aware that you are trading one form of complexity for another, probably bigger one. For instance, now, if you want to know who was alive on some specific date, you have to write something like "WHERE DateOfDeath IS NULL OR DateOfDeath > @date." You also will not know for certain whether a NULL means "person is still alive" versus "person is dead but we do not know his or her date of death." When you try to compare different people's death dates any comparison to NULL will yield NULL and you will need special case logic in every such comparison. You will need tristate logic throughout any part of your application that does logical tests based on the date of death. Nullable values will sometimes require special treatment in your code, depending on the language (e.g., whether date/time values are considered to be nullable in that language). I could go on. I also could build you both tables, an updateable view, and a set of SPs to do your basic CRUD stuff on both tables plus "show me living people" and "show me dead people", in a LOT less time than it would take to handle all the code problems that would result from breaking 1NF. I am not an extremist on this subject, but I wear both DBA and developer hats, and when I'm acting as a DBA or in any other situation where I have control over the DB, I do try to get into 3NF, and then denormalize only if there are demonstrated reasons to do so. As a developer, I will sometimes take shortcuts if it's genuinely necessary, but, more often than not, I end up regretting them.

Comment: Re:Not getting RDMS (Score 2) 283

by Joey Vegetables (#40019659) Attached to: Moving From CouchDB To MySQL
GP is correct, and your understanding of the relational model appears to be - no offense - a bit lacking. To address your first example: people and deaths are different, though related, concepts. Ideally, they should have separate tables, plus a view. If someone died, he or she has a row in a Deaths table, which joins to the People table; otherwise, not; no NULLS necessary. When interacting with the data from outside the database, you use a view, which can be engineered to appear to contain NULLs, duplicate rows, and so forth. The views can be updateable, using triggers and whatnot, so you can treat them as if they were tables wherever it is convenient to do so, and they will behave the way you appear to believe they should (or the way your ORM tool believes they should); but, behind the scenes, the data will be stored in 3NF and therefore will be far less subject to insert, update and delete anomalies than they might be otherwise. Now, no one is holding a gun to your head and saying you *must* use the relational model. But I do advise you to understand it, and its benefits, and to use it where it makes sense, and, if you don't use it, to understand the tradeoffs you are making.

Comment: Re:Gosh, is the Slashdot audience really that cree (Score 1) 460

by Joey Vegetables (#39975265) Attached to: Richard Stallman Falls Ill At Conference
The libertarian agenda is very different from corporatism, and almost all libertarians recognize that businesses should not have greater rights than individuals. I along with many (though not all) libertarians oppose the existence of limited-liability corporations in the first place. Limited liability is the mechanism by which companies can keep profits for themselves while "socializing" the costs of externalities such as harm to workers or to the environment. I also oppose most forms of "intellectual property," another somewhat controversial but far from unusual opinion among libertarians.

Comment: Re:Gosh, is the Slashdot audience really that cree (Score 1) 460

by Joey Vegetables (#39965289) Attached to: Richard Stallman Falls Ill At Conference
Socialists and libertarians both oppose corporatism, which is the system we have now. We certainly differ over what we would replace it with, but one substantial and practical point of agreement is that most socialists and libertarians would advocate the repeal of "laws" that constitute special privileges for big corporations. (We libertarians would go much further though, because most of us understand the phenomenon of "regulatory capture," by which megacorps get laws passed ostensibly to protect workers, or the environment, or whatever, but which are so expensive to comply with, that they have the effect of rewarding the megacorp by punishing or even shutting down all of its smaller competitors.)

Comment: Re:More manufacturing in North America (Score 1) 87

A weaker dollar, which is almost inevitable in the future as the petrodollar scheme falls apart, will bring back much more manufacturing, especially if the government swings back to a more business-friendly (as opposed to BIG business friendly, which is not the same) type of environment. Our manufactured goods, both exports and those consumed internally, will become that much cheaper, compared to their foreign counterparts, so we will be producing and exporting more, and importing less. There will be much short-term pain, as energy and food we still need to import will become more expensive, but the longer-term benefit to America's productive capacity should more than outweigh this pain especially in the Northeast, the Rust Belt, Chicago, and Southern California. The more rural and/or Southern states should see some benefits as well, because higher food and commodity prices will greatly improve their financial outlook as well. In the end, we are better off with a weaker dollar as long as both exchange rates and interest rates are allowed to float to reach a market-clearing equilibrium, which they currently are not; and as long as the current pro-corporate regime is dismantled and replaced with one more friendly to ordinary businesses, and hence American workers.

Comment: Re:I can confirm (Score 1) 811

The U.S. is uniquely influenced by a warped view of Christianity, that treats sexuality as evil. The actual teaching of Christianity is that sex has permanent physical, emotional and spiritual consequences, and is thus meant to be part of a loving and committed relationship, not a temporary or fleeting one. It isn't a bad thing, it's a good thing that should not be abused and cheapened. Which of course we do, by trying to repress it to the point where we end up being exposed from childhood to only the abuse of sexuality, where the proper use, within loving and committed relationships, no longer exists (and would be taboo even if it did) because such relationships really no longer exist in our culture, with divorce rates exceeding 50% in urban areas and approaching it elsewhere as well. So, in the process of trying to ban all public display of sexuality, we end up becoming among the most hyper-sexualized societies in the world, paying vast sums of money just to see other people's body parts (and learning to see those people just as collections of body parts), because we grew up thinking that sexuality is somehow unnatural as evil. It is sick, and it is not at all what God intended. I'd dare say that Europe is a lot less sick in spite of being a lot less overtly Christian, and I say that *as* a Christian or at least an aspiring one. Now, I'm not just trying to slam pornography. I see it as a problem, sure, but also as a symptom of a much deeper one: we do not naturally form strong, lifelong bonds with other human beings, as people in more sustainable cultures do, usually from adolescence; therefore, we have no socially-sanctioned outlets for our sexuality, which, being the powerful part of our being that it is, naturally seeks expression in some other way. People need each other, for a lot of reasons, of which sex is one, but not the only one. For a variety of reasons our culture does a very poor job of encouraging this, and even discourages it in many ways. I want to be out of the USSA for this among many other reasons. I want our children to grow up in an environment where human beings can live as human beings without having to make excuses or apologize for being the way they are, and where they can grow and mature to the point of being able to start a family before they are too old to actually have one.

QOTD: "He's on the same bus, but he's sure as hell got a different ticket."

Working...