General database design / code question

When I design a database i prefer to stay away from certain table names and certain column names so in general i would avoid using a column name of id or value etc.

on the same subject I avoid using duplicate names in different tables, especially where those tables might ever be joined to form a larger query, so I do not name things like tel, phone, fax, email etc.

If I gave a simple example lets say I have a video store called Pauls Videos and I wanted to keep track of all videos out and returned, customers, accounts, etc. I will just give a simple example.

Table 1 Name: pv_movies - I prefix with pv for pAULS vIDEOS
pv_movies Column Names: pv_m_id, pv_m_release_year, pv_m_movie_title - I add prefix m for mOVIES

This way i ensure i never have any duplicates and never use any name that might be designated for something else. It also means I never land up joining multiple tables and having to alias a whole bunch of column names.

My question is, is the way i do this, clever, dumb, or just unnecessary, if I had a table called id, or a column called id and i have multiple tables all starting with the PK being called id, is that wrong, right, will it cause trouble down the line.

Community Page
Last updated: