The invention relates to the field of data isolation, and provides a flying
saucer shooting athlete training data isolation method based on a multi-tenant architecture. The method aims at solving the problem that a traditional data isolation technology effectively isolates tenant data in a multi-tenant environment. According to the main scheme, the method comprises the steps of designing a
database architecture, determining a fragmentation key and designing a fragmentation strategy. The dependency of ShardingSphere is introduced, a
data source is configured, and a fragmentation rule is configured according to a fragmentation strategy; the method comprises the following steps: initializing fragmentation databases and tables, creating a plurality of databases according to a fragmentation rule, creating the same table structure in each
database, and creating a corresponding fragmentation table in each
database according to the fragmentation rule; by
monitoring data in a database table created after fragmentation, a dynamic fragmentation adjustment strategy is adopted to reduce the occurrence of a data
skew condition, and a dynamic scaling strategy is adopted to adjust
system resource distribution; according to the tenant ID, fragment key values are calculated, which database table the data is routed to is determined,
access control is achieved, and only authorized tenants can access the data to which the tenants belong.