<story><title>Reddit’s database has two tables (2012)</title><url>https://kevin.burke.dev/kevin/reddits-database-has-two-tables/</url></story><parent_chain></parent_chain><comment><author>withinboredom</author><text>I worked at a startup (now fairly popular in the US) where we had tables for each thing (users, companies, etc) and a “relationship” table that described each relationship between things. There were no foreign keys, so making changes were pretty cheap. It was actually pretty ingenious (the two guys who came up with the schema went on to get paid to work on k8s).&lt;p&gt;It was super handy to simply query that table to debug things, since by merely looking for a user, you’d discover everything. If Mongo was more mature and scalable back then (2012ish), I wonder if we would have used it.</text></comment>
<story><title>Reddit’s database has two tables (2012)</title><url>https://kevin.burke.dev/kevin/reddits-database-has-two-tables/</url></story><parent_chain></parent_chain><comment><author>TekMol</author><text>These days, for a new Web2 type startup, I would use SQLite.&lt;p&gt;Because it requires no setup and has been used to scale typcial Web2 applications to millions in revenue on a single cheap VM.&lt;p&gt;Another option worth taking a look at is to use no DB at all. Just writing to files is often the faster way to get going. The filesystem offers so much functionality out of the box. And the ecosystem of tools is marvelous. As far as I know, HN uses no DB and just writes all data to plain text files.&lt;p&gt;It would actually be pretty interesting to have a look at how HN stores the data:&lt;p&gt;&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=32408322&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;news.ycombinator.com&amp;#x2F;item?id=32408322&lt;/a&gt;</text></comment>