Juniper / contrail

Contrail repo for core components (go based)
Apache License 2.0
44 stars 32 forks source link

handling parent child relationship #75

Closed jayanthir closed 6 years ago

jayanthir commented 6 years ago

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.

nati commented 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