Re: OO vs. RDB challenge
alex99_at_medcentral.com.au
Date: 03/19/05
- Next message: H. S. Lahman: "Re: Attaching a behavior only to multiple classes."
- Previous message: frebe: "Re: Application logic and Business logic"
- In reply to: frebe: "Re: OO vs. RDB challenge"
- Next in thread: frebe: "Re: OO vs. RDB challenge"
- Reply: frebe: "Re: OO vs. RDB challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 19 Mar 2005 06:27:18 -0800
frebe wrote:
> > In real business, ANSI SQL can never stand by itself
> Did someone claim it could?
>
> > So I stand by my original position, it's not a case of DBMS versus
> OOP
> > they can work well together
> Indeed
>
> > In the end, I only use DB's if my client demands the extra sex
appeal
> > that comes by having one and not because they do anything for me.
> Lets have an simple example. Lets say you have a list of customers
and
> you want to find every customer above a given age living in a
specific
> city. How would you do without a RDBMS? Traverse all customers and
> evaluate the criteria, or creating two maps, one for the
birth_of_date
> property and one for the city property? Or would you have another
> solution?
The information might be in a CSV file, XML, dbmfile, CORBA, MQ, EJB,
LDAP, database, web page, spread*** ... and therefore the solution
will vary.
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.
SQL might help with Layer 1
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.
> In SQL, the solution would be:
> select * from customers where (today-date_of_birth)<? and city=?
Sure in a vacuum that is a nice and simple query but please let me
spice it up with a touch of reality.
Let's put this in a real world context.
The DBA team will not allow you to make any ad-hoc queries.
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.
How do we do the query now?
The manager sees some output but complains that he can't read it, it
isn't pretty enough, he wants a web page.
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?
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.
The new super-e-business-guru has decided to put all customer
information in an EJB and the manager has agreed.
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.
... 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).
Hmmm a join across different kinds of systems. Now what?
...
I hope can you see my point ;-)
> Fredrik Bertilsson
> http://butler.sourceforge.net
Regards,
Alex Kay
- Next message: H. S. Lahman: "Re: Attaching a behavior only to multiple classes."
- Previous message: frebe: "Re: Application logic and Business logic"
- In reply to: frebe: "Re: OO vs. RDB challenge"
- Next in thread: frebe: "Re: OO vs. RDB challenge"
- Reply: frebe: "Re: OO vs. RDB challenge"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]