3 ms·
Small nitpick but I wish the author just made `data` a JSONB field rather than VARCHAR. That really shows the power of Postgres, being able to operate as a "NoS
by pphysch 4y ago
Small nitpick but I wish the author just made `data` a JSONB field rather than VARCHAR. That really shows the power of Postgres, being able to operate as a "NoSQL graph DB" with little to no hacking.
- ganderzz 4y agoHey, author here! Thanks for the feedback! I went back and forth with having `data` being a JSONB field or VARCHAR, but ended up with VARCHAR to show that `nodes` don't have to be anything crazy. Really `nodes` is just a standard table you'd see in any old SQL database, and what makes it a "graph" is the `edges`/relationship table.
- pphysch 4y agoAre JSON fields "crazy"? That seems like a myth that should be dispelled. To me, "crazy" is making your `data` field unstructured text.