What is the best practice in naming your "user" table?

Use a synonym. What word to use depends on what exactly you store in the table, but account strikes me as a good alternative. If you want to use a variation user I'd break the first guideline you mention, not the second or third: users is common enough that the inconsistency is essentially mnemonic.


I typically use something like member or account, depending on the application. That said, if you're using modern design tools and principles (e.g., a db abstraction layer or ORM with an object-oriented code base that separates business logic from data access), then table naming becomes fairly irrelevant. Your developers should only ever be accessing the database through a well-defined interface and not by hand-writing SQL that requires them to know the table name. For example, you could name the table account but map access to it via an object named User. Your developers shouldn't be thinking in terms of tables, but in terms of access objects, which aren't going to have the same restrictions on naming:

$user = new User($username);
$user->authenticate($password);

I agree, do not use any reserved words, or quoted or bracketed or escaped forms of reserved words.

Name the User table Person.

You may be interested in this answer and google for the ISO standard 11179 for naming Guidelines


I use CakePHP rules even when I don't use the framework :

Table names are by convention lowercase and pluralized with multi-word table names separated by underscores. For example, a Model name of Ingredient expects the table name ingredients. Model name of EventRegistration would expect a table name of event_registrations.