Category: MySQL

Posted by kevin
February 17, 2010

0 Comments

SQL JOIN statements

When working with relational databases, you will often find that the data your require can reside on multiple tables. In simple terms, a join statement brings together these tables using a common identifier. Joins are the best way to query a database whilst improving transaction efficiency. An example We’ll create two tables, a users and [...]

Posted by kevin
January 5, 2010

0 Comments

Grant remote access to MySQL

If you’ve installed MySQL on a machine other than your work station (localhost) and you want to use the MYSQL GUI tools to administer the server then you’ll need to grant remote acccess on the root account (or another account that has useful privileges. This is how to do it. Connect via SSH and login [...]

Posted by kevin
December 29, 2009

1 Comments

Foreign Key tutorial using MySQL

Foreign key’s in a database table reference primary key’s of rows in another table. Why does this matter? Well, if you have ever built an application whereby updating/deleting a row from one table requires further transactions to be carried out on other, you’ll know the nuisance and confusion this can cause (especially if your application [...]

Posted by kevin


0 Comments

Introduction to Doctrine’s Nested Set

A common problem requirement among developers is to store hierarchial data to a flat file database. You have probably come across the parent/child methodology whereby a table has a typical ‘parent’ column that references, you guessed it, its parent – this method is also known as adjacency list model. Querying in this way can often [...]