database columns and foreign key normalization database columns and foreign key normalization database database

database columns and foreign key normalization


the naming convention of database, tables, columns, keys, foreign keys has nothing to do with the database normalization.

although, i recommend to keep the same naming convention structure everywhere. all my names are pretty standard, single word or if it's a phrase it's separated by underscore, no numbers nor special chars. same for columns, keys and fk (with exception with number) and i always use plurials (its rare you only have 1 db, 1 table with 1 column and 1 row)

here's what i do:

databases: companiestables: clients, clients_products, productscolumn: id, name, address, citykey: nameunique key: name

this way when you query your data, it's very clear what you request or what you look for.


is naming a database.table.column part of the database normalization?

No. Loosely speaking, normalization has to do with increasing data integrity by restructuring tables based on identifying certain kinds of dependencies among attributes.

The names of tables and columns are your API.

ISO 11179, Information Technology—Metadata Registries (MDR), is an international standard for representing metadata in a registry. Although it's aimed at semantics, not tables and columns, a lot of database designers use it as a guide to naming tables and columns. In large organizations, it's really valuable. (Functional dependency, which is part of normalization, is a semantic thing.)

You might find it useful to explore the difference between a table name and an object class. (Object class in this sense has nothing to do with object-oriented programming. It's a technical term in ISO 11179.)

A review copy of part 5 (PDF), Naming and Identification Principles, is available online. Wikipedia might be a more enduring reference. (Might not.)