HOTVAMPS:

Jenny McCarthy
THE SQL VIRTUOSO
A long script that lets you excercise on SQL queries as a piano virtuoso would daily practice scales. Cool idea, isn't it?
 
You are presented with records, each of them asking a query, then a text field where you can write down your query guess, and you can then check if you were wrong or correct, and once finished you can generate reports on the checks you performed on your guesses.
Optionally you can even shuffle the order of the queries!
You can have tips as well, and you're provided with the cell names or table names you'd use, although the scripts check for full wording compliance only on SQL keywords (which is cool).
January 2003
{ @ }

The model above is Jenny McCarthy
LOADS OF JENNY MCCARTHY ON THE NET


THE PURPOSE OF THIS SQL HOTVAMP
How this file can be used: learn a few things on its inner workings, then use it!

Best viewed listening to «Underneath Your Clothes» by Shakira

TEMPORARY : ALFA VERSION

This file has been uploaded because given the high amount of work it was too delayed. It is functional and the layout is definitive but I still have to add about 80 or 100 more queries on joins in the next days. Thank you for your understanding, I do all this alone!
If you don't know what SQL is, probably you'd wonder why you should use this file.
But if you know what it is, this file is going to be one of your best friends.
Certainly, it is not meant to meet the need of sql administrators or those of database analysts or designers; but it is definitely the best friend of webmasters who although do not deal with sql on a daily basis, they do deal with it from time to time: thence the need for them to keep well oiled the great deal of syntaxes it involves.
And the paradigm I was thinking of when conceiving a tool for this purpose, was the pianist paradigm.

UNDERSTANDING DIFFERENCES BETWEEN:
CLIENT/SERVER
a Jehan Legac photo
above: a JEHAN LEGAC photo

With this hotvamp you can exercise on a nearly daily basis praticing a lot of diffrent queries and sql management commands, thus keeping a basic knowledge of the Sql oiled even if you do not deal with it on a daily basis: consider this file the equivalent of piano scales to a pianist: a boring daily duty that none the less is necessary to keep your fingers ready to play the real sonatas any moment you are asked for, or you want to impress the lady...
 
The utility of this ample scripts mostly relies upon the fact that, facing a query request, you pause and think before crafting your query. It may be time consuming, although you're not supposed to practice daily on really all of these queries: the shuffle button may help you in this case, or also the Get Num button: for upon providing a number for this latter feature, the index from which the subsequent queries are listed and grabbed gets updated to such number as well.
 
None the less, the more you spend your time thinking about your query before writing it down, the greatest the effect; also, if upon checking you get an Error, you may consider selecting the do not show results automatically checkbox so that you can think over and re-craft your query without viewing immediately how the correct version would have been: this would really maximize.
 
Last but not least, the checking process (the process that checks for the correctness of your query after you have written it, that is) takes avail of a script that is not case sensitive and allows for whatever amount of whitespaces or new lines characters. Whenever possible, it also allows for cell names not necessarily identical to the suggested ones, namely whenever possible the checking scripts attempt to focus only on the keywords, regardless of typos or so in the cell names which are not keywords.
 
The form relies on regular expressions to perform such checks on the validity of all your inputs; such expressions may have occasional minor shortcomings (example: the script checks if you open and close apexes for Strings, but doesn't check whether they're both single or both double apexes: under any practical point of view, this won't affect the validity of the tool, whereas conversely this approach of leaving out the trifles, shortens the already long coding that works in the background to serve you); but such shortcomings have been crafted to minimize the impact: so on the whole the utility of this tool for sql practice is really sound, and makes it unique on the net (at least so far!).
A second and most remarkable example of "shortcoming" is that when you have to define multiple constraints, first goes the DATA TYPE, then the most important constraint, the the one depending on it, and among them the keyword named DEFAULT goes last: example:
create table fooname(foofield int primary key auto_increment default 0)
Allowing for a different order would have been possible, but would have made the scripts even longer you see: this file already contains hundreds and hundreds of lines of code just for the SQL examples.
To workaround this, just craft your SQL answers following carefully the type of requirements as they are listed in each question: moreover this way of connecting the technical version of a SQL command to a detailed request firstly formulated in strictly human terms and consequently following such terms requirements literally and diligently step after step, is the procedure that is better poised to let you learn SQL accordingly to SQL gurus like Michael J. Hernandez and John L. Viescas.
 
I also suggest to you always to read the tips (in the test form they appear in the last field at the bottom of the form itself as soon as you've clicked the button to check the validity of your query/expression).
Some maybe trivial or "petty", but a few of them are precious insofar they've been crafted after the conceptual difficulties I myself had to overcome: and such difficulties, since I have no teachers, are very likely to be analogous to yours!
If you want to print out all the tips in one popup window, just


THE SQL VIRTUOSO FORM
If you need learn or keep your SQL syntaxes well oiled, this form is going to be one of your favourite buddies.


Highlight input fields with orangish? »
Highlight result fields with green? »
Highlight tip fields with yellow? »
All pictures below by Kris Hoglund. I recently discoverd this artist and I got definitely enthusiast with his art.
The type of art that guys like him and like, for instance, Jehan Legac do is absoluetly thrilling to me. Moreover what they perform is extremely complex, for some of them are not just painters but photographers and have keen skills with photo retouching softwares as well.
If you want to experience the particulars of the pictures reproduced below in their full fulgor or you want to see the amazing galleries of surrealist paintings by Hoglund, you can find his website listed as the first one on this Google.com link.
If you are enjoying them like this, imagine full size. [Warning: there is one gallery devoted to explicitly erotic art].
Netscape 4 has a relatively poor rendering of this form: the form relies on DOM2 which NN4 does not support.

All pictures below by Kris Hoglund
KRIS HOGLUND ART ON THE NET
a Kris Hoglund photo
 
AVAILABLE QUERIES: CURRENTLY ON:
DONE: UNCHEKED:
SQL QUERY/VIEW/TASK TO CRAFT:
a Kris Hoglund photo

a Kris Hoglund photo
INSERT YOUR ANSWER BELOW [ then click CHECK IT- NEXT query click NEXT ]
a Kris Hoglund photo
a Kris Hoglund photo
[ show all  ?  » ]


 
All pictures above & below by Kris Hoglund
KRIS HOGLUND ART ON THE NET
a Kris Hoglund photo
THE CORRECT RESULT:
a Kris Hoglund photo
a Kris Hoglund photo
    [DO NOT SHOW RESULTS AUTOMATICALLY? » ]
a Kris Hoglund photo
TIP & NOTES:
a Kris Hoglund photo
a Kris Hoglund photo
 
a Kris Hoglund photo
All pictures above by Kris Hoglund
KRIS HOGLUND ART ON THE NET

A FEW GOLDEN RULES
  • When you GRANT a set of privileges, the REVOKE process works fine and perfectly (that is, removes all the occurrencies) only as long as you revoke exactly in the same way you granted: the revoking statement must somewhat be the exact opposite of the granting process.
    Thus if you granted naming a database you have to revoke naming that database too. If you granted on some columns and naming a table and a database, you do have to revoke naming those column and that table and that database... That is, granting in a detailed way and revoking in a wholesale way may not draw the consquences you expect (which arguably is the actual withdrawal of the assigned privileges).
    You may want to consider storing fixed procedures/queries in order to grant and revoke specific sets of privileges: for each granting query there must be its matching revoking query.
    For additional safety always peruse ther user table at least, and preferably also the tables_priv and columns_priv, to see whether you still have the user with that name and from that host lingering around as a record.