Bath.pm April 2 Meeting Report

Aaron Trevena aaron.trevena at droogs.org
Sun Apr 7 15:18:19 CDT 2002


On Fri, 5 Apr 2002, Colin M Strickland wrote:
> Mark Fowler writes:
>  >
>  > Gah, SQL sucks.  It doesn't lend itself well to being constructed by
>  > computers, which, 99% of time is what's happening.  You tend not to enter
>  > that much SQL by hand.

Pah! Have you tried generating Javascript, VB, Perl or cobol ? SQL is a
piece of piss to generate.

>
> SQL is a *rocking* language, it does one thing and does it well. 99%
> of your SQL is machine generated ?; Weird , how often does your data
> schema change ?.

More important is to design the database with this kind of thing in mind -
dealing with DB's designed by people who use Access is really fucking
unpleasent, when you design the database knowing that what goes in and
what comes out will be handled entirely by software and make sure it is
consistent, predictable and **normalised**.

> Of course you need a proper SQL implementation. Refuse to consider
> anything without UNION sets and subqueries.

..coming from someone who only finished migrating to Postgres from MySQL a
few months ago ;)

I have just been building a small library for a freelance project - it
does all the database tasks required, abstracting away the actual SQL and
queries - By designing the database naming, etc in such a way as to ease
automation I was able to work out side tables, joins, etc and provide 8
functions for all the database access in the application.

The small drawback is that some of the code that calls it can be a bit
less effective than if the Queries were in the 'layer' above  instead of
in a database library - but the ease of maintainence and adding new
functions, etc makes it well worth while.

regards,

A. (In sunny cornwall, converting a VB shop to Perl script by script)

-- 
Aaron J Trevena - Perl Hacker, Kung Fu Geek, Internet Consultant
AutoDia --- Automatic UML and HTML Specifications from Perl, C++
and Any Datasource with a Handler.     http://droogs.org/autodia




More information about the Bath-pm mailing list