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

Unique composite key on rows #6

Closed
cgrand opened this issue May 7, 2019 · 2 comments
Closed

Unique composite key on rows #6

cgrand opened this issue May 7, 2019 · 2 comments
Labels

Comments

@cgrand
Copy link
Owner

cgrand commented May 7, 2019

Given a query how do I determine a subset of columns that are enough to uniquely identify a row?

@cgrand cgrand added the ponder label May 7, 2019
@cgrand
Copy link
Owner Author

cgrand commented May 7, 2019

For example:

[:ul
 (with {:db/id item [title done] :item/attrs}
   [:li title])]

This query returns 3 columns but item is enough for the identity of the row.

@cgrand
Copy link
Owner Author

cgrand commented May 8, 2019

All columns which are cardinality-one attributes of another column are not key. It works transitively too.

This was referenced May 9, 2019
@cgrand cgrand closed this as completed May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant