BA Prince the B.A.

Home / draw.io for Business Analysts

Class Diagram in draw.io for a Domain Model

Class Diagram in draw.io for a Domain Model

Watch on YouTube Subscribe

A domain model is a simple class diagram of the things a business works with. Learn how to draw one for free in draw.io: classes with their attributes, associations named with a verb, and the numbers that say how many, using a library system.

Step by step

The things in the business

  1. Domain models. Before anyone builds a library system, the team must agree on the words. What is a member, a book, a loan? A domain model is a simple class diagram that shows them. Here's ours.
  2. Blank diagram. Start a blank diagram in draw.io.
  3. Class boxes. We need a box with a name on top and a list of attributes below. The entity box gives us exactly that. Click more shapes, tick entity relation, and click apply.

Classes

  1. Class. A class is a thing the business keeps track of. Drag in the box and name it with a singular noun. Member.
  2. Attributes. Double click the lower part and type the attributes, one per line. These are the facts we keep about each member.
  3. Class. Add a second class on the right. Book.
  4. Attributes. Its attributes. I SBN, title and author.

The class in the middle

  1. Loan. A member borrows many books over time, and a book is borrowed by many members. The borrowing itself is a thing with its own facts. That's a loan. Put it in the middle. A loan has a start date, a due date and a return date.

Associations

  1. Association. Now the associations. Click member, hold control, click loan, then click the plain line in general shapes. Label it with a verb and the numbers. One member makes zero or more loans. Do the same from loan to book. Each loan is for exactly one book, and a book can have zero or more loans.
  2. Read the numbers. Read each line from left to right. The number on each side belongs to the class on that side. Star means many.
  3. The finished model. Click away to see the finished domain model. Three classes, their attributes, and two named associations.

Recap

  1. The rules. So, name classes with singular nouns, list the facts as attributes, name every association with a verb, and say how many on each side. Subscribe for more draw.io tips for business analysts.

More in draw.io for Business Analysts