sexta-feira, 21 de março de 2008

Administração de Dados: um sistema livre e relacional

Finalmente, habemus um sistema (quase) relacional e livre! Não, o (outramente ótimo) PostgreSQL não é relacional — ele é SQL e, portanto, não relacional. Mas o Alphora é tão livre quanto o PostgreSQL, e é quase completamente relacional, exceto por implementar os NULLs do SQL.

Perde-se algo? Desempenho, por enquanto. O Alphora é implementado por cima de bases SQL, portanto não consegue ter o mesmo desempenho, por acrescentar uma camada com seu próprio interpretador, alguma latência, consumo de recursos &c. Mas creio que vale a pena.

Buracos? Vários. Por enquanto roda somente em MS .Net, e nos SGBDs proprietários mais o MySQL. Mas tendo sido liberado o código-fonte (espero que seja bonito, ainda não vi), a esperança é que logo seja portado para Mono e PostgreSQL. E precisa de mais e melhor documentação.

4 commentaires:

davidfetter disse...

There are lots of theories of relational database management systems, and only the Darwen, Date, Pascal one has all these ludicrous restrictions. Other fine theoreticians are too busy doing research to do the kind of loud, public whining about the vaporware that is a "truly relational" database management system.

NULLs are among other things a way of recording a state of ignorance, and are an extremely useful construct. If they hadn't been in Codd's relational model, it would have been necessary to invent them.

It's nice that you can get Dataphor under a very liberal license, but it's not going to revolutionize anything. The theory of RDBMSs long ago moved from being a mathematical theory to a scientific one, whereas Date, Darwen and Pascal's theory shows no promise of ever doing so.

Anônimo disse...

First, Mr. Fetter, you sure do me an honour to visit my blog and commenting on it — and the Portuguese one at that. As you have disagreed so heartly, perhaps it never deserved your comments in the first place! BTW, you said at PgConBR you could use help; I wrote you offering some after a few days, but thinking about it perhaps you haven’t received anything. :-(

The problem with all these theories you mention is that either they stand on shaky ground — such as the one behind SQL, which seem to have been assembled ad hoc — or they get really confusing. Also, as you said at PgConBR, they need a propaganda master such as Date. When is your book coming out? ;-)

For exemple, one of the problems with SQL NULLs is that they are undifferentiated, being used for quite different stuff; and are treated inconsistently on top of being base on already somewhat confusing three-valued logic. Proposals to differentiate NULLs further to make them more useful end up with four or even five-valued logic, and therein lies madness, so complex it gets.

I do like Date and Darwen’s proposal on special values instead of NULLs. One needs to do more work when defining types, but it should be worthwhile even if it doesn’t reach their ideal of having base and derived relations interchangeable.

Now, even with SQL NULLs, Dataphor is nice enough. I don’t know of any other system where I can define all system logic as integrity constraints, and have derived user interfaces enforcing them even at user data entry, while being able to publish that on the wer or on the desktop. I only wish that, besides porting to PostgreSQL and Mono, it also get a character-cell interface.

Perhaps Andromeda would be a truly SQL-based equivalent, but I doubt it has all the power and consistency of Dataphor. I tried querying its author, he was quite inconclusive.

davidfetter disse...

> First, Mr. Fetter, you sure do me an honour
> to visit my blog and commenting on it — and
> the Portuguese one at that. As you have
> disagreed so heartly, perhaps it never
> deserved your comments in the first place!
> BTW, you said at PgConBR you could use
> help; I wrote you offering some after a few
> days, but thinking about it perhaps you
> haven’t received anything. :-(

I would like to apologize for not responding sooner. I was looking for ways best to attach your talents to organizations which need them, and continue to.

It's not you I'm disagreeing with, but Darwen, Date and Pascal. It's unfortunate that their rants have gotten so much unwarranted attention, mostly due to the fact that they spend a lot of time whining loudly and publicly where other theoreticians spend their time doing work. While the current state of affairs is confusing to people not comfortable with three-value logic, it very accurately reflects reality. The quest for a "simpler" model is, I believe, doomed to failure for the same reasons that the quest for models of physics that are "simpler" and hence more comfortable than our current understandings of relativity and quantum physics, namely that no simpler model actually describes the realities involved. As for my book, you wouldn't like it because you take the Greek method as your approach where I take the Babylonian one.

Anônimo disse...

Thank you for your kind note! I will patiently wait for your search’s result.

In fact, even if I wouldn’t like your book we still need explainers. Lots of good theoreticians doing great work which no one understands won’t do much good, specially when vendors are so active messing up even the little we have out there already; so we need them, and we need explainers too. I hoped you would be one of them, or perhaps you can help encourage someone.

Even the SQL standard itself needs some explanation — currently the only clear explanation on it I know is from, you guessed it, Date himself.

In the end, it doesn’t matter my particular approach. It does matter if there are, or aren’t, enough educators.

As for the different methods themselves… I see what you mean, but not as something really alternative, rather complementary; or even, alternative routes that must converge or die. So one starts from ad hoc constructs reflecting perceptions of reality, other from generic axioms; still they must agree, or at least one of them will be wrong.

It is easy to dismiss Date, Darwen, McGoveran, Pascal — but, barring the NULLs thing, mostly they are following Codd. Codd himself was quite unsatisfied with the state of affairs, and it is a pity his last book was such an ad hoc mess. I wonder where would we be had he been able to steer System R.