Closed jayanthir closed 6 years ago
As we discussed, we don't do this because
(A) RDBMS semantics don't allow let one column have a relationship with multiple tables. (B) "many" side resources should have reference to "one" side resource in "one" to "many" relationship. ( we should prevent let a column has multiple values )
so I believe joining with multiple child tables are the only way to do this right.
see also https://en.wikipedia.org/wiki/Database_normalization
creating table for every children of resource to save parent-child relationship (parent key, child key) and updating table accordingly for create/delete of resource/child.