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

DM-41029: Add metadata table to APDB schema #171

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions yml/apdb.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
---
name: "ApdbSchema"
"@id": "#apdbSchema"
version: "0.1.1"
description: The Alert Production Database (APDB) contains the catalogs resulting from
image differencing during nightly Prompt Processing as well as the results of
daily Solar System Processing.
tables:
- name: metadata
"@id": "#metadata"
description: Table containing various metadata key:value pairs for APDB.
columns:
- name: name
"@id": "#metadata.name"
Comment on lines +13 to +14
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we call this key, in keeping with python dictionaries (which this effectively is), or is name the typical database term for this kind of key:value store?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

key is more natural, but in some database systems key is a reserved keyword and needs special care when used as column name (proper quoting). It's easier to avoid using keywords for column names.

datatype: text
length: 1024
nullable: false
description: Name or key for a metadata item.
- name: value
"@id": "#metadata.value"
datatype: text
length: 65535
nullable: false
description: Content of the metadata item in string representation.
primaryKey: "#metadata.name"
- name: DiaObject
"@id": "#DiaObject"
description: The DiaObject table contains descriptions of the astronomical objects
Expand Down
Loading