I have several types of entities, each with their own fields, which are stored in separate tables.
Each record in such a table may be connected to zero or more records in a different table, i.e., linked to records from different entity types.
If I go with lookup tables, I get (m(m-1))/2=O(m^2) separate lookup tables that need to be initialized.
While still feasible for 6 or 7 different entity types, would it still be relevant for 50+ such types?
In particular, a given record would need to have links to most other entity types so theoretically speaking I would be dealing with a nearly-complete, non-directed, n-sided graph.
Can anyone shed some light on how to store this structure in a relational DBMS?
(I'm using Postgresql if it matters, but any solutions for other DBMS's would be equally helpful).
Thank you for your time!
Yuval