Why a column needs a role name
A table can’t hold two columns named MemberId, and a numbered MemberId2 says nothing; a role name such as AuthorId says what the second one is for. Why the editor writes foreign key columns for you and keeps them in step is on the database modeling page.
ERDsmith writes a role-named column as the role name, a period and the name it migrated from, the form IDEF1X (FIPS 184) uses: AuthorId.MemberId. So the box says both what the column means and which key it holds.
Two references to one parent
Draw a second line from dbo.Member to dbo.MemberNote, which has its MemberId from the first one, and ERDsmith asks for a role name for the new column before it adds it. Its default, when nothing is asked, is the column’s name and 2: MemberId2.

To spot two references on a diagram, look for two lines between the same two boxes; they show apart once the diagram is arranged (Arrange, under the diagram), and role.base says which column each one fills.

A role name helps with one reference too: in the demo, shop.Session’s HostId (HostId.MemberId with Role names as role.base on) is the member who runs the session, which a column named MemberId wouldn’t say.
A relationship to its own table
A self-reference, such as a member’s mentor, migrates MemberId into dbo.Member, which already has it. So the column gets Parent before its name: a line drawn from dbo.Member to itself adds ParentMemberId. Rename it to say what the parent row is: the demo’s is MentorId. The relationship stays non-identifying, since its column can’t be part of the table’s own primary key, and its panel shows Identifying disabled, the “?” beside it saying why.


One reference by the primary key, one by an alternate key
The relationship panel’s Parent key lists the parent’s primary key and its alternate keys. Switch the second relationship above from PK_Member to AK_Member_Email and its column changes with the key: AuthorId goes, and the relationship adds Email, as the Foreign key column template names it. dbo.MemberNote has no Email yet, so nothing is asked. Rename the column AuthorEmail and that becomes its role name, written AuthorEmail.Email; the foreign key’s name follows.


Two parents keyed Id
Under the default Foreign key column template, {ParentColumn}, a reference to a key named Id needs a column named Id. Draw a line from dbo.Author and one from dbo.Book to dbo.Review, all three keyed Id, with Identifying, and nothing is asked: a key column with the name and type an identifying relationship needs is taken, not added. Both relationships take dbo.Review.Id, the review’s own key, so each review’s id now has to match an author’s and a book’s. The Output says so; watch for it on any schema keyed Id. Drawn with Non-identifying, the same lines ask instead (below), as a non-identifying relationship never takes a key column.


Two ways out. The EF Core preset names foreign key columns {ParentColumnPrefixed}, so the same lines add AuthorId and BookId and the review keeps its own Id. Or key the child ReviewId and rename each foreign key column as you draw it: AuthorId and BookId become role names, written AuthorId.Id and BookId.Id.


A clash with a column of another type
When the column a relationship would add has the name of a column the child already has with another type, or on the other side of the primary key (a key column in the way of a non-identifying relationship, a column outside the key in the way of an identifying one), ERDsmith asks: give the new column a role name, suggested as the parent table’s name before the column’s, or rename the existing column when it is the table’s own and no relationship added it. Cancel leaves the model as it was. With “Don’t ask again” ticked, every later clash in the session takes a role name without asking: the column’s name and 2.

Give a column a role name
- Draw the relationship with Identifying or Non-identifying, from the parent’s box to the child’s, or find a column it added: pick the child table in the tree, then the column in the table panel’s list. In its column panel the Type is locked, with a link to the parent column at its end.
- Type the role name in Name and press Enter. A name another column of the table has takes the next number.
- The column is written role.base in the table panel’s list, and on the diagram while Role names as role.base is on; the foreign key’s name follows.
- To give the column back its template’s name, click the orange broken link at the end of the field, or clear the field.
Does a column follow its template?
A migrated column either follows the Foreign key column template or has a role name, and the editor shows which:
- In its column panel, a name that follows the template ends in a grey link; a role name ends in an orange broken link, its tooltip “Written by you, a role name”. A click on the broken link, a blank field or the template’s own name clears the role name.
- In the table panel’s column list, and on the diagram while Role names as role.base is on, a role-named column is written role.base.
- After a rename, the Output names the column and every name that followed: “Column [MemberNote].[Email] renamed to [AuthorEmail]: 1 name follows.”


role.base on the diagram
Each diagram has its own display settings: Display, at the right of the diagram tabs, opens them in the panel on the right. Role names as role.base is off by default, and the look presets leave it as it is. It helps where a column’s name doesn’t show the key it holds: renamed columns such as MentorId.MemberId and AuthorEmail.Email, a design review, readers who know IDEF1X.
It helps less on a schema keyed Id under the default preset, where every renamed foreign key column reads AuthorId.Id, BookId.Id, and the .Id says nothing new. Turn the setting off and the columns read AuthorId and BookId, or use the EF Core preset, whose AuthorId follows its template and has no role name.
Role names and the naming templates
The Foreign key column template names every migrated column without a role name. A column with a role name keeps it when that template changes, which the project settings say beside the template: “role names kept”. Reset never takes role names back in bulk; clear them one column at a time.
Settings and defaults
- Where ERDsmith asks
- A second relationship between two tables on the same parent key, and a column of another type, or on the other side of the primary key, already in the way: "MemberId is already in dbo.MemberNote".
- The default role name
- The column's name and 2, taken without asking when nothing asks:
MemberId2. - A self-reference
Parentbefore the column's name, without asking:ParentMemberId.- A clash's suggestion
- The parent table's name before the column's:
SessionStatus. - Don't ask again
- Every later clash in the session takes the default role name:
Status2. - Role names as role.base
- A display setting of each diagram, off by default:
MentorId, onMentorId.MemberId. - Foreign key column template
{ParentColumn}by default, "role names kept": a column with a role name keeps it when the template changes,MentorIdstays.