EAR diagrams

  • 23 December 2020
  • 0 replies
  • 24 views

Userlevel 3
Badge +2

What is an EAR diagram?

An EAR diagram (Entity-Attribute-Relationship diagram) depicts which database tables, columns and relationships you have in your datamodel. Table boxes are for database tables (or entities). Text items inside the boxes are for columns (or attributes). Lines between the table boxes are for relationships:

EAR diagram

As you can see, the items for columns/attributes within the table boxes have small coloured icons that represent some properties of the column/attribute. You can view and edit all the properties of a column/attribute by selecting the column/attribute and then pressing the Properties icon in the icon menu across the top. This is one of the rightmost icons on the ribbon.

The line ends of relationship lines also show special symbols. These represent some properties of the relationship. You can view and edit all the properties of a relationship by selecting the relationship and then pressing the Properties icon in the icon menu across the top. This is one of the rightmost icons on the ribbon.

The functionality that USoft offers around EAR diagrams is very different between USoft 11 and USoft 10.

EAR diagrams in USoft 11

In USoft 11 Beta, you can create, store and browse an EAR diagram in USoft Definer for a business object. USoft keeps this diagram in sync with the Definer records for tables, columns, domains and relationships depicted in the diagram. This synchronisation is 2-way:

  • If you change anything in Definer about the tables, column, domains or relationships in the business object, the next time you open the diagram, the drawing has automatically been adapted to your changes.
  • If you draw, change or drop anything in the EAR diagram, when you close the diagram, Definer records are manipulated (added, changed, dropped) automatically. A commit is not issued: you can save these manipulations if you like them or roll them back if you don't.

Opening an EAR diagram for a business object

To set up business objects and EAR diagrams, you can start with the business object or you can start with the diagram.

To start with the business object:

  1. Open the Business Objects window for the business object. You can do that from the Definer main menu via Teamwork, Definition, Business Object or by double-clicking a Business Object from the Teamwork catalog in the left-hand pane.
  2. Make sure the business object is associated with the tables that you want to see in the diagram. This should be a small number of tables that are closely related: they typically have Relationships between them. They could also be related by having a supertype/subtype relationship. Press the Structure button to list the tables associated with the business object. The Owned flag has no direct relevance to EAR diagrams. You can have the same table appear in multiple business objects, but a given table can only be owned by a single Business Object.
  3. Open the EAR diagram either by pressing the Open button next to the EAR Diagram field in the Business Objects window, or by right-mouse-clicking on the Business Object in the Teamwork catalog and then choosing "Open EAR Diagram...”.

To start with the diagram:

  1. Have a business object that you want to draw a diagram for.
  2. Open the EAR diagram either by pressing the Open button next to the EAR Diagram field in the Business Objects window, or by right-mouse-clicking on the Business Object in the Teamwork catalog and then choosing "Open EAR Diagram...”. Assuming that the business object had no tables associated with it, you will get an empty EAR diagram canvas.
  3. Draw the EAR diagram. Press the Save button in the top left corner. Press the 'x’ button to close the diagram dialog. What you have drawn will now be translated into Definer manipulations: table, column and relationship records will be added, changed or dropped depending on what you have drawn in the diagram.
  4. View the changes and Save if you like them, or Rollback if you don't.

EAR diagrams in USoft 10

In USoft 10, EAR diagrams are created and stored in USoft Studio and not USoft Definer. In USoft Definer 10, there is a limited feature for generating-and-browsing an EAR diagram from Definer data and storing it in an external file.

E/R diagrams in USoft Studio

If you use USoft Studio and USoft Definer in combination, USoft Studio will hold your specifications, including any diagrams, and USoft Definer will hold your implementations. In this setup, USoft recommends that you draw E/R diagrams in USoft Studio and import related specifications that refer to the diagram in USoft Definer, using the "Import from USoft Studio" bridge.

Generated E/R diagrams in USoft Definer

Another feature is the possibility to generate an E/R diagram from USoft Definer on the basis of a table subdivision by business object or business area. The generated diagram will contain the tables that you have indicated belong to the business object, or the business area.

To generate an E/R diagram in USoft Definer:

1. Make sure that the tables and relationships that you want to group in an E/R diagram are all part of the specific business object, or business area.

2. Find the business object or business area in the Teamwork catalog.

3. Right-mouse-click on the node in the tree view for the business object or business area, and choose either "Generate Diagram" or "Generate Diagram and Browse".

The diagrams you generate in this way are importable into USoft Studio.

To make a generated diagram readable, you will need to reposition the boxes for the tables, so that the relationship lines do not cross and all the text elements are properly readable.

You can either edit the diagram in the browser or you can import the diagram into USoft Studio and edit it there.


This topic has been closed for comments