I'm moving a MySQL database to PostgreSQL and redesigning parts of it to take advantage of PostgreSQL's richer type system and other advance features. Currently I am attempting to replace a table of name/value pair data w/ a hstore column. But now that the data will no longer be flattened out in a table I need to manually handle referential integrity
And the benefit is?
The benefit is supposed to be client side simplicity. The data in these particular tables are ultimately consumed by JavaScript as JSON on the front end to populate/maintain a dynamic HTML form. So I was attempting to build a model that more closely reflects how the data is used because the people using the data aren't SQL folks and the code that converts the data from table/rows to JSON is not straight forward for my audience.
In that case you may want to look at the JSON types, json and/or jsonb(depending on Postgres version):