Need a sanity check with EAV

Поиск
Список
Период
Сортировка
От Adam Brusselback
Тема Need a sanity check with EAV
Дата
Msg-id CAMjNa7cdMOVCXayH+d2SN4arzdh97mPmzkE9xCiU-6Udbp6=yA@mail.gmail.com
обсуждение исходный текст
Список pgsql-novice
Hey all,

I just wanted to get the opinion of people who've been there before and have more experience than I on the solution I came up with.

I've got an application, everything used by the application is stored in a strictly relational model, but I wanted to allow users to add additional data capture points to a few specific types of data (company records, product records, etc).  I still wanted to ensure type safety, uniqueness, prevent orphan rows, etc.

None of this data will be reported on in standard reports, as these data points could be different for each client. Additionally, none of the data will drive any application logic.  It will just be available to view, and sent back to the customer in a feed with the rest of their data if they wanted to create their own reports.

I designed a kinda EAV schema for this, and was looking for a quick review. I just want to see if I am way off base, or if there are any gotchas I may not know about, etc.  It's been working perfectly fine for me, but this isn't a production application yet. 

Schema can be found on this pastebin: http://pastebin.com/dNifqApT

Also, if anyone knows a better way to do that check constraint on my product_value table, i'd appreciate it.

Thank you in advance for any insight,
-Adam Brusselback

В списке pgsql-novice по дате отправления:

Предыдущее
От: Albe Laurenz
Дата:
Сообщение: Re: tuple compare involving NULL
Следующее
От: David G Johnston
Дата:
Сообщение: Re: tuple compare involving NULL