Re: Learning/Teaching SQL

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Sun, 23 Nov 2003 17:10:01 -0800
Message-ID: <1069636228.267775_at_yasure>


Lee wrote:

> I hope this isnt an off topic subject for an oracle.tools disucssion,
> but I notice that at last some of the contributors here are educators
> with strong opinions.
>
> Some (few) of our users has expressed a desire to learn SQL so as to be
> able to write their own ad hoc queries/reports
> via sql plus if need be, or through some other front end tool if we can
> round one up at trivial cost (see threads on this forum)
>
> So, the question I have for our educator friends is:
>
> What topics , in what order and in what depth would you suggest for an
> end user whose interests are entirely practical.
>
> Is there an commonly available text that stands head and shoulders over
> all the rest?
>
> Thats sort of the cheater's way out of making a curriculum. Find an
> excellent presentation and use it. Its what we call
> "Lobachefskii's" method (google " Tom Leher" if you dont know what I'm
> babbling on about).
>
> To see where my prejudice lies; if it were PL/SQL rather than SQL I'ld
> say hands down Feuersteins "Oracle PL/SQL Programming" O'Reilly press
> is the best butter
>
> They probably dont need to know a whole lot about normalization theory
> but they sure do have to know about outer joins and about when and why
> the naivly stated inner join wont give them the correct result.
>
> But heck, you-all are the experts, whats your take on it?
>
> Remember the student's goal is to be able to fish the answers out of the
> database in a readable form, starting
> with no particular technical background in Oracle or databases, but with
> a technical mindset and enough familiarty with the usual mix of
> personal computer operations that one finds in a modern office .....Word
> processors, spread sheets, email, power point,
> etc..Computer phobia and mouse dislexia are not problems here.
>
> Well, that understates their knowlege a tad. They do know about
> representing data as tables of rows and columns and have some intuition
> about indexes and most can probably peck out "Select * From sometable
> Where somecol=constant"

[Quoted] 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] 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

[Quoted] 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.

[Quoted] 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.

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Mon Nov 24 2003 - 02:10:01 CET

Original text of this message