[thelist] MS-SQL vs. MySQL - was Front-end for MS-SQL?

rudy r937 at interlog.com
Fri May 25 13:21:03 CDT 2001

> ...  but then you're talking a lot more work.
> Which can often better be spent working on the code,
> not the database.

hey, them's fightin words

every five minutes spent designing a better database
saves you five hours of pointless coding

how's that?   <grin />

i agree with your comments about oracle (and other "industrial strength"
database systems like sql/server and sybase) requiring time and attention
to set up properly, but that's what the database administrator is supposed
to do for you

if the database has already been built, and/or for some reason you can't
change the design, ask the database administrator to declare a custom view
if, in every page where you extract data from a particular table, you have
to stop and reformat the data yourself in the script (cold fusion, php,
asp, what have you)... the reformatting goes into the view definition only
once --

  create view FriendlyTable
     (ID, FullName, PhoneNo, BirthDate)
       select ID
            , trim(both,LastName) ||
                case when trim(both,FirstName)=''
                    then "" else ', ' || trim(both,FirstName) end
            , '(' || AreaCode || ') ' || Exchange || '-' || Phone
            , substring(cast(BirthDay as varchar(20)) from 1 to 10)
        from RawTable

then all your script's queries can simply select the view's columns,
which will have the format you want "built in" as it were --

  select FullName, BirthDate
    from FriendlyTable
     order by BirthDate asc



More information about the thelist mailing list