Inside the Calculators – Part IV – MySQL
As I mentioned in the prior post in this series, my first few versions of this website and its workers’ compensation calculators did not use MySQL. The initial versions of this site only saved information – which meant I only had to use PHP to open a file on the server, add an extra line of information, and then close the file. This had several problems:
- Once my website became more popular, it was not uncommon to have more than one user online. That meant the server tried to open the file – but couldn’t since it was already open. This caused the program to freak out.
- In order to view just a little bit of information, I had to download the entire file. This got crazy pretty quickly.
- Each time the file got larger, it would take slightly longer to open, append with more information, and close.
MySQL is an incredible tool for storing, organizing, and retrieving a large amount of data. Like PHP, it is also open-source. This means it is:
- Well supported. There are lots of online resources and books to help you learn.
- Secure. Lots of people spend a lot of time thinking of ways to prevent security vulnerabilities.
- Customizable. You can configure or even rewrite it, if you wish.
- Interoperability. You can save it to just about any format – including MS Excel spreadsheets.
- Free. Unlike Oracle or any of the MS alternatives, it is totally free.
So, why did I avoid MySQL? I didn’t want to have to learn a whole new programming language. I had to learn how to set up a database, tables within the database, how to search for information in a table, how to put information into a table, and how to change information which was already in a table. There was a lot of trial and error. I ended up doing some pretty cool things in the process of learning this language. Some examples:
- Teaching others some of the basics of MySQL
- Writing a program for cataloging books
- Writing several programs which performed various calculations to track invoices, billings, etc
- Setting up several blogs/websites
The end result of learning this language is a more interactive website. One of the last incarnations of this site was a version that would show different color schemes, advertisers, and messages depending upon the user. All of this was made possible by large amounts of data stored in MySQL.
Thus ends my technical overview of my workers’ compensation permanent disability calculators! If you have any questions, please feel free to email me or leave a comment below!