Module 5 – Database and PHP

Why MySQL?

MySQL is the world’s most popular open-source database. With its proven performance, reliability and ease-of-use, MySQL has become the leading database choice. The technological choice for MEB is MySQL.

MySQL is a relational database, in that it allows tables to be joined together and also supports the concept of foreign keys. Most programmers are already familiar with MySQL, so this module will not cover all aspects of the database. You will find several tutorials on the subject on the web.






MEB database

MEB database has several relationships between the tables, which is illustrated by the following diagram. It’s possible to relate the tables directly in MySQL but the technology choice for the database is to JOIN the tables when it’s needed in the model. The performance is better and the management of the database is easier.

The most popular tool for administration of the database comes with your local server, it’s phpMyAdmin. A more powerful tool is MySQL Workbench, free from Oracle developer, the schema at the right was done with Workbench.


MySQL and CodeIgniter

CodeIgniter comes with a full-featured and very fast abstracted database class that supports both traditional structures and Query Builder patterns. The database functions offer clear, simple syntax.

The configuration, the connection, queries, insert, update, delete are all controlled by the framework. You can have the details in the user guide of CodeIgniter or upload this document with examples from MEB.

PHP language

Codeigniter is a PHP framework so you will have to use PHP language in the development of your application. For some details about PHP and the commands of this language, you can go to PHP website.

If you are a programmer but not that familiar with PHP, I would suggest some exercises with w3schools.com website. This site brings together in one place most of the languages that you will have to learn to complete this project.