Here's three best practices I try to follow when naming tables:
Keeping all this in mind, how do you recommend naming the table that will hold user identities?
When naming tables, you have two options – to use the singular for the table name or to use a plural. My suggestion would be to always go with names in the singular. If you're naming entities that represent real-world facts, you should use nouns. These are tables like employee, customer, city, and country.
By default, MySQL encloses column names and table names in quotation marks. Table names can use any character that is allowed in a file name except for a period or a forward slash. Table names must be 32 characters or less because SAS does not truncate a longer name.
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 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);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With