Intro to databases

Typically, eventually, anyone using php will at some point use it in conjunction with a database server and in most cases, this database server will be MYSQL.

What Are the advantages of using a database server?

The advantages of a database server are multiple:

Things to be aware of when using a database server

Database servers are powerful and used well can bring awesome data crunching capabilities. It is however important to do careful planning or it may easily cripple your web app, especially on a high performance website.

Here are a couple of tips:

It is also interesting to note that in many cases (especially if the queries are simple), when a mysql server is not available sqlite can be an excellent alternative providing fast performance and small memory foot print… sometimes very easily by simply slightly changing the function names (which are very similar).

 If sqlite is used, make sure the database files are protected from unauthorized web access either by putting them outside the web server document root or with an appropriate htaccess entry.

Notes about queries