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?

0 votes

2 answers

1970 views

ANSWER



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.

0 votes



jbs
Thanks for the info. However, I still have a couple of concerns:

  1. It appears creating the Relation between the documents takes a significant amount of time
  2. It doesn't appear I can have a Relation between more than two documents.

Am I overlooking something?

03/23/2012

  1. There's no reason it should take a lot of time. It's a simple operation.

  2. 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?

03/29/2012


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)

Please also note the definition of the term schema in Nuxeo EP, and how a specific schema corresponds to a table name in the VCS store database: Document Types and Nuxeo VCS Architecture again.

You also have at your disposal the following two querying systems in Nuxeo EP: CMIS for Nuxeo and: NXQL

0 votes