Thursday, May 13, 2010

Creating With Computers (Part IV)

As we turn to more and more web based applications, the importance of a databases to store content used by the application becomes more and more important. Google Docs essentially is one very large database. When you log in to your Google Docs account, it pulls information in its database that is related to you and displays it within a template window of your web browser. Clicking on one of the documents in the documents list, you have previously created in Google Docs, results in another call to the Google database and this time returns the content related to the title of the doc that you clicked on. My little student reading application will mirror this type of database operation, but instead of displaying the information in a web browser window, it will display the information in a custom application. Understanding how databases work with computers will be a central skill as we move forward in developing our ability to control computers and use information constructively.

My experiences with databases and computers stems primarily from my work with setting up content managements system and blogs. Applications such as Mambo/Joomla, Moodle, and WordPress use databases to store content. Each of these applications use a database called mySQL. MySQL started out as an OpenSource database application at approximatly the same time that the Apache web server software was released. These two applications have supported a great deal of innovation that has been developed on the world wide web beginning in the mid 90's. In any case, my experience is pretty limited and my point is that with just a little knowledge you can begin creating something that takes advantage of a backend database to support a custom application.

In developing the mySQL database for my application, I used a mySQL application running on a hosted service called On-Rev. On-Rev is a relatively new service provided by RunRev, the makers of the application development tool I am using to create this student program. There are many benefits to using the On-Rev service with Revolution, however what I'm about to describe can be achieved with any hosting services that provides the mySQL database application. The mySQL database is primarily controlled via the command line. What this means is that there is no primary graphic user interface for the mySQL application. This was done on purpose to maximize performance capabilities of the database application and to conserve valuable microprocessor cycles to server your data and not a "pretty" user interface. Fortunately, there have been a number of "front ends" to the mySQL database that provides a more graphic user interface for manipulating the database (for those of us that have grown up clicking a mouse). The application I will be using is called phpMyadmin and it is a web based front end to the mySQL database. Using this tool you can easily create new databases, new tables within the database, and new fields to store your information within those tables. If you choose to use a mySQL database hosted on a commercial services provider, such as On-Rev, there is a good change that the phpMyAdmin tool will be available to you for manipulating the mySQL database.

For my student reading application, I decided to develop four tables within the database. Each table went with a particular component of the student reading application.
When developing your database, it is important to spend quality time thinking about all its pieces and how they will interact with your application. It is much more difficult to make changes to your database after you begin to create the actual desktop application as any new changes made to the database could have unforeseen consequences which will take time to decipher and fix in the desktop application. As with most things, careful planning upfront is crucial to eliminating difficulties later.

In the next part, I will begin sharing how the student desktop tool is going to be created and how the desktop tool exchanges information with the remote database.

No comments: