Support zero/optional relationship in DBML

Right now it is not possible to visualize whether a relationship is mandatory or optional. As these options are very common, this feature would allow us to create more detailed and complete schema diagrams.

For example, to show that details are optional for an order, we could include a new symbol ā€œ0>ā€:

Table order_detail {
  orderId int [ref: 0> order.orderId]
  detailDescription varchar
}

With this, we communicate an order may have 0 or many order_details, but every order_detail must only relate to one order.
order_detail >0------|| order

To show that the other side is optional we could put the 0 on the other side of the operator ā€œ>0ā€.

I just discovered dbdiagram and love it! The lack of optional relationships is a big drawback. If we are unable to document cardinality then it greatly reduces the value that dbdiagram provides

2 Likes

Is there an update on this?

cheers

Cyrill

Hi, @Cyrill_Jorg ,

Iā€™m Huy Le from the dbdiagram team.

This functionality is already in our backlog. We will consider implementing it in the future, also will notify you if there are any updates.

Thanks!

The lack of this feature prevents me from purchasing the team plan.

1 Like

Hi @david-oc-miller,

Iā€™m Nguyen from the dbdiagram team.

We are working on this feature. We will notify you if there are any new updates.

Regards.