× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Thu, 2004-07-22 at 20:01, midrange-l-request@xxxxxxxxxxxx wrote:
>      > From: Bob Cagle
>      >
>      > Note: I understand SQL has its place; web programming, etc.  I just
>      > don't see the need to switch over 100% to SQL.  What am I missing?
>      Why
>      > should I use an SQL select statement versus a simple chain to a
>      logical
>      > file?

While I haven't changed any of my old programs to use SQL instead, I do
all my new development with SQL.  In fact, there are a lot of times now
that I don't even write programs to do things I needed to do before (you
know, the little one-offs we all write to fix a DB problem or change a
value or something?)  A typical program that loops through an entire
file and does some kind of "if x = z then chain to another file"
processing can easily be replaced with an SQL statement to handle the
conditioning and chaining automatically.  SQL also lets you work with
just the fields you want, so you can concentrate on the work at hand
without worrying about accidentally updating a field you didn't want to
touch.  

Mass deletes, updates, and inserts are very cool.  Single level record
access?  It's almost certianly better with native access, at least
performance wise.  Woprking with groups or sets of related data though,
I think SQL wins hands down.  SQL also helps if you want to try to learn
other languages: you can't do native file access to MySQL with PHP, so
you better know SQL.  In fact, I think it's becoming more and more of an
expected job skill, so the more comfortable you are with it the better
for you in the long run.

Don't take this as me saying native file access is bad, I just have a
tendencey to learn through a baptism of fire, so when I started using
SQL I just kind of went whole hog.  If you want to write a program that
doesn't rely on a specific logical file existing, or if you want to have
flexible searching (letting the user specify selection criteria, and
ordering and such), then SQL is awesome.  If you want to create tables
on the fly and populate them with computed values from multiple files,
then SQL can do this in a few statements with no nested loops or any of
the other traditional coding.

Just my two cents.

Joel
http://www.rpgnext.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.