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

Database metadata (license, documentation, etc.) #282

Open
marcua opened this issue Jan 19, 2024 · 2 comments
Open

Database metadata (license, documentation, etc.) #282

marcua opened this issue Jan 19, 2024 · 2 comments

Comments

@marcua
Copy link
Owner

marcua commented Jan 19, 2024

A user might want to provide context about their database (e.g., license(s), readme/documentation).

There are three paths I can imagine this taking:

  • A lightweight option to support this, like in user/entity profiles where we allow links, is to provide a collection of labeled links (e.g., license = https://github.com/user/dbproject/LICENSE.md).
  • Alternatively, the contents of various metadata files can be stored in ayb in some form or another.
  • Finally, it can be done by identifying a metadata table inside the database itself (e.g., _meta) where a user can add as many key/value pairs identifying the license/documentation that they would like. ayb can still provide convenience methods/commands to make it easy to update this content.

I lean toward options 1 (lightweight) or 3 (self-contained) but would like to hear from others and think on it for a bit.

@sofiaritz
Copy link
Contributor

sofiaritz commented Jan 20, 2024

I like the third option the most :)

An ayb_meta table with a definition like this:

CREATE TABLE ayb_meta IF NOT EXISTS (
    meta_key VARCHAR NOT NULL,
    link VARCHAR CHECK(content IS NULL),
    content VARCHAR CHECK(link IS NULL)
);

That way people can choose to either use a link or to store the content in the database. What do you think?

@marcua
Copy link
Owner Author

marcua commented Jan 21, 2024

Overall I like it! You can even render content as markdown, etc.

Perhaps ayb's DB can store the (optional) name of the metadata table in case the user doesn't want us imposing a name on them.

The downside of this approach (which I really like, not a reason not to continue exploring it) is that it requires a query to the user's DB, so it's harder to support things like cross-dataset search (e.g., "Show me all public domain-licensed datasets"). If that sort of stuff is really important, you could imagine indexing/caching some of the data in ayb, but I'm getting ahead of myself given how we're most likely to use this data :).

I really like that approach 3 has the metadata travel with the database if it gets forked/copied.

@marcua marcua moved this to To do in ayb roadmap Jul 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: To do
Development

No branches or pull requests

2 participants