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!