3 ms·
It's a very neat idea that I'll consider in the future however I have some concerns about it. One thing is about the database design. I remember lecturer procl
by xlii 6y ago
It's a very neat idea that I'll consider in the future however I have some concerns about it.
One thing is about the database design. I remember lecturer proclaiming that models with many nullable relations is:
- bad design
- performance risk
- might mess with indexing
I haven't verified this knowledge in many years, to I'm not sure if that point still stands, also in wake of not optimizing pre-mature this might not be an issue.
The other thing is introducing of (needless) complexity to the system. It allows to make unwise decisions which otherwise would not be possible if the flag would remain simple boolean and as such stands against KISS system design principles.
- diamondo25 6y agoYes, nullable relations are harder to work with, especially with ON DELETE CASCADE and checking if another table contains a row based on a nullable column. However, this is about booleans, so they werent used in relations to begin with. The indexing in this case could be a bit less performant but probably neglegable.
- madacol 6y agoThe OP doesn't talk about *nullable relations*, which I agree is a sign of bad desing