<< Back to Dashboard

Contents

Database Naming Conventions

A naming convention is important when working with databases in order to provide a clear structure and format; especially in team environments. By using these conventions the database can be understood by anyone applying these conventions; thus increasing maintainability. These are not rules but guidelines that can be adapted to any working environment.

General Conventions

-- DO THIS --
users
permisions
userPermissions

-- NOT THIS --
Users
Permissions
User_Permissions
user_permissions
 -- DO THIS --
 blog_users
 blog_userPermissions
 
 -- NOT THIS --
 BlogUsers
 BlogUserPermissions
 Blog_UserPermissions
-- DO THIS --
HTTPRequests
savedURL

-- NOT THIS --
http_requests
httprequests
savedurl
saved_url

Table Conventions

-- DO THIS --
blog_user
blog_page
person
box
activity

-- NOT THIS --
blog_users
blog_pages
people
boxes
activities
-- DO THIS --
lookups_countries
lookups_states
lookups_regionalOffices
hr_employees
hr_salaries
is_employees
is_vacationDays

-- NOT THIS --
LookupsCountries
lookupsStates
LOOKUPS_RegionalOffices
HREmployees
ISEmployees
ISVacationDays

Column Conventions

-- DO THIS --
userID
userPermissionID

-- NOT THIS --
id
userid
upid
-- DO THIS --
FK_userID

-- NOT THIS --
fkuserid
userID
-- DO THIS --
isActive
isSold

-- NOT THIS --
active
sold
-- DO THIS --
createdDate
updatedDate

-- NOT THIS --
date_created
date_updated

Index Conventions

Views Convention

Related Guides

category Categories: