Using SQL with MySQL

"Stimpy hated procedural programming. He liked programs to form one unbroken wodge of source, with a minimum of annotation.

All variable names had to be prefixed with 'THE', as in 'THE_ITEM_COUNT', 'THE_VAT_TOTAL'. The coding (all done under DOS) had to take place in a 40-column window. Minimum tab size for any indentation was 10 characters. John often wondered what planet Stimpy was from." —Unknown


In our experience, many tutorials cover the use of databases, and many cover how to access databases from various coding languages. The problem is it tends to be one or the other. The aim of this chapter is to familiarize you with how to use the database app MySQL, which is available free for nonprofit use. Of course, it is possible for other database apps (such as Access, Oracle, etc.) to be used in Java, but MySQL is relatively easy to install and access. It is also becoming one of the most popular in the development community.

In this chapter, we will cover how to install and use MySQL so that in the following chapter we can use it in conjunction with JDBC (Java Database Connectivity) to allow storing and retrieving game-related data in our Java applets/apps.