foreign keys on multiple parent table

Поиск
Список
Период
Сортировка
От Lorusso Domenico
Тема foreign keys on multiple parent table
Дата
Msg-id CAJMpnG72qkzsg=OAULTrCqU20uY7ZU885aZCLUyL-35_1LJzwA@mail.gmail.com
обсуждение исходный текст
Ответы Re: foreign keys on multiple parent table
Re: foreign keys on multiple parent table
Re: foreign keys on multiple parent table
Список pgsql-general
Hello guys,
I've many tables representing as many concepts.

For each record of each table I need to store extra information (think to audit information, but more complex than a simple text)

The relation is 1:N, for each record there could be many audit records.

From programming point of view and also to reduce the number of objects in DB could be convinient create just an audit table with a structure like:
  • auditi id
  • reference_uuid (the key of the main table)
  • table_name
  • list of audit data
Could work, but is there a way to set a reference key over the uuid of all the tables?


--
Domenico L.

per stupire mezz'ora basta un libro di storia,
io cercai di imparare la Treccani a memoria... [F.d.A.]

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

Предыдущее
От: Marc Millas
Дата:
Сообщение: Re: pb with join plan
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: foreign keys on multiple parent table