![]() | |
#41
| |||||
| |||||
|
|
Jan Hidders wrote: Lee Fesperman wrote: Jan Hidders wrote: Correct. There's absolutely no reason to believe that you cannot have data independence with logical pointer or references. I would however argue that allowing entities without representable keys is not a good idea. Incorrect. Even though you call them 'logical' pointers, they are still physical artifacts and have no place in a truly logical view of the database. Logical pointers can be defined at the logical level and implemented in various ways. They are just as much physical artifacts as, say, relations are. Databases are about data, and pointers are not data (or meta-data). They carry information. That makes them data. I see no good reason to use a more restrictive definition. Because the information they carry is physical, which doesn't belong in a logical model. Let me try again: In the relational model, tables (relations) are completely independent except through the action of inter-table constraints (like referential integrity). The constraints are declarative and truly logical. They can be removed without changing the contents of a single column in the participating tables. Pointers form a rigid bond between table. To my mind, this makes them physical --- if it walks like a duck, etc. |
|
Pointers don't have the flexibility associated with a logical entity. You must change table contents to remove that bond. |
|
It's been argued here that pointers (references) could be mapped to pk/fk constructs. Besides throwing away other benefits of pk/fk, it doesn't work in the general case, for instance: |
|
+ When the fk is part of the pk of the referencing table, |
|
+ When the fk columns are shared with other fk's. |
#42
| |||||
| |||||
|
|
If you take a standard SQL-query with sorting and grouping and some joins and compare it with hand written "navigational" code you will notice that what can be expressed in SQL in 5-10 lines of code will require several pages of hand written code for equivalent result. |
|
The third issue is that the SQL query can be optimised to a much higher degree than procedural code. Say you add a new index. The DBMS will/can immediately start using it without any user intervention (if it decides to). In the procedural alternative you would have to recode your query. |
|
The optimiser can also take into account the cardinality of tables (=number of rows) so that it will produce a different plan for a small database and a big database. |
|
An optimiser can even be sensitive to input from users at run time, say you have select name, salary from nurses where sex = ? If the parameter given at run time is 'M' then it could be advantageous to use an index, but not if parameter is 'F'. This decision could be made by the optimiser "on the fly". I hope you get the picture... |
|
Other than that, what's wrong with the network (or similar) models? I have not found a good link to such a discussion though I hear it repeated that there are certain classical arguments against them. In 1974 there was the BIG DEBATE where Codd defended the RM against network guys. I wonder if there is a transcript available? I think one of Codds arguments was that the number of manipulative operators needed in the RM (i.e. insert, update, delete) was much lower than in CODASYL (connect, disconnect, etc etc...) |
#43
| |||
| |||
|
|
select --+leading(d) use_nl(e) index(e deptref_ix) E.Name FROM Emp E, Dept D WHERE E.Deptref = REF(d) AND D.Name = 'shoe'; did follow the access path that I wanted to. Of course, it still remains to see the more challenging task solved with the hints removed. It is optimizer that is always a problem:-) Well, I'd be least concerned about the optimizer. If you're using Oracle , I'd lookup the documentation for the cute name IS_DANGLING Cool stuff. |
#44
| |||
| |||
|
|
lauri.pietarinen (AT) atbusiness (DOT) com (Lauri Pietarinen) writes: You wouldn't necessarily *have to*. PyPerSyst does not yet have a declarative query capability. But if you add an index, the same procedural code will now make use of that index (or rather, the procedural code is calling methods of objects that are smart enough to look for indexes to optimize themselves without requiring any changes in application code). I only point this out becase critics of object databases really need to improve their understanding of the capabilities of object languages and object databases. They just aren't as inflexible as some pundits would like to claim. |
#45
| |||
| |||
|
|
"Patrick K. O'Brien" <pobrien (AT) orbtech (DOT) com> wrote in message news:m265ixf4fe.fsf (AT) orbtech (DOT) com... lauri.pietarinen (AT) atbusiness (DOT) com (Lauri Pietarinen) writes: You wouldn't necessarily *have to*. PyPerSyst does not yet have a declarative query capability. But if you add an index, the same procedural code will now make use of that index (or rather, the procedural code is calling methods of objects that are smart enough to look for indexes to optimize themselves without requiring any changes in application code). I only point this out becase critics of object databases really need to improve their understanding of the capabilities of object languages and object databases. They just aren't as inflexible as some pundits would like to claim. I just went through simple stupidity test for Object Relational yesterday. Yes, Object Relational folks are not totally dumb, their stuff doesn't have *obvious* flaws. Therefore, yes it seems possible in principle to optimize queries in Object Extensions to SQL, and maybe in even OQL as well. The problem is that they raise complexity so significatly that it is extremely challenging for the optimizer to catch up. Note, that sql optimization is struggling to solve all problems in "simple" area of "flat" relations. Or, to put it in other words, how large is optimization team in your little PyPerSyst? |
#46
| |||
| |||
|
|
"Mikito Harakiri" <mikharakiri (AT) iahu (DOT) com> writes: I just went through simple stupidity test for Object Relational yesterday. Yes, Object Relational folks are not totally dumb, their stuff doesn't have *obvious* flaws. Therefore, yes it seems possible in principle to optimize queries in Object Extensions to SQL, and maybe in even OQL as well. The problem is that they raise complexity so significatly that it is extremely challenging for the optimizer to catch up. Note, that sql optimization is struggling to solve all problems in "simple" area of "flat" relations. Or, to put it in other words, how large is optimization team in your little PyPerSyst? I don't completely understand all of what you have said, or exactly what you are asking, but I'll try to provide some information that may answer your question. First, PyPerSyst is not Relational, nor is it Object Relational, nor does it support OQL. It is a persistence system for Python objects. It can persist any Python object graph, but it also comes with a couple of base classes that can be used to create an object system that has some *qualities* in common with Relational databases. As for optimization, that isn't quite as much of an issue, as PyPerSyst is an in-memory database, which means that all objects reside in RAM. Transactions are logged to disk before being executed, and the combination of system snapshot and transaction log is used to recover from a crash. So performance is good without a lot of attention to optimization. There is no optimization team. As of right now, I have written all the PyPerSyst code. But I have drawn inspiration from other projects and academic papers, and there are several developers actively contributing ideas as well. PyPerSyst is free and open source, so you can examine the source code yourself: |
#47
| |||
| |||
|
|
I just went through simple stupidity test for Object Relational yesterday. Yes, Object Relational folks are not totally dumb, their stuff doesn't have *obvious* flaws. Therefore, yes it seems possible in principle to optimize queries in Object Extensions to SQL, and maybe in even OQL as well. The problem is that they raise complexity so significatly that it is extremely challenging for the optimizer to catch up. Note, that sql optimization is struggling to solve all problems in "simple" area of "flat" relations. Or, to put it in other words, how large is optimization team in your little PyPerSyst? |
#48
| |||||
| |||||
|
|
Jan Hidders <jan.hidders (AT) pandora (DOT) be.REMOVE.THIS> wrote Er, well, file names are actually not abstract because they have a concrete representation that you can read. We could go round and round on this. I'd observe that there is a whole class of things which can potentially go into tuple attributes that aren't 'values': for example, you might put a query in there, |
|
or a reference, |
|
or a filename, |
|
or an executable script to generate a value. |
|
The information content of such values are always 'one step removed' from their representation, and may in fact be ambiguous. |
#49
| |||
| |||
|
|
Which bit of object relational drew your ire? Extensible domains adds some complexity, but it also simplifies some stuff. Queries over UDTs/UDFs works pretty good in Postgres. Check out the Sequoia 2000 and Bucky benchmarks. References and table inheritance make a lot harder. |
#50
| |||
| |||
|
|
Extensible domains adds some complexity, but it also simplifies some stuff. Queries over UDTs/UDFs works pretty good in Postgres. Check out the Sequoia 2000 and Bucky benchmarks. |
![]() |
| Thread Tools | |
| Display Modes | |
| |