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

docs: Add data definition document #2544

Merged
merged 4 commits into from
Apr 22, 2024

Conversation

AndrewSisley
Copy link
Contributor

Relevant issue(s)

Resolves #2538

Description

Adds data definition document, documenting how data is defined.

It is targeted at us, and anyone looking to embed defradb in their application.

@AndrewSisley AndrewSisley added documentation Improvements or additions to documentation area/schema Related to the schema system area/collections Related to the collections system labels Apr 22, 2024
@AndrewSisley AndrewSisley added this to the DefraDB v0.11 milestone Apr 22, 2024
@AndrewSisley AndrewSisley requested a review from a team April 22, 2024 17:20
@AndrewSisley AndrewSisley self-assigned this Apr 22, 2024
Copy link
Member

@nasdf nasdf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job! Documentation like this so helpful. I hope to see more of this in the future.


## Global definitions

Global definitions are consistent across all nodes in the decentralized network of nodes in the database. This is enforced by the use of things like CIDs for schema versions. If a global definition was to differ across nodes, the different variations will be treated as a completely different definitions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Global definitions are consistent across all nodes in the decentralized network of nodes in the database

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do :) I wasn't terribly confident writing that last bit out, so I'm very glad you spoke up :)

  • Drop extra words


`CollectionDescription` instances may be active or inactive. Inactive `CollectionDescription`s will not have a name, and cannot be queried.

When a new [schema](#schemas) version is created for a schema that has a collection defined for it, a new `CollectionDescription` instance will be created and linked to the new schema version. The new `CollectionDescription` instance will share the same root ID as the previous, and may be active or inactive depending on what arguments the user defining the new schema specified.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: When a new schema version is created for a schema that and has a collection defined for it, a new CollectionDescription instance will be created and linked to the new schema version.

Copy link
Contributor Author

@AndrewSisley AndrewSisley Apr 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think I agree - will do, thanks Keenan :)

  • Remove extra words

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: The italics on and in your suggestion saved me a bit of hassle, thanks for bothering to add that :)

Copy link
Member

@shahzadlone shahzadlone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers! Huge praise on this helpful documentation.

@AndrewSisley AndrewSisley merged commit 9a250ff into sourcenetwork:develop Apr 22, 2024
26 of 28 checks passed
@AndrewSisley AndrewSisley deleted the 2538-data-def-docs branch April 22, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collections Related to the collections system area/schema Related to the schema system documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Review schema vs collection documentation
3 participants