New ask Hacker News story: Ask HN: How do you decide what is a many-to-many vs. enums vs. array
Ask HN: How do you decide what is a many-to-many vs. enums vs. array
2 by erlich | 1 comments on Hacker News.
Whenever I'm designing a schema I always find myself wanting to just make everything a many-to-many relation because it makes things flexible and safe (referential integrity). But then there is always this feeling that these joins are going to make things complicated, verbose, and inefficient, when a simple enum or an array column would be simpler. My main gripe is that I hate having to impose constraints on my data model early on when I have no idea about how it will evolve over time. How do others deal with these decisions? Also, is there any product that would allow me to model the domain exactly as it is (i.e. like a semantic graph), and then have efficient and simple querying?
2 by erlich | 1 comments on Hacker News.
Whenever I'm designing a schema I always find myself wanting to just make everything a many-to-many relation because it makes things flexible and safe (referential integrity). But then there is always this feeling that these joins are going to make things complicated, verbose, and inefficient, when a simple enum or an array column would be simpler. My main gripe is that I hate having to impose constraints on my data model early on when I have no idea about how it will evolve over time. How do others deal with these decisions? Also, is there any product that would allow me to model the domain exactly as it is (i.e. like a semantic graph), and then have efficient and simple querying?
Comments
Post a Comment