AMIN’Z Database Naming Convention v.0254 April 21, 2008
Posted by aminz in Uncategorized.Tags: database, dbdesign
3 comments
Recently, I started building a database for my latest project, and as I started naming the fields I realized that I’ve never really tried my own naming conventions for tables, columns, views, stored procs, indexes, or relationships. The main goal of adopting a naming convention for database objects is so that you and others can easily identify the type and purpose of all objects contained in the database.There are millions of people making applications that use some sort of database or another, and there are several dozens of conventions which we can use to make a more well-formed database schematic. Here i put some idea and wanna share with you.May be its very simple or with some drawback but your comment make my convention more flawless
- Use a letter as the first character of the name.
- Avoid abbreviations
- Avoid acronyms
- Avoid using spaces in names even if the system allows it
TABLES
Table names are plural.I use t as a prefix of table name,like t_pationt_operations.Here i dont use Capital letter for first character of each word.
COLUMNS
Use field name as singular.
- tpo_ID_pk
- tpo_cabin_name
- tpo_doctor_name
Here tpo stands for t_pationt_operations .i use all capital letter in ‘ID’ and i suggest to use pk,fk,un to indicate primary key,foreign key,unique key.
VIEWS
same as table name but use vw as prefix instead of t




