Hello,
You might ask yourself, is my naming style really that important for my database? The answer is a resounding yes.
But what exactly is a naming convention?
Foundationally, a name is used to identify anything—be it a person, animal, place, or thing, as we all learned in primary school. In the context of databases, names serve the vital role of identifying entities and data elements within a database, data warehouse, or data store.
From my experience consulting with international organisations, I’ve seen firsthand how inconsistent naming can create chaos for data analysts and other related roles. This inconsistency can limit trust in the data, both among internal stakeholders and external clients.
Impact lives by mentoring on Semis today!
Naming conventions are more than just a best practice—they are crucial for maintaining the quality and efficiency of your database systems. Proper naming helps ensure:
1. Consistency: A uniform approach across your systems makes it easier for teams to understand and manage the database.
2. Search & Discoverability: Well-named elements improve the ease of searching for and identifying specific data entities.
3. Uniformity: Adhering to a naming standard helps maintain a coherent structure within the database.
Different programming languages may have their unique twists on naming conventions, but the overall goal remains the same: to use a standard that ensures clarity and uniformity. Let’s explore some common approaches to naming variables and data entities.
Common Variable Naming Conventions
Schema vs Table vs Column Naming
Schemas
Traditionally most schemas make use of the flat case
name convention style as in;
Schema name: customers
You can see that the word "customers" uses small letter cases all through. This pattern should be maintained in the database system to maintain uniformity.
Tables/Columns
I've come across numerous databases where tables are named using different patterns. Often, your tables and columns may consist of more than one word. For example, consider a table that represents users in different geographical locations:
Table name: customers_africa
customers_europe
customers_americas
customers_asia
customers_austrialia
The above example uses a snake_case
naming style, where words are combined with underscores.
Please note: If you choose a different naming convention, ensure that your team maintains uniformity in naming both single and multiple-word entities. This consistency is key to maintaining data quality across the board.
The Bottom Line
Always keep the end users in mind when creating models as an engineer; thinking from their perspective helps ensure high-quality data and code.
If you need a data quality engineering consultant, feel free to get in touch.
Kindly share this post with your tech community—let’s make a broader impact together.
We are enlisting 1000 data & AI mentors on Semis, let’s spread the word!
References:
https://dev.to/ovid/database-naming-standards-2061
https://hardiquedasore.medium.com/different-types-of-cases-in-variable-naming-convention-2741788f1a7f
https://www.sqlshack.com/learn-sql-naming-conventions/
https://blog.stackademic.com/comprehensive-guide-to-programming-naming-conventions-ec179a89d4b7
https://www.lytho.com/blog/naming-conventions-importance/