Posts
19
Comments
28
Trackbacks
1
May 2005 Blog Posts
Naming Convention in Tables, Stored Procedures, Views, and UDF's

I would like to share my standard naming practice in MSSQL. This naming convention wouldn't be only good for the eyes but its purpose mainly is to know what the SP,View, or UDF does by just looking its name, also to easily access all related objects.

Tables: Use a noun, instead of using an underscore just use Pascal Case Naming just like in .NET.

1. CustomerProfile - table for Customer's Profile

2. Customer - table for Customer

3. Account - table for accounts

Stored Procedure. In SP names I use noun + the purpose of the SP.

1. CustomerProfileInsProc - sp for inserting operations in CustomerProfile Table

2. CustomerProfileUpdProc - sp for updating operations

3. CustomerProfileDelProc - sp for deleting operations

4. CustomerProfileSelProc - sp for selecting operations

Views:

1. CustomerProfileListView - list of customer profile

2. CustomerAccountListView - list of customer accounts

In UDF use verbs + camel casing

1. getTotalCredit

2. getLastLogin

3. computeTotalProduction

posted @ Tuesday, May 31, 2005 10:27 AM | Feedback (4)