It is essential to understand the basics of an entity-relationship diagram (ERD). ERD is a structural diagram that is used in designing databases.
ERD shows the relationship between the two or more entities. A typical ERD consists of shapes like rectangles and lines of different styles. ERD can represent one – one, one – many or many-many relationship. ERD is beneficial when creating new implementation or designing a new custom functionality.
When designing new functionality, first create ERD, then actual design and development can help you identify the relationship between different entities and possible related scenarios and limitations. When working on enhancing or maintaining any feature, ERD can help understand how existing integrations are working.
The basic terms in ERD are:
- Entity: It is same as a table in the database which is used to model business data.
- Attributes: It is same as a field which holds a single value in an entity.
- Primary key: Dynamics 365 has GUID value which uniquely identifies a record.
- Relationship: It shows how two entities are related to each other. A relationship is either 1:N, N:1 or N:N.
Tools
- Metadata diagram tool: It is used to generate entity diagrams and detail of an entity.
- UML Diagram Generator: A tool for XrmToolBox that generates a diagram in the form of PlantUML files. The result is text-based files which can be manually edited and stored in source control.
- Entity Relation Diagram Creator: A tool for XrmToolBox is a tool that helps to generate a diagram from metadata.
- ERD Visio Builder: A tool for XrmToolBox that generates Visio diagrams from the metadata.
Example of entities and ERD