Re: schema advice for event stream with tagging and filtering

Поиск
Список
Период
Сортировка
От Venkata B Nagothi
Тема Re: schema advice for event stream with tagging and filtering
Дата
Msg-id CAEyp7J918B+FYcbNsYXe5QvTRWynibvdc9DG6QkhoWMczY3JOw@mail.gmail.com
обсуждение исходный текст
Ответ на schema advice for event stream with tagging and filtering  (Chris Withers <chris@simplistix.co.uk>)
Список pgsql-general

On Tue, Aug 16, 2016 at 6:38 PM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,

What would be the best schema to use when looking to implement an event stream with tagging and filtering?

An event is a row with a primary key along the lines of (colo, host, category) and an associated set of tags, where each tag has a type and a value (eg: {"color": "red", "owner": "fred", "status": "open"...}).

Events come in as a streams of creates/updates as a cluster of http posts to a web app.

Not sure which version of PostgreSQL you are using. Did you consider JSON/JSONB data-types which is strongly supported by PostgreSQL ? You can consider having a table with JSON or JSONB column type. If you can use JSONB, then, it supports indexing as well.

That should make web app easy to push JSON format data to PostgreSQL.

Regards,
Venkata B N

Fujitsu Australia

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

Предыдущее
От: Venkata B Nagothi
Дата:
Сообщение: Re: Running pg_dump from a slave server
Следующее
От: Sameer Kumar
Дата:
Сообщение: Re: Running pg_dump from a slave server