Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handling parent child relationship #75

Closed
jayanthir opened this issue Feb 9, 2018 · 1 comment
Closed

handling parent child relationship #75

jayanthir opened this issue Feb 9, 2018 · 1 comment
Assignees

Comments

@jayanthir
Copy link
Contributor

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.

@jayanthir jayanthir self-assigned this Feb 9, 2018
@nati
Copy link
Contributor

nati commented Feb 20, 2018

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

@nati nati closed this as completed Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants