To solve the problem we could use type : "CP"/"Diag"/"CP+Diag"Daydreamer wrote:Well, it should be possible to add the model twice once as diagram from pages xx - yy and once as cp on page zz.malachi wrote:What about books where each model has both a CP and a diagram?
Problem with that is that using (model_id,book_id) as primary key won't work then anymore, so that there has to be an artificial primary key as (book_id, diagram_id) and model_id only as foreign key included. Alternatively (model_id, book_id, type) could be used as primary key.
If somebody search for a diagram, it will look for the instance of models that are diag or cp+diag.