demosthenes.info

I’m Dudley Storey, the author of Pro CSS3 Animation. This is my blog, where I talk about web design and development with , and . To receive more information, including news, updates, and tips, you should follow me on Twitter or add me on Google+.

web developer guide

my books

Book cover of Pro CSS3 AnimationPro CSS3 Animation, Apress, 2013

my projects

CSSslidy: an auto-generated #RWD image slider. 1.5K of JS, no JQuery. Drop in images, add a line of CSS. Done.

tipster.ioAutomatically provides local tipping customs and percentages for services anywhere.

Introduction to MySQL

mysql / introduction

Estimated reading time: 2 minutes, 8 seconds

My Widenius
My Widenius, the inspiration for the name MySQL.

MySQL is one of a number of popular website database solutions: other options include PostgreSQL and Firebird. The popularity of MySQL stems in large part from the fact that the database system both free and open source, and has strong community support. Most web hosting providers supply MySQL as the default database system for sites.

MySQL (pronounced either as “My SQL” or “My Sequel”) was developed by Ulf Michael (“Monty”) Widenius and David Axmark. “SQL” stands for Structured Query Language, the language in which its databases and tables are created, modified, and manipulated; the “My” is for Michael’s daughter. While the company originally formed to promote MySQL has undergone several mergers and acquisitions, and while there is a commercial version of MySQL available (used in high-demand sites such as Wikipedia, Facebook, Google, Flickr and Twitter), the open-source version is free, and always will be.

There are many tools for interacting with MySQL data, including the MySQL Workbench for Windows, Mac and Linux, but the most common encountered by web developers is phpMyAdmin, which is built into many web hosting packages and servers.

One of the primary advantages of SQL languages is that simple database queries are written in a very human-readable way. For example:

SELECT * from camels where humps = 2 ORDER BY species

In this case, the query could be translated as “Select everything from the camels table that has a value of 2 in the humps field and provide the result in alphabetical order using the species field.”  As a result, Bactrian camels would be listed first (not that there are any other surviving two-humped camel species).

Database-as-language

One aspect of MySQL that can be confusing at first but valuable once grasped is that the language is the database; every action taken with the database is written in MySQL, as is the database itself. (Take a look at some of the printouts of the MySQL activity as you press buttons in phpMyAdmin, for example, or read an exported MySQL database as text).

comments powered by Disqus

This site helps millions of visitors while remaining ad-free. For less than the price of a cup of coffee, you can help pay for bandwidth and server costs while encouraging further articles.