Devices on the leaderboard are displayed in groups - those which have identical specs (including location) are grouped together. The current implementation of this system is for the Device table to have a group column with an index representing the group the device is part of. This presents some issues:
A great deal of duplicate data is being stored in the database, since each device in the same group has the same specs anyway.
The word group can be used in SQL queries and therefore can create unexpected behaviour when a column itself is called group
A better implementation would be to have a separate table for groups. This table would store all of the device specs for each group, and each device would have a parent group in the table instead of having to store its own specs. The branch dev/types-table begins to implement this.
Devices on the leaderboard are displayed in
groups
- those which have identical specs (including location) are grouped together. The current implementation of this system is for theDevice
table to have agroup
column with an index representing the group the device is part of. This presents some issues:group
can be used in SQL queries and therefore can create unexpected behaviour when a column itself is calledgroup
A better implementation would be to have a separate table for groups. This table would store all of the device specs for each group, and each device would have a parent group in the table instead of having to store its own specs. The branch
dev/types-table
begins to implement this.