I'm have an issue with circular reference in my DB design. As see the ER diagram below have 2 circular reference that I highlighted with Red and Orange arrow.
Anyone know how to resolve this issue?
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.Sign up to join this community
You do not have circular references. All those arrows point in the same direction, "up" to the tenant.
You can insert data to populate the tables without having a dependency on data not yet inserted.
This would only be a circular reference if, for example,
tenant had a
user_id reference that pointed back down to the
user table, which references back up to the
The arrows in your diagram have multiple paths back up to the "top" of the hierarchy (tenant, which is drawn to the bottom left). There is a clear tail and head of every path.
But the arrows don't create a circular cycle. In a circular reference, there is no clear head or tail in the path of the arrows.
So great job on your schema design! You did better than you thought.