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

Data types should be changed in gaiadb #4

Open
kzollove opened this issue Oct 26, 2023 · 2 comments
Open

Data types should be changed in gaiadb #4

kzollove opened this issue Oct 26, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@kzollove
Copy link
Collaborator

kzollove commented Oct 26, 2023

These data types are holdovers from the prototype of the data model. Some of them (varchar(x) in particular) go against some best practices for postgres. In general, they should be more simple unless they provide some benefit of being complex.

Data model can be viewed here

Consider:

  • What data type for text fields?
  • What data type for PK fields?
  • Value_as_number fields?
  • Use JSON type for _spec fields?

This shouldnt be a hard problem. This will be a win if the data types used are more uniform.

@kzollove kzollove added the enhancement New feature or request label Oct 26, 2023
@kzollove kzollove self-assigned this Oct 26, 2023
@kzollove
Copy link
Collaborator Author

@tibbben would love your input on this

@p-talapova
Copy link
Collaborator

Hi @kzollove
While these considerations may not be new, they are still relevant.
In the context of OMOP convention with PostgreSQL:

  • Text fields are typically defined as varchar(255).
  • PKs are usually of the integer (or bigint) data type.
  • For value_as_number, the float data type is used.
  • When it comes to storing custom extensions to the OMOP CDM model, using the JSON data type for "_spec" fields can be a suitable choice.

@kzollove kzollove transferred this issue from OHDSI/GIS Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants