Schema design to achieve "join table"
I'd like a way to design my schema so I can quickly determine relationships between two different types of documents, starting from either type. In traditional DBMS design, this would be done via a “join table” that lists the IDs of the records from each type. How can this be done in Nuxeo?
You can use a subtype of Relation. There are two columns (source and target) that are designed to be joined with other documents. In Nuxeo 5.5 when you create a relation between two documents in the Relations tab, a Relation object is created for you.
- It appears creating the Relation between the documents takes a significant amount of time
- It doesn't appear I can have a Relation between more than two documents.
Am I overlooking something?
There's no reason it should take a lot of time. It's a simple operation.
Relations in Nuxeo are between a document and something else. They're binary. That's how they're used in most systems. What different use case do you have?
To understand how documents are mapped in the database inside the Nuxeo platform please check out the following documentation entry about Nuxeo's VCS (which stands for Visual Content Store):
Nuxeo VCS Architecture. (Note the hierarchy table for your specific scenario)