Closed kgroble closed 6 years ago
Diagram of proposed schema.
Added blocks table, removed now redundant color/letter information from flip table, added coordinates to flips (to help with things like "flip the bottom block"), added redo needed flags to data tables, consolidated survey tables.
New diagram
It looks like you didn't set any of the foreign block_id
's to be foreign keys.
It doesn't seem like it gains us much. The block
table should have the full cross product of game_id
s and valid block_id
s in it, so does a foreign key from (game_id, block_id)
to the block
table do anything the foreign key on game_id
to the game
table doesn't?
The functionality's the same, but the constraints are not. We can leave it as-is, since of all the data to get messed up, block_id
is not one I'm really worried about.
I disagree block id's should be the data were most concerned about getting messed up, in the event that our block ids get borked in the table somehow it will screw up the network since then we cant get a valid set of colors and letters to pair it with
@rbubulka I added the constraints Lewis originally brought up, do you think there's any more we can do?
I realized before I get any farther I should get some feedback on the schema I came up with. This drops a bunch of columns that used to exist whose purpose I couldn't figure out, but I wouldn't mind adding them back if there's a good reason to.
Highlights: