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

add start to Ontology table #20

Merged
merged 14 commits into from
Nov 17, 2020
5 changes: 4 additions & 1 deletion common/namespace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ namespaces:
- doc: data types for different types of sparse matrices
source: sparse.yaml
title: Sparse data types
version: 1.2.1
- doc: data types for storing references to web accessible resources
source: resources.yaml
title: Resource reference data types
version: 1.2.2-alpha
67 changes: 67 additions & 0 deletions common/resources.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
groups:
- data_type_def: ExternalResources
ajtritt marked this conversation as resolved.
Show resolved Hide resolved
data_type_inc: Container
doc: A pair of tables for tracking external resource references in a file
datasets:
rly marked this conversation as resolved.
Show resolved Hide resolved
- data_type_inc: Data
name: keys
doc: A table for storing user terms that are used to refer to external resources
dtype:
- name: key_name
dtype: text
doc: The user term that maps to one or more resources in the 'resources' table.
Comment on lines +10 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

Am I reading this right that this is a complex data type of length 1? What is the advantage of that over just using a string dtype?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The complex data type makes it easier to treat the dataset as a table.

dims:
- num_rows
shape:
- null

- data_type_inc: Data
name: resources
doc: A table for mapping user terms (i.e. keys) to resource entities
dtype:
- name: keytable_idx
dtype: uint
doc: Foreign reference to the 'keys' table - the index to the key in the 'keys' table.
- name: resource_name
dtype: text
doc: The name of the online resource (i.e. website, database) that has the entity
- name: resource_id
dtype: text
doc: The unique identifier for the resource entity at the resource
- name: uri
dtype: text
doc: The URI for the resource entity this reference applies to. This can be an empty string.
dims:
- num_rows
shape:
- null

- data_type_inc: Data
name: objects
doc: A table for identifying which objects in a file contain references to external resources
dtype:
- name: object_id
dtype: text
doc: The UUID for the object
- name: field
dtype: text
doc: The field of the object. This can be an empty string if the object is a dataset and the field is the dataset values.
dims:
- num_rows
shape:
- null

- data_type_inc: Data
name: object_keys
doc: A table for identifying which objects use which keys
dtype:
- name: objecttable_idx
dtype: uint
doc: The index to the 'objects' table for the object that holds the key
- name: keytable_idx
dtype: uint
doc: The index to the 'keys' table for the key
dims:
- num_rows
shape:
- null