When doing re-factoring for applications with SQL Databases, it may be helpful to know the details how GORM creates different relationships and how those relationships are physically structured in the DB. This post starts the post series to cover – One-To-One, One-To-Many, Many-To-Many and Inheritance for Domain objects relationships. we hope to answer following questions
- How these relationships are physically structured in DB?
- How these relationships are implemented in respect to cascading and direction(bidirectional vs unidirectional) and whether it changes DB structure?
Here is summary:
- One-To-One Relationship
- One-To-Many Relationship
- Many-To-Many Relationship
- Many-To-One Relationship (derived from One-To-One)
Summarized – Quick Reference
|Not Possible (see post)|