[geeks] Oh my god...

Joshua D Boyd jdboyd at cs.millersville.edu
Fri Nov 29 13:48:28 CST 2002


On Fri, Nov 29, 2002 at 11:26:27AM -0800, Lionel Peterson wrote:
> --- Joshua D Boyd <jdboyd at cs.millersville.edu> wrote:
> > I think that DB/2 has supposedly changed a lot in the last 10 years.
> > Like, my recall is that they have added more object relational
> > features.  
> 
> DB/2 was *great* 10 years ago, if they did nothing more than maintain
> it it would be great.
> 
> Object-oriented DB eludes me, but so does Object-oriented
> programming... I know it makes sense, but I almost invariably want to
> toss in a GOTO or CONTINUE line ;^)

I don't do GOTOs any more after years of presure.  I do use continues in
C/C++ code.  I can't help it.  It just seems like such a natural thing
to use to clean up nasty loops.

As to object relational, to me* it implies a couple of things.  First, it
implies the idea of defining my own datatypes and operators for those
datatypes. For instance, Postgres has an IP data type and a CIDR
datatype.  I don't know how all the operators are setup for those
datatypes, so I don't know if this works, but I think it was be trivial
to make it work "select * from computers where
computers.ip~'192.168/24'" returns all records where the computers IP is
in that cidr block.  

Object relational seems to also imply that you can create template
tables, then tables that inherit from the template, but I don't really
see where I would want that.
 
*= I'm very much not sure here.  Some of this is me noticing how
 Postgres differs from other DBs, and other are from people talking
 about O-R databases.  

> I content my programming needs with an exercise to implement a
> "learning" Tic Tac Toe game - it will learn a strategy over time, by
> recording the plays of the "human" opponent...
> 
> I think my 6 year old will like it (he LOVES Tic Tac Toe, as well as
> Rock Scissor Paper), and I think I can implement it easily... But
> should a trivial game have a need for a relational database? Seems
> excessive, yet, oddly appropriate!

A more freeform data structure might also be appropriate, and perhaps a
good way to expand ones horizons.  

However, just because a program is trivial, that doesn't mean you
shouldn't use a relational database.  Sometimes using the right database
is what makes a hard program a trivial one.

-- 
Joshua D. Boyd



More information about the geeks mailing list