MySQL

  • MySQL is a language (or set of tools) that interacts with a relational database.
  • SQL is Structured Query Language
  • The way it works:
  • You create a database with N columns (of any type) -- imagine a listing of people in this room, their heights, their ages, and whether they are left- or right-handed
  • You can then query on the database like this:
  • %> SELECT name FROM table_name WHERE name LIKE 'trill'

  • You can do lots of complicated things here. You can update certain values
  • %> SET handedness = 'left' WHERE name = 'trilling'

  • MySQL is used a lot for web stuff, for database administration, and for many different kinds of science applications.
  • Naturally, Perl and Python (and PHP, Java) interact with MySQL with a lot of canned routines.

  • Check out Wikipedia and mysqltutorial.org.

    Shell scripting

  • Shell scripting is kind of a catch-all term for putting a series of commands into a single executable file.

  • An example.
  • How do we use this file?
  • %> chmod +x example1.sh -- first make it executable
  • %> ./example1.sh -- then simply execute it

  • You can use variables in shell scripts too.
  • Another example.
  • %> chmod +x example2.sh -- make it executable
  • %> ./example2.sh trilling -- did it work?

  • There are lots and lots and LOTS of other things you can do with shell scripts.
  • For example, you can do loops, conditional statements, math, and so on.
  • And of course, you can have shell scripts call other shell scripts, etc.

  • Here's a good reference.