23

I have read here the discussions on 5NF, EAV and 6NF and the need for a catalogue to handle meta-data and the complex SQL "automatically". How is that implemented in practice?

PerformanceDBA wrote several answers on 6NF and EAV that mentions catalogues, e.g. in the following questions:

Community
  • 1
  • 1
Idonodi
  • 251
  • 1
  • 8
  • 2
    What discussions? Can you link to them to provide some context for your question? Maybe even post the relevant parts as your question is a little confusing without. – Ben Aug 25 '12 at 09:33
  • Beware of [inner-platform effect](https://en.wikipedia.org/wiki/Inner-platform_effect). – Branko Dimitrijevic Feb 25 '17 at 05:37

1 Answers1

4

First, with LedgerSMB we reuse the system catalogs and information schema wherever we can. This means that the application actually spends some time querying the system catalogs. We also have some meta-data calculations for extended attributes. We don't do EAV here. Rather we have actual relations and meta-data about these which allows us to create relational queries on the client side. These are loaded at one point and cached. The catalog looks very much like an EAV catalog, but the underlying storage is actually relational and the functions which maintain these alter underlying tables. This gives you the flexibility of EAV without the underlying difficulties.

In future versions we will probably move to fewer application catalogs and greater use of the Pg system catalogs and information schema, and our interface will be simpler from an application perspective.

Chris Travers
  • 25,424
  • 6
  • 65
  • 182