4 ms·
"Using Hstore allows us to easily store all these values without having to make a bunch mostly blank columns." Or they could have used a small Product table wi
by james2vegas 15y ago
"Using Hstore allows us to easily store all these values without having to make a bunch mostly blank columns."
Or they could have used a small Product table with common fields and made fanout tables for Books and Laptops. For some reason it appears impossible for some to create new tables, or have joins and foreign keys.
- thinkbohemian 15y agoThe idea though, is that we can allow every user to create any product of any type without giving them access to make new tables. I doubt amazon has a books table, a toilet-paper table, etc. ... This is just another tool in your Postgres toolbelt, use it when appropriate.
- mattsoldo 15y agoDoing joins or foreign keys is no problem. You simply join against the appropriate hstore function.