Hello, I have a question about DB.
Draw the relationship of the object view with the ERD tool
Forward Engineering automatically generates a query for a table.
What I'm curious about at this time is that when the relationship between tables is set to 1:1. 1:N.N:M,
Is there no content generated by the query?
Again, is the information called relation order (1:1.1:N.N:M) not managed by DBMS?
I wonder if DBMS does not cause a condition error if 1:N data is included even though it is designated as 1:1.
Please give me some advice.
erd relation
You can express the relationship between PK and FK settings, so check this part when you do forward engineering, the column part or constraint of the generated CREATE statement.
For example, if there are tables A and B, and these two are in a 1:1 relationship and A is the parent of B, the PK of B is only possible within the PK of A. And in a 1:N relationship, the FK of B is only possible within the PK of A.
If the setting is correct, of course, you will get an error when you try to register 1:N data in a 1:1 relationship.
© 2025 OneMinuteCode. All rights reserved.