You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are serious issues with the way we use date and time fields in the traits and yields tables. I've made a separate issue for this.
mean
29 rows have NULLs in the mean column. Should these be deleted? 18 of these rows have non-null stat values.
n
See discussion in GH #231.
stat, statname, n consistency
See discussion in GH #231.
cultivar_id, specie_id consistency
This is discussed in the context of foreign-key constraints. See GH # 175.
To see inconsistencies in human-readable form, use
SELECTt_sp.scientificnameAS"species referred to by traits table", c_sp.scientificnameAS"species matching cultivar", c.nameFROM traits t JOIN cultivars c ONt.cultivar_id=c.idJOIN species t_sp ONt_sp.id=t.specie_idJOIN species c_sp ONc.specie_id=c_sp.idWHEREt.specie_id!=c.specie_id;
checked
checked is NULL in 143 rows.
access_level
access_level = 0 in 2195 rows.
Other NULLs
This supplements the information discussed in GH issues #175 (about the foreign keys in the traits table) and #204 (about the candidate key for the traits table).
As noted in issue #204, NULLs are rampant in this table, even in columns that make up the proposed key. To get an idea of the scope of the problem, run
SELECTCOUNT(*) AS"total number of rows", SUM((site_id IS NULL)::int) AS"site_id NULLs", SUM((specie_id IS NULL)::int) AS"species_id NULLs", SUM((citation_id IS NULL)::int) AS"citation_id NULLs", SUM((cultivar_id IS NULL)::int) AS"cultivar_id NULLs", SUM((treatment_id IS NULL)::int) AS"treatment_id NULLs", SUM((date IS NULL)::int) AS"date NULLs", SUM((time IS NULL)::int) AS"time NULLs", SUM((variable_id IS NULL)::int) AS"variable_id NULLs", SUM((entity_id IS NULL)::int) AS"entity_id NULLs", SUM((method_id IS NULL)::int) AS"method_id NULLs", SUM((date_year IS NULL)::int) AS"date_year NULLs", SUM((date_month IS NULL)::int) AS"date_month NULLs", SUM((date_day IS NULL)::int) AS"date_day NULLs", SUM((time_hour IS NULL)::int) AS"time_hour NULLs", SUM((time_minute)::int) AS"time_minute"FROM traits;
(In psql, to see results in this format, use the "\x" command before running the query.)
To get a better idea of how many rows contain no date information or no time information, run
SELECTCOUNT(*) AS"total number of rows", SUM((date IS NULLAND date_year IS NULLAND date_month IS NULLAND date_day IS NULL)::int) AS"rows with no date info", SUM((time IS NULLAND time_hour IS NULLAND time_minute IS NULL)::int) AS"rows with no time into"FROM traits;
This yields
-[ RECORD 1 ]----------+------
total number of rows | 32027
rows with no date info | 9787
rows with no time into | 4988
The text was updated successfully, but these errors were encountered:
@gsrohde commented on Tue Feb 17 2015
date, dateloc, time, timeloc, date_year, date_month, date_day, time_hour, time_minute
mean
n
stat, statname, n consistency
cultivar_id, specie_id consistency
checked
access_level
Other NULLs
Details
date, dateloc, time, timeloc, date_year, date_month, date_day
See discussion in GH #239 and in section 3.26 of https://www.overleaf.com/2086241dwjyrd#/5297403/.
UPDATE 9/15/2015
There are serious issues with the way we use date and time fields in the traits and yields tables. I've made a separate issue for this.
mean
29 rows have NULLs in the mean column. Should these be deleted? 18 of these rows have non-null stat values.
n
See discussion in GH #231.
stat, statname, n consistency
See discussion in GH #231.
cultivar_id, specie_id consistency
This is discussed in the context of foreign-key constraints. See GH # 175.
To see inconsistencies in human-readable form, use
checked
checked is NULL in 143 rows.
access_level
access_level = 0 in 2195 rows.
Other NULLs
This supplements the information discussed in GH issues #175 (about the foreign keys in the traits table) and #204 (about the candidate key for the traits table).
As noted in issue #204, NULLs are rampant in this table, even in columns that make up the proposed key. To get an idea of the scope of the problem, run
The result is
(In psql, to see results in this format, use the "\x" command before running the query.)
To get a better idea of how many rows contain no date information or no time information, run
This yields
The text was updated successfully, but these errors were encountered: