Best practices in Data Model
Design the Data Model using a standard naming convention for the entities and for their attributes. Follow the performance guideline for an efficient Data Model.
Use Upper Camel Case
After the prefix, use Upper Camel Case or Pascal Case for the name of the entities and their attributes. Upper Camel Case is a practice of writing compound words with the first letter capitalised and no spaces or punctuation. (e.g ThisIsAnUpperCamelCaseExample)
Entity name convention
Entities names should clearly describe the information it contains and the prefix should specify its type and scope. Don’t use short names or abbreviations. Use Pascal Case.
Use m for Master entity type or p for Parameter. Use the process abbreviation as a prefix when the entity scope is Private (the entity is used within one process). The scope of the entity can also be Public when it’s used in more than one. In this case, don’t add the prefix.
Entity | Type | Scope | Name |
---|---|---|---|
Order | Master | Private (used by the process Shipping Order) | mSHOOrder |
Status | Parameter | Private (used by the process Shipping Order) | pSHOStatus |
Country | Parameter | Public (used by several processes) | pCountry |
Attribute name convention
The attribute name should have less than 15 characters (including any prefix it may have). Use singular names for them, though use plural names every time you use collections (e.g xRequests, xCustomers, xDocuments).
Attribute type | Prefix | Example |
---|---|---|
String, Extended text | s | sComment |
Boolean | b | bActive, bAvailable |
Integer, Big Integer, Small Integer, Tiny Integer |
i | iAge,iItemCounter |
Currency | c | cSalary, cDiscount, cPrice |
Float | f | fRate, fDiscount |
Real | r | rGreatDistance |
Date – Time | d | dBirth, dCreated |
File | u | uPhoto, uAttachment |
Image | img | imgProfile |
Entity | km, kp (km for master, kp for parametric) |
kmOrder, kpStatus |
Collection | x | xElements, xRequests |
Design princiles
-
- Define the data model promoting objected-oriented design.
- Avoid connecting all entities to each other.
- Use scope attributes when applicable.
- Use Master and Parameter entities adequately.
- Use Data Virtualization or Data Replication when applicable.
- Define which information should be managed in the Production environment.
Performance guidelines
-
- Use an adequate size for text attributes.
- Create entities with 30 attributes or less.
- Define business keys for Entities and promote their use when searching for records.
One Comment
Business process design using best practices - Bizagi
[…] Data Model […]