Re: OO vs. RDB challenge

From: frebe (fredrik_bertilsson_at_passagen.se)
Date: 03/20/05


Date: 19 Mar 2005 21:47:01 -0800

alex99@medcentral.com.au wrote:
> In essence I would have layers:-
> Layer 1. Get info from diverse source(s),
> Layer 2. Apply filters,
> Layer 3. Format and make pretty enough or presentation.

If you filter your data after you retrieve it, you will have to
traverse every object and you will have a linear search. Doing this is
the same as dismissing 40 years of computer science.

> SQL might help with Layer 2 but only if the query is simple enough.
If
> not you need procedural or OO language help after all.

I have seen many examples of this case, then a procedural language has
to implement a filter because SQL can't do it. But in every case it was
possible to redesign the database schema to enable SQL to do its job.
If you do a linear procedural filtering, your perforance will be bad.

> The DBA team will not allow you to make any ad-hoc queries.

I did not claim this to be a ad-hoc query. And why would not the DBA
team allow that?

> You have 25 million customers and they don't like programmers poking
> with production systems. They eventually agree to FTP to your machine
a
> compressed CSV dump of the customer table, they do that at 3AM Sunday
> mornings.

You have a database which is only accessable by a export utility? A did
not say I should be poking with the database. I'm talking about a new
feature in your application. I assume that you have a development
database to work with.

> You create a very nice page, but it's too long, it hangs the browser,
> we need to paginate the result. There where 7 millions rows so the
> network guys are screaming.
> How do we do the paginated query?

If you look at Butler (http://butler.sourceforge.net), you can see how
a paging query (ScrollQuery), based on any other query, is done. It is
a little bit complicated, but very deterministic. Any good SQL
framework should have a function for creating paging queries.

> After a while they realize they want this query all the time with
live
> data, so you get permission to run SQL on the database. Great but our
> driver only allows us to move forward, we also need to go page
> backwards.

Switching between forward and backward paging is just about chaning
operator ("<" to ">") and sort order ("asc" to "desc").

> The new super-e-business-guru has decided to put all customer
> information in an EJB and the manager has agreed.

EJB is not a place to "put information". It is a layer on top of a
database. Why would be manager only allow database acces through EJB?
What would he do with all his Crystal reports?

> The new web page version of the query is getting really funky now, he
> wants to ensure customers have a matching record in the Radius
> Authentication Server.

A good RDBMS could integrate an external authentication server.

> ... and while you're at it check to ensure they exist in the all
> important billing system. Accounts interface with CORBA but
internally
> they use Oracle (which is behind 3 firewalls).

Maybe you could use the replication feature in Oracle?

> Hmmm a join across different kinds of systems. Now what?

Most RDBMS:es can join from tables in other catalogs and schemas, as
long as they are in the same RDBMS instance.

> I hope can you see my point ;-)

You are just showing a lot of stupid limitations that your colleagues
gives you. None of this limitations has anything to do with a RDBMS.
And the limitations you show are very rare. The only argument that I
ever heard about before, is about authentication. But that is also
caused by an obsolete and stupid idea about "connection pooling". To
create an existence argument for application server software, you need
to invent a fake problem with the RDBMS.

Fredrik Bertilsson
http://butler.sourceforge.net



Relevant Pages

  • Re: Looking for a decent data access architecture to implement
    ... > application so that there is a clean separation between the data access ... > layer, the business layer and the GUI layer. ... > the actual database. ...
    (microsoft.public.dotnet.languages.csharp)
  • Looking for a decent data access architecture to implement
    ... application so that there is a clean separation between the data access ... layer, the business layer and the GUI layer. ... the actual database. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Size matters to some
    ... The underlying remote database connection ... physical layer is actually managing it all, the logical layer is forced to ... constraints as specified by developers. ... want to validate the information getting written. ...
    (comp.databases.pick)
  • Re: "Business Objects" and the DAL
    ... layer talks to the layer next to it. ... business entity returned that up to the UI for binding to a grid. ... If a database table column names ... Each could be considered a "pattern", ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Access module does not continue past the Filter Method
    ... If you get this problem in any database at all, ... the subroutine went back to not working again. ... Public Sub Apply_Tech_Filter ... Debug.Print "Past the Filter" ...
    (microsoft.public.access.modulesdaovba)