-
Notifications
You must be signed in to change notification settings - Fork 4
Data Models
Aanish Amir Waseem edited this page Jan 24, 2023
·
6 revisions
Database tables Schema design
geo_ids
id (PK) | geo_id | geo_data (json) | authority_token |
---|---|---|---|
1 | 89d864f50bb864fb79fb5672f51da53991bc92e12c61f9222d5e35cd5ad52c0c | "{"8": ["39191"], "13": ["391905dc", "39190674"], 15, 18, 19, 20}" | fV5V3fnsQO18RNZL |
2 | 37d63ebdd421fb7fcb966002ea78ad1df2d4a555105eb31fe12ac7fa6f329930 | "{"8": ["39191"], "13": ["391905d4"], 15, 18, 19, 20}" | RRF43fnsQO18RNZL |
3 | 37db37702822e0724cf6e3383f7d2aaa532f3b5a45fb40282bbba6f75ef46eb2 | "{"8": ["39191"], "13": ["39190664", "3919067c"], 15, 18, 19, 20}" | fV5V3fnsQO18R564 |
4 | da2504ff0e16a77ad5d86d0c4bd6f21fcd33c69ce78cb6c03d0245ab719c22b5 | "{"8": ["39191"], "13": ["39190674", "3919067c"], 15, 18, 19, 20}" | FFDV3fnsQO18RNZL |
geo_id is the foreign key from the middle table
geo_data is the json string containing the keys as resolution levels and values as the S2 cell tokens
authority_token is the token associated with a Domain
cells_geo_ids
id (PK) | geo_id (FK) | cell_id (FK) |
---|---|---|
1 | 1 | 1 |
2 | 1 | 2 |
3 | 2 | 2 |
geo_id is the foreign key from the geo_ids table
cell_id is the foreign key from the s2_cell_tokens table
s2_cell_tokens
id (PK) | cell_token |
---|---|
1 | 391905dc |
2 | 39191 |
3 | 39190674 |