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

Institution address #48

Closed
BrunoEVCosta opened this issue Jul 10, 2019 · 2 comments
Closed

Institution address #48

BrunoEVCosta opened this issue Jul 10, 2019 · 2 comments
Assignees
Labels

Comments

@BrunoEVCosta
Copy link
Member

Institution address is not explicitly placed in the database.

But can be differed to Location -> LocationAdditionalInfo: "propertyName":Address

Suggestion: Column address varchar(254) DEFAULT NULL in table Institution

Reference:

https://github.com/plantbreeding/API/tree/master/Specification/Studies#get-studies-by-studydbid--get-brapiv1studiesstudydbid

@DanFaria
Copy link
Collaborator

Even though, from a querying perspective, it would be easier to have the instituteAddress directly in the Institution table, it's not a good SQL practice to have locations/addresses stored in two distinct places (since locations include institutional addresses). What I think we are missing and should add is a column "streetAddress" in table Location. This way, with the locationId in table Institution, you can get all the information you need from table Location, and we have all locations stored in one place.

Solution: Add column streetAddress to table Location; define a unique key/index out of (name, street address, latitude, longitude) for that table, to ensure good behavior.

@BrunoEVCosta
Copy link
Member Author

https://docs.google.com/document/d/11_gsrqcYAD90mNKOLkFpiEfAuhe-6SfImPuvRBZYXr0/edit?usp=sharing

Differed unique key for later to allow flexibility.

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

No branches or pull requests

2 participants