>>. Name things with nouns and actions with verbs. <<
You got that part right
>> Names should be singular. A table holds many records [sic], but they are used one at a time. <<
Not in a RDBMS! SQL is a set-oriented language and rows are nothing like records. This was an old Military Standard that is being replaced. Since a table (which is nothing like a file) models a set, the data element name needs to be a collective noun (Personnel , not Employee) or a plural if there is no collective name.
>> If a table name describes one record [sic], references to columns [sic: records have fields, not columns] will read better (i.e. agent.name). <<
You are mixing RDBMS and files together and have not read ISO-1179 yet.
>> Records [sic] are acted on one at a time, so procedure names should be for a singular action. Plurality does not add anything and interfere with code readability. <<
Actually, collective and plural names are very useful in SQL. I can have a table and column with the same name in SQL -- bad programming, but legal. The collective noun lets me think in terms of sets and not single entity processing, like I would in a file.
>> Prefixes or suffixes can be used to group objects without making names extremely long (i.e. "f" for finance or "s" for sales). <<
Why are you worried about length? SQL allows 128 characters in a name in the major products. Short abbreviations get confused easily -- is "P_" for "Personnel" or for "Products"?
>> Sometimes, subgroups are useful (i.e. "ar" for accounting receivables and "ap" for accounting payables). Using and underscore ("_") after a prefix or before a suffix makes them stand apart from the name. Thus, the prefix or suffix does not need to be a fixed length to define it. <<
Underscores do work and you can measure the eye movements involved. camelCase and Hungarian Notation do not work.
Everything else that is put into the name identifies the type of object or restricted use.
>> The context will usually identify the type of object to a programmer. Identifying the object in the object name usually states the obvious. For example, "select name, street, city, state, postal_code from customer, address where fk_customer =
customer.pk_id". <<
The goal is to have data element names be context-free!! That is the reason for a Data Dictionary! You are still writing COBOL file descriptions. Even worse; " fk_customer = Cutomers.pk_id " gives the same data element TWO DIFFERENT NAMES!! Then the prefixes (ISO-11179 uses postfixes, by the way) tell us HOW something is used locally and not what it logically is. Also, think about what a "pk_id" would mean; an identifier has to identify a particular kind of entity. There is no such thing as a magical, universal "id" floating by itself in a valid data model.
>> Putting "col" in name, street, city, state, or postal_code adds nothing. <<
Sorry, wrong again. These are attributes and they need to be particular attributes in the data dictionary. Is it "state_code" , state_nbr" or what?
>> Likewise, putting "table", "ta", "tb", or some other code in name or address provides nothing. The context identifies the columns and the tables. <<
They are stupid for another reason -- they are the implementation method and have nothing to do with the logical data model. When I see "vw-" prefixes, I think of "Volkswagens";
>> The prefixes, "pk" for primary key and "fk" for foreign key, identify the columns according to use. This kind of key identification should only be used if the columns are constrained as keys. In this case, there may be multiple addresses for each customer. The primary key is unique. The foreign key is not unique but must exist in the parent table. Composite keys could be identified with a prefix of "ck". <<
Absolutely wrong and a horrible way to screw up your data dictionary! Do you change your name (or DNA) every time you walk into a new room? You are telling me what a data element does in one table; usage is not identification. I want to know what it is in the logical data model and want it to have one and only one clear name.
>> Packages, procedures, triggers, and sequences should be documented so that a programmer will know how to use them without reading the code. Therefore the name does not need to identify the type of object. A package is a group of objects and should be named with a noun. Procedures and triggers take action, so they should be named with a verb. <<
Now we are back to classic Software Engineering for procedural code. What you described is the old COBOL file system approach to ADP, not how we do it with RDBMS and data modeling.