Open awoods187 opened 3 years ago
Vy Ton (vy-ton) commented: Andy Woods Can you weigh in on the priority of this issue?
Andy Woods (awoods187) commented: Medium--its a good pattern for us to communicate but not a priority.
Nick Vigilante (nickvigilante) commented: Andy Woods Where should this example go? I was thinking some combination of the foreign key doc and the SET LOCALITY doc.
Andy Woods (awoods187) commented: I think it should actually go within the multi-region docs. Richard Loveland can you suggest a place?
Richard Loveland (rmloveland) commented: If we want it in the multi-region docs, I would probably suggest adding it as a new page called something like “Multi-region Schema Design” underneath Migrate to Multi-Region in the TOC
Would also add a bunch of links from the various Advanced Schema Design Pages in the TOC
And finally totes agree with Nick that referencing it from FKs and SET LOCALITY and any other SQL concept docs it references (indexes, primary keys, inserts, etc.) is a great idea
Andy Woods (awoods187) commented:
We learned of a recent multi-region schema modeled as a standard “snowflake pattern”, but with a few cool additions with locality and data homing. First, data homing was pushed to the top of this hierarchy. All children inherited their parent’s homing using ON UPDATE CASCADE foreign key constraints. Second, all tables in the hierarchy except for the top were REGIONAL BY ROW. The top was GLOBAL, even though it contained a manual crdb_internal_region column. This looked like the following (which you can run in ./cockroach demo --global --empty --nodes=9 if you’d like to play around with it):
We should document this pattern.
Jira Issue: DOC-1451