DB Naming Conventions

Hi All

I’m just starting out with PHP/Yii (I’m very impressed with the Yii framework so far) and have a few questions.

I understand that I should refer to tables in the single form and call all primary keys id? What difference does it make? e.g. having a users table say, with PK of user_id.

Is there anything else I need to bear in mind while designing my db? I’m using MYSQL innodb tables with foreign keys defined.

Thanks

I don’t know what is the best practice (if there is one).

What I do is to give to each table a primary key int autoincrement and foreign key to related table.

That’s all.

I do have all my PK as ‘id’ autoincrement integer, and for foreign key, modelclassId integer… but, that is up to everyone I guess