Introduction to MySQL:
[ Course Materials ]
Dates (Fall 2007): [ one class in four parts ]
All classes meet from 3 - 5pm.
Wednesday, December 5th
Friday, December 7th
Monday, December 10th
Wednesday, December 12th
Organizers: Aaron Gabow (BIC, MSKCC), Manda Wilson (BIC, MSKCC)
Goals and Objectives: Provides an introduction to storing biological data in MySQL and accessing MySQL data via the PHP scripting language. The workshop will consist of both lectures and hands-on tutorials. No prior database or programming experience is presumed.
Course Overview: (each class will meet for 2 hours)
Class 1: Relational Databases and MySQL
You will be introduced to the fundamentals of relational databases and the concept of normalization. We will address the question of why we would use a relational database such as MySQL to store data instead of a simple spreadsheet such as Excel for example. To make the concepts concrete, we will introduce a sample database for storing nucleotide sequences and annotations. We will then perform some basic SQL (Structured Query Language) queries from the standard command line against the database to extract information.
Class 2: Data Manipulation Language and PHPMyAdmin
In the second class, we will build upon the fundamental concepts in the first class and users will perform more complex SQL series across two or more tables using joins and aggregation. In addition, we will introduce users to a popular web-based graphical client called PHPMyAdmin to connect with the MySQL Server and execute commands from there.
Class 3: Introduction to PHP
You will be introduced to the PHP server-side scripting language (basic syntax and commands), which can be easily used to build dynamic Web pages that represent up-to-the-moment information to visitors at your web site. We will discuss the benefits of a server-side scripting language over static HTML pages and have participants write basic PHP scripts.
Class 4: Using PHP with MySQL
After learning the basics of MySQL and PHP, we will combine the two technologies to build a small database-driven website for searching and displaying nucleotide sequences. The whole idea of a database-driven website is to allow the content of the site to reside in a database, and for that content to be dynamically pulled from the database to create web pages for people to view with a regular web browser. Finally, we will discuss some basic administrative MySQL commands that can be used to back up and check your database for data corruption. Any questions on installation of MySQL and PHP will also be addressed.