It is my understanding that MySql's ISAM does not support relations. However, if you create your tables with the INNODB engine, you can define foreign keys.
It is also supported by SQLite, however. The Yii blogs tutorial shows an example of defining relations at the database level.
In that case, Gii dutifully creates Models with the relations predefined (or better: taken from the database).