Re: Navigation question
Date: 26 Feb 2007 00:26:21 -0800
Message-ID: <1172478381.549882.126820_at_t69g2000cwt.googlegroups.com>
On Feb 26, 5:45 am, "dawn" <dawnwolth..._at_gmail.com> wrote:
> I recognize there is the down-side that if you specify a navigation
> path (such as an earlier example where the query had "Order.orderid"
> to which the DBMS had specs on how to navigate) you are "hard-coding"
> similar information to that "hard-coded" when issuing an SQL query
> that includes a JOIN statement.
The difference is, when you specify the join explicitly, the DBMS can be expected to take advantage of the intended semantics of the operation, e.g. by optimizing the execution plan and/or the physical data layout. If on the other hand you just issue a huge pile of navigational queries, the DBMS cannot be expected to infer that they're actually a part of a higher level operation which for example could be executed with higher asymptotic efficiency.
So, essentially, it's about the proper division of labour between application software and the DBMS, and about the interface used to implement that division. It makes sense to subcontract as much of your data manipulation as possible to the DBMS because that's what DBMSs are built for and good at. But in order to do its job effectively, the DBMS needs to know more than can be inferred from a mere stream of navigational queries. A high level interface, based on relational algebra, transactions and like abstractions, allows that useful semantic information to be transferred from the application to the DBMS, in a form regular and expressive enough to be amenable to programmatic manipulation.
Using such a high level interface to issue navigational queries is akin to micromanaging a highly paid professional. The whole point of hiring an expert is that he's better at translating your high level plans to low level details than you are. If you refuse to let him in on your plans and task him around step by step, you'll get zero productivity improvement out of the hire. The same goes for tasking around specialized software components, like a DBMS. Received on Mon Feb 26 2007 - 09:26:21 CET