Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Overall situation primary key generation method and system under distributed database

A database and distributed technology, applied in the database field, can solve problems such as indexing or sorting problems, increasing application complexity, discontinuous order of primary keys, etc., to ensure order and continuity, avoid single point of failure, and avoid performance bottlenecks Effect

Active Publication Date: 2015-09-16
CHINA TELECOM CORP LTD
View PDF5 Cites 16 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] First, the application layer generates its own unique primary key, which will increase the complexity of the application, and the write operation of the database must rely on the application
[0005] Second, a node provides an independent primary key generation service. Once the node fails, the entire system cannot provide primary key generation services, so there are single point of failure and performance bottlenecks
[0006] 3. The primary key generation service is provided through multiple nodes, which may cause discontinuous or reverse order of the primary key
For example, use the mode of dividing the primary key segment to keep the primary key from being repeated. Node A starts with 1000, and node B starts with 2000. Although this mode can ensure that the primary key is not repeated, it may cause some large primary keys to be generated first, and small primary keys It has not yet been generated, and there are problems such as discontinuous or reversed primary keys, which cause trouble for indexing or sorting, and do not meet the usage specifications of the database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Overall situation primary key generation method and system under distributed database
  • Overall situation primary key generation method and system under distributed database
  • Overall situation primary key generation method and system under distributed database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. The following description of at least one exemplary embodiment is merely illustrative in nature and in no way taken as limiting the invention, its application or uses. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

[0029] The relative arrangements of components and steps, numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present invention unless specifically stated otherwise.

[0030] At the same time, it should be understood that, for the convenience of d...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an overall situation primary key generation method and system under a distributed database and relates to the field of databases. According to the overall situation primary key generation method and system under the distributed database, through the building of a primary key server cluster, a main primary server in the cluster performs sorting on a plurality of primary key application requests and synchronizes results to other primary key servers in the cluster, primary key generation is separately executed by a plurality of key servers in the cluster, and all the primary key servers generate an overall primary key based on the synchronous primary key application requests. So that the strong consistency of the primary key is maintained, the orderliness and the continuity of the overall primary key are guaranteed, and meanwhile the problems of the single point of failure and the performance bottleneck of the primary key generation can be avoided.

Description

technical field [0001] The invention relates to the field of databases, in particular to a method and system for generating a global primary key in a distributed database. Background technique [0002] Horizontal sharding is one of the key technologies for building a distributed database cluster based on a relational database. It mainly splits a table with a large amount of data in the database into multiple small tables with the same structure, and the small tables are stored in multiple In the physical database, and through the middle layer software, the client's request for the large table is routed to the physical database where multiple small tables are located for execution. Since each small table is scattered in multiple physical libraries, the global uniqueness of the primary key of each small table cannot be guaranteed when new data is added. And ordered global primary key services. [0003] The global primary key currently has the following generation methods: ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F17/30
Inventor 华竹轩王桂荣徐楠刘智琼刘斌伍运珍俞科峰池炜成
Owner CHINA TELECOM CORP LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products