Re: Schema design question
| От | Ron Mayer |
|---|---|
| Тема | Re: Schema design question |
| Дата | |
| Msg-id | 47F09508.7070707@cheapcomplexdevices.com обсуждение исходный текст |
| Ответ на | Schema design question (Ben <bench@silentmedia.com>) |
| Список | pgsql-general |
Ben wrote: > I'm working on a project which requires me to keep track of objects, > each of which can have an arbitrary number of attributes. Although there > will be many attributes that an object can have,... > Anyway, this seems like a common problem without a perfect solution, and > I'm sure people must have hindsight opinions on how they solved it. Your > thoughts? If each attribute can only occur once for any object, and if your queries are based more on exact matches of the values rather than range queries, you might want to look into the hstore module: http://www.postgresql.org/docs/current/static/hstore.html If attributes can occur more than once, you might even want to serialize the whole object as some text format (yaml, xml, etc) instead.
В списке pgsql-general по дате отправления: