[NBLUG/talk] Teaching myself SQL (or trying to)

Walter Hansen gandalf at sonic.net
Wed Jun 18 00:23:32 PDT 2008


Yes try to keep the work on the database server, but don't go too nuts 
unless performance is an issue. Simple beats fast on most days. If it 
runs at midnight and takes five minutes and you could have made it more 
complex with five hours extra work and cut that down to two minutes you 
probably just wasted five hours of work.

On the other hand I just redid some indexes and cut a 5 second web page 
delay down to unnoticeable. Choose your battles well.

Jippen wrote:
> I wouldn't worry too much about the programming-language specifics of
> running SQL queries, because the query itself should be doing most of
> the work, with the app just formatting/validating the input and
> output. If you ever find yourself grabbing data from a db then using
> more than one or two if statements or loops, you should consider
> moving the effort into the SQL statement itself.
> 
> So, for learning the basics of SQL queries, you can use a basic L/WAMP
> setup with phpmyadmin running, and build some queries and see what
> happens.
> 
> 
> 
>>From here, you can grab the mysql docs (which are pretty good)
>  http://dev.mysql.com/doc/
> For perl, you will want to use DBI, which O'reilly has a nice bit of
> example code for
>  http://oreilly.com/catalog/msql/chapter/ch10.html
> And if you are creating a database (rather than just dumping one to
> play with), I recommend reading this article:
>  http://www.simple-talk.com/sql/database-administration/ten-common-database-design-mistakes/
> 
> 
> And for some of my most-used keywords (yes, I do a lot of DB work):
> DISTINCT, LIMIT, ORDER BY, GROUP BY, AS, CONCAT, WHERE
> 
> That, and the basic SELECT/UPDATE/DELETE will get you most everywhere
> you want to go with minimal time.
> 
> For more advanced queries, for performance-critical bits of code, you
> will probably want to look into JOINs and the various handy functions
> for number/date/string manipulation.
> 
> 
> Good luck!
> 
> On Tue, Jun 10, 2008 at 11:11 PM, William Tracy <afishionado at gmail.com> wrote:
>> Hello all,
>>
>> I recently found myself needing to learn SQL in a hurry, and planned
>> to do so this weekend. I just discovered that I will not be having
>> internet access this weekend. :-P
>>
>> Anybody want to recommend any SQL tutorials (ones oriented toward
>> MySQL and/or Perl would be nice) that I can download before then? I'll
>> also take recommendations for dead tree guides, but I'm probably not
>> going to get a chance to hit a bookstore before then. :-(
>>
>> Thanks, guys.
>> --
>> William Tracy
>> afishionado at gmail.com -- wtracy at calpoly.edu
>>
>> Assembly language experience is [important] for the maturity and
>> understanding of how computers work that it provides.
>>  -- D. Gries
>>
>> _______________________________________________
>> talk mailing list
>> talk at nblug.org
>> http://nblug.org/cgi-bin/mailman/listinfo/talk
>>
> 
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/cgi-bin/mailman/listinfo/talk
> 
> 



More information about the talk mailing list