Re: Learning/Teaching SQL

From: Lee <lee_at_jamtoday.com>
Date: Sun, 23 Nov 2003 21:51:03 -0500
Message-ID: <3FC17217.4070106_at_jamtoday.com>


[Quoted] Daniel Morgan wrote:

> Lee wrote:
>
>
> My classes are pretty much graduate level ... almost all of my
> students already have undergraduate degrees in Computer Science. That
> said I don't think there are any easy answers nor do I think there are
> any textbooks that will be of great help. Were I in your position I
> would look for a good training company to provide the hands-on
> training required. What geographical area are you in? I might be able
> to make some recommendations.

[Quoted] Unless you know somebody who wants to volunteer (we are a non profit, after all)... I'm afraid there's no budget and I'm the designated chief, cook, and bottle washer on this one.

>
> But generally speaking here's where I'd start:
>
> 1. Basic SELECT statement ... one table
> 2. Basic SELECT statement ... using simple functions (UPPER, COUNT)
> 3. Add to #2 DISTINCT, etc.
> 4. Basic SELECT statement ... using simple WHERE clause to limit rows
> with equals
> 5. Add to #4 BETWEEN, AND, OR, LIKE, <>, IS, IS NOT but not mixing them
> 6. SELECT statement with GROUP BY clause
> 7. SELECT statement with HAVING clause
> 8. Very simple inner join between two tables
> 9. Very simple subquery using IN and NOT IN
> 10. Add SET operators INTERSECT, MINUS, UNION, UNION ALL

OK, seems sensible enough, get then used to dealing with just one table, introduce the built in functions , pseudo columns and Where clauses then move along to two or more tables. Historically (At least for Oracle) the SET operators came later, but I suspect the concept is easier , more intuitive than Joins. What do you think of indroducing them before we get to the nitsy gritsy of Join?

>
> Be sure to not use dumb SCOTT schema examples like emp and dept. Use
> examples from your real tables that emulate or are real queries where
> the users can see the value.

That sounds right too. The teaching material might as well give then hints of the glorious stuff that can be done with our actual data and get them used to the table and column names that are "real" for our data.

>
> It helps a lot of management states clearly that there may be some
> downsizing and that those that don't have the skills won't be
> retained. Motivation is critical. If there is not penalty for not
> learning ... most won't learn. Those that are self-motivated, like my
> students, will already know the material so what you have are the rest.

[Quoted] Fortunately, Thats not a problem. This is a self selecting set of professionals who are motivated to pick up a tool whose utility they see  demonstrated before their very eyes every day. In every bunch, there are always a set (generally a minority) whom I call "ham radio operators". The sort of people who like to know "how does it work" (which is something a bit different from "how do I work it" , though of course they want to know that too)

Thanx Received on Mon Nov 24 2003 - 03:51:03 CET

Original text of this message