Naming conventions play a critical role in governance, as they provide a standardised approach to naming and organising data. A well-defined naming convention helps organisations maintain consistency and clarity in naming their data assets, which can improve the overall quality of data management and increase efficiency. In addition, having a clear and consistent naming convention helps reduce the risk of errors, misunderstandings, and inconsistencies, which can lead to data security breaches.
In addition, it helps simplify data search, retrieval, and management, allowing organisations to make informed decisions based on accurate and up-to-date information. Therefore, a naming convention is essential for maintaining data governance and ensuring that data remains well-organized, accurate, and secure. By establishing and adhering to a naming convention, organisations can ensure that their data remains consistent and meaningful over time, leading to improved decision-making and increased organisational efficiency. The best practices for Dataverse naming standards will be covered in this article to help you manage your data more effectively.
Why is having a naming convention important?
A naming convention is a collection of rules and recommendations for naming and arranging data for your solution. Using a naming convention permits you to:
- Make sure that data is named and organised consistently so that it is simpler to search for, find, and manage data.
- Reduce errors, misconceptions, and data inconsistencies to raise the quality of the data.
- By making it simpler to locate, manage, and safeguard access to critical data, data security may be improved.
A general set of guidelines:
1. Simple and descriptive
Simplicity is vital when it comes to naming conventions. Descriptive names that clearly indicate the contents of a database or file are much easier to understand and work with than names that are complex or difficult to decipher.
For example, a table named "email_configuration" is much easier to understand than one named "emailConfig" or "ec"
2. Use a consistent format
Effective data administration depends on names that are recognisable and consistent. The names you select should be consistent across tables and columns in your Dataverse and reflect the contents of the corresponding tables and columns.
For example, if you have a table named "customer_data", all related tables, such as "order_data" or "payment_data," should be named similarly.
3. Use meaningful prefixes and suffixes
Using meaningful prefixes and suffixes can help distinguish between different types of data and provide context. For example, you can prefix or postfix all date time fields with "DateTime" to identify the data type.
4. Use abbreviations wisely
Abbreviations can make names more concise, but they can also make them less meaningful. When you use abbreviations, please choose ones that are widely recognised and commonly used in your industry. Similar to the example in #3, "DateTime" or "dt" is recognised as a date-time abbreviation in the programming world.
5. Avoid using reserved words
Reserved words are words that are used by the Dataverse for specific purposes and should not be used as names. For example, in Dataverse, the reserved words include "table", "field", "record", and "view".
Dataverse specific guidelines:
1. Publisher Prefix
Every table in the Dataverse is prefixed with a publisher, so create a meaningful publisher prefix.
For example: If you are working for a client, be mindful to ask if they are okay to use the vendor company as a publisher or if they would prefer using the client company name as a publisher prefix.
- Using vendor (in my case, it would be TP for Telstra Purple) as a publisher allows one to identify which Dataverse tables/resources are created by which vendor.
- It is essential to make this decision at the start. Later, if you decide to change the publisher, then there is no way of renaming the publisher prefix on a table that was created under a different publisher. You will have to re-create and re-link all the tables again in your application.
2. Solution
Use the solutions from the start and keep adding resources to the solution. For better maintainability, you can divide the solutions into two types:
- Application specific solution: This will contain all the resources specific to a single application.
- Shared data solution: This solution will encapsulate the tables used across multiple solutions. This is to mitigate your dependency issues. First, you migrate the Shared data solution to your staging or production environment then you can migrate the individual application solutions.
Define a meaningful solution name prefix for your tables. This will allow one to identify which table is a part of which solution in the sea of Dataverse tables.
3. Special characters and spaces
Avoid using numbers, spaces or underscores and prefer PascalCase. This is due to the ease of use of these tables in the Power Automate or Power Apps, as they tend to replace spaces and underscores with something similar to this x0xx00, which is very annoying when you are trying to find a table in the app or flow.
4. Capitalization
To deliver consistent solutions across the organisation, you can set a governance agreement to capitalise all initials or acronyms.
5. Spellings
We now live in a global village, and there might be scenarios when you are working for an organisation with different language constraints. So, it is essential to understand which spellings should be used while naming solution components. It could be US English or UK English.
6. Tables
When naming tables in a Dataverse, it's best to use two or three meaningful and easily understandable words. Additionally, it's crucial to add descriptions when creating tables to help maintain applications. Using singular names for tables is recommended, as plural versions can be generated but modified later. In Model Driven Apps, consider using table icons for visual clarity.
7. Columns
When naming Boolean columns, use "Is" or "Has" to make it meaningful and easy to understand. Avoid using double negatives in the name, such as "isNotAvailable".
For primary keys or identifiers, it's essential to agree on a naming convention, either using a prefix or postfix, with "Id" being the most common postfix (e.g. "UserId").
For every date and time field, include the keyword "DateTime" in the field name. If you have code referencing tables, it is helpful to postfix the names with "Code", such as "PinCode". Unless it is a generic type, there is no need to add the type to the column name.
When creating lookup fields, choose meaningful names that clearly convey the relationship between tables, and postfix the lookup field names with "ID". In addition, be aware that lookup columns do not retain state and should not be used if you intend to capture the state of a record.
Finally, instead of using choices, opt to use tables, as choices do not allow for permissions to be set.
Conclusion
To sum up, naming conventions are crucial in data governance as they offer a standardised method for naming and organising data. A clear naming convention ensures that organisations maintain consistency, accuracy, and clarity in naming their data assets, thereby reducing the likelihood of errors, misunderstandings, and inconsistencies.
Click here to read more about the Dataverse's best practices.
Reach out and book a free consultation with our experts to bring your ideas to life.