Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ownership/accessorship dependent on a column value (sample application: HotCRP) #172

Open
benkilimnik opened this issue May 19, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@benkilimnik
Copy link
Member

PaperConflict encodes relationships between contactInfo and paperId based on the value of conflictType (e.g. co-author or institutional relationship). The data ownership/accessorship pattern may vary depending on this relationship. For instance, on GDPR GET, we would want to extract all papers that a contactInfo (data subject) has co-authored, but not papers that they might have an institutional conflict with.

CREATE TABLE PaperConflict (
  id int PRIMARY KEY NOT NULL,
  paperId int NOT NULL,
  contactId int NOT NULL,
  conflictType int NOT NULL,
  FOREIGN KEY (paperId) REFERENCES Paper(paperId)
  -- ownership dependent on another column (conflictType) 
  -- FOREIGN KEY (contactId) REFERENCES ContactInfo(contactId)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@KinanBab KinanBab added the documentation Improvements or additions to documentation label May 23, 2023
@KinanBab
Copy link
Collaborator

This is good to discuss in a WIKI about normalization / modifying DB schema.

Another relevant scenario is ownCloud pre-normalization: share_type and share_with (which can be a group or user)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants