5 ms·
The way I'd do this, is by separating concerns into separate tables. If you have a table with (id, name) and a table with (id, parent_id), any doc with a parent
by pdenton 4y ago
The way I'd do this, is by separating concerns into separate tables. If you have a table with (id, name) and a table with (id, parent_id), any doc with a parent will have a corresponding record in the second table.
- evv 4y agoInteresting! But where can you implement the UNIQUE constraint for doc names under a given parent? I guess your application code would need to handle that