Project: Building a database class
When you are new to a project or just unfamiliar with a database, getting up to speed on the oral tradition of your team and (all too frequently) sparse documentation can be quite frustrating. In such instances, being able to access the technical information for a database can be quite helpful. The project for this chapter is therefore to build a database class that gives you easy access to metainformation for a database of your choosing.
As we have seen, MySQL results are not always easy to read in the aggregate. Therefore, we will also need code that will digest the results and output them in human-friendly format. The specification points for this project are thus:
Develop a class to access MySQL metadata
Return metainformation on a specified database using the class instance
Reformat tabular information to be more friendly to human readers
Print out a report of the information
We will save the boiler-plate code of creating the connection and checking the...