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

DataSources Null values not permitted. #58

Open
LindaTedrow opened this issue Feb 17, 2021 · 5 comments
Open

DataSources Null values not permitted. #58

LindaTedrow opened this issue Feb 17, 2021 · 5 comments

Comments

@LindaTedrow
Copy link

In many of our feature classes we have a DataSourceID and a DataSourceID2.
According to the GeMS standard this value cannot be null.
There is not an issue with DataSourceID not being NULL.
Although, there are many instances where DataSourceID2 is NULL; the validation code does not allow.
Is it possible to allow DataSourceID2 to be NULL?

@ethoms-usgs
Copy link
Collaborator

Hi Linda,
I just added a DataSourceID2 field to a test gdb and it passed the validation tool. The field was simply recognized as a non-GeMS field. Do you have the latest version?

Are you adding that field because of the need to associate more than one DataSource to a feature?

@LindaTedrow
Copy link
Author

LindaTedrow commented Feb 18, 2021 via email

@ethoms-usgs
Copy link
Collaborator

All right. I know that the documentation implies a one-to-one relationship and that is what the tool tests for, but the cardinality is not explicitly described and I think we should be allowing for a many-to-many relationship. Mostly I think this because 1) I don't think it's the place of the GeMS schema to say there can only be one source per feature and 2) the alternative, where people add fields that are not covered by the schema; essentially an un-normalized, flattened spreadsheet sort of design, is poor database design. I am encouraging all GeMS groups to use the kind of relationship they think is best and that should force us (me and Ralph) to re-write the tools to accommodate them.

To my mind, I don't care how many data sources get related to a feature, I just want there to be at least one and that related records can be discovered reliably and programmatically. A relationship class inside the gdb can be queried and even in the absence of one, primary key values can be searched for in a foreign table.

If you go that route, I understand that DataSourceID still needs to be filled in and the value might not make much sense but just do what you think it best there and we'll work with that moving forward.

@LindaTedrow
Copy link
Author

LindaTedrow commented Feb 18, 2021 via email

@ethoms-usgs
Copy link
Collaborator

Hi Linda,
I am revisiting outstanding issues. Do we need to keep this open?
I would say use a concatenated key value, eg "DAS01 | DAS05" -- data source ids delimited by pipe characters or use your second DataSource field and since you have added it as an extension, you can defined it's attributes how you like. You can allow nulls. It will never be checked by the Validate Database tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants