Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

What is best practice for naming dbs, tables (collections) and fields among DBMSs?

I mean casing style, for example AaaBaa,aaa-bbb, aaa_bbb, AAA-BBB, aaaBbb, ...

I think if one exists it should be applicable to all DBMSs (MySQL, MongoDB, Oracle, ...), shouldn't it?

Currently I thing following is most appropriate:

Columns/Fields/Tables/Collections/Databases: aaaBbbCcc.

Could distinct case style for these object be useful at all?

share|improve this question
    
In my opinion, there can be no objectively best practice with regard to object naming. Conventions, company policies, yes, a universally best choice, no. –  Andriy M Nov 11 '12 at 12:31
    
There might be a general agreement on what to avoid using, though (like e.g. aAAAbBBB, perhaps). –  Andriy M Nov 11 '12 at 12:35

1 Answer 1

It all boils down to personal preference and consistency within your team (or just yourself). Nothing worse than seeing different styles mixed.

As for SQL Server, be mindful of sp_yourProcName, as "sp_" prefix for a stored procedure can do funny things (read more about this from Aaron Bertrand).

Consistency is king. Make your choice and stick with it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.