I know there are other naming convention discussions, but the ones I saw were all general guidelines, I'm asking more for advice on good practice regarding my specific case. However, if there is another question that directly covers my case, please link it and I will gladly delete this question.
I have a database for modeling electronic devices, which contains tables such as Model, Unit, Brand, Manufacturer, etc. I'm wondering what to call the column that represents the actual textual name of the instance of that entity - as in "Canon" or "HP" for brand. Obviously, I could adopt the convention to simply calling the column "name," which I did at first. But then during a select, you are forced to reference the table names to get the columns since "name" is not unique among the selected columns:
SELECT Model.name, Brand.name, FROM Model, Brand
Which is ok, but then I got to the MobilePhoneFormFactor table and the Year table, the latter which stores accumulated data on a specific year. If I force myself to use the same convention with these tables, I get:
SELECT Model.name, Brand.name, Year.name, MobilePhoneFormFactor.name FROM Model, Brand, MobilePhoneFormFactor, Year
It seems a bit weird to refer to the year as "Year.name" instead of just "year." I could make this case an exception, but then I'm already breaking the naming convention I just committed to. So I considered this alternative naming convention:
SELECT model, brand, formFactor, year FROM Model, Brand, MobilePhoneFormFactor, Year
Here the Brand table has a "brand" column that is the textual name of the brand, the Model table has a "model" column that is the textual name of the model... etc. As shown in this select statement, this approach also allows me to conveniently drop the table name prefixes for columns in most cases (if you kept the table names, you get the rather redundant "SELECT Model.model, Brand.brand, ...
").
But then what if I want to have a description field for each table? The obvious implementation is once again Brand.desc, Year.desc, just like my original approach to names. So this makes me think it's safest and most consistent to simply revert back to the Brand.name, Year.name scheme, even though it's a little weird in some situations.
A third option would be to name the columns "brandName, modelName" etc. but you might as well use simply "name" and always reference the table name in queries with "Brand.name, Model.name" in that case.
What do you think will be the best for my case? I'm not a database veteran, so I'm wondering what things down the road will make me look back and say, "it would have been so much more intuitive if I had just gone with Brand.name, Year.name" for instance.
Note: regardless of what I end up calling it, the textual name column (the natural key) is being used as an alternate key with a unqiue constraint; I'm using an IDENTITY column for the primary key.