SQL & MySQL Jeff Siarto - TC 361
What’s the Difference? • MySQL is a database • SQL is a language to interact with the database • SQL is used with other databases: Access, Oracle, Portage SQL, MS SQL, etc...
MySQL • Open source database • Multi-platform (Windows, Linux, UNIX, Sun/ Solaris, Mac OS X) • Fast, reliable, built-in support for server technologies like PHP
SQL Basics • SELECT, FROM, WHERE, ORDER BY • SELECT some_field FROM some_table WHERE some_field = “someVariable” ORDER BY some_field; • Simple SQL queries are formed with just four clauses. • SQL is “spoken”
PHP MyAdmin • Powerful, FREE (open-source), GUI for MySQL • Completely written in PHP (cross-platform) • Accessed through a web browser (Safari, Mozilla, IE) • Most common GUI for MySQL (especially with web hosting companies)
Practice • The name and city of all vendors whose zip code begins with a 4. • A listing of all product ID’s that cost over $5.00. Sort by price from highest to lowest.
Really Hard Practice • List all orders that were placed by Village Toys. Include the customer name and email along with a description of what they ordered. • *HINT* You MUST use multiple JOINS to answer this question.
Recommend
More recommend