Search Postgresql Archives

foreign keys on multiple parent table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux