Restructure database to meet best practices
For example, see this SQL style guide: https://www.sqlstyle.guide/
Use lowercase names for fields and tables, with words separated by underscores (i.e. snake_case). Lowercase is faster to type than uppercase and doesn't read like someone shouting. At the very least, avoid funky-case names like "GlaThiDa_ID".
-
GlaThiDa_ID
->glathida_id
-
MEAN_THICKNESS
->mean_thickness
- ...
Use table names that actually describe their content.
-
T
->surveys
-
TT
->bands
(orelevation_bands
) -
TTT
->points
Remove fields which are replicated across tables. These waste storage space, increase the likelihood of errors during data compilation, and results in duplicate columns when performing table joins.
-
POLITICAL_UNIT
(TT
andTTT
) -
GLACIER_NAME
(TT
andTTT
)
Add a unique identifier (i.e. primary key) to each table (a basic requirement for a relational database).
-
T
(orsurvey
)-
GlaThiDa_ID
->survey_id
-
-
TT
- Add unique
band_id
-
GlaThiDa_ID
->survey_id
- Add unique
-
TTT
- Add unique
point_id
(in which case currentPOINT_ID
->survey_point_id
ororiginal_point_id
) -
GlaThiDa_ID
->survey_id
- Add unique