3 ms·
Tell HN: I created a complex DB design as an experiment
I am working on a side-project to learn web-development. The app is simple, with following features: account creation, creation of "content"(e.g. a blog post), commenting, reporting, up/down voting, bookmarking and tagging. So during the development I thought what if I treat everything in the app as "content" and create hierarchy of the content, and then create every entity relation in the DB as many-to-many. Naturally, lot of tables were created in the DB. But that got me thinking, that this design opens up lots of interesting use-cases such as sub-accounts, group accounts, sub-posts, multi-commenting, multi-reporting, comment-threading, group-posting etc.
This was a very interesting exercise. I think there will be DB performance as well as storage size issues with this design. Not sure though, never tried anything like this in practice.