CN102567505B - Distributed database and data manipulation method - Google Patents

Distributed database and data manipulation method Download PDF

Info

Publication number
CN102567505B
CN102567505B CN201110440736.7A CN201110440736A CN102567505B CN 102567505 B CN102567505 B CN 102567505B CN 201110440736 A CN201110440736 A CN 201110440736A CN 102567505 B CN102567505 B CN 102567505B
Authority
CN
China
Prior art keywords
data
data object
distributed
node
objects
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201110440736.7A
Other languages
Chinese (zh)
Other versions
CN102567505A (en
Inventor
李漓春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201110440736.7A priority Critical patent/CN102567505B/en
Publication of CN102567505A publication Critical patent/CN102567505A/en
Application granted granted Critical
Publication of CN102567505B publication Critical patent/CN102567505B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a distributed database, which comprises one or a plurality of nodes. The nodes are used for storing one or a plurality of data objects. Each data object comprises one or a plurality of lists. Data are contained in the lists, and the data objects of the same structures belong to an identical data object set. The data objects have data object identifications used for distinguishing data objects in the identical data object set. The invention further discloses a data manipulation method of a distributed database, thereby being convenient for management of complex data, high in expansibility and more powerful in functions. In addition, the data manipulation method is also capable of achieving manipulation of complex data.

Description

A kind of distributed data base and data manipulation method thereof
Technical field
The present invention relates to the database technology of computer network, particularly relate to a kind of distributed data base and data manipulation method thereof.
Background technology
Traditional database is centralized relevant database.Along with the increase of data volume, need to be adopted by Data distribution8 multiple database server to store.Traditional relevant database is difficult to distribution, expansion difficulty.Therefore, industry is by simplifying the Data Management Model of relevant database, and the ability of sacrificing data management exchanges enhancing extendability for, proposes distributed data base bigtable, the Cassandra towards row of high expansion.
Distributed data base towards row is made up of multiple database node, data is stored in rows.The often row line identifier that has whole database unique, often row comprises multiple row, often show its interior row name uniquely of being expert at.Data are distributed with behavior unit and are stored into multiple database node, and database node stores the data in one or more line identifier interval range, and data line is at least distributed to a database node and stored.For the distributed data base towards row, need to provide line identifier, row name and operational order to carry out additions and deletions to the one or more column datas in the database node of same a line and look into and change operation.
Towards the distributed data base of row, to there is data managing capacity limited, cannot the problem of Storage and Processing complex data, thus also cannot support storage and the operation of complex data.
Summary of the invention
In view of this, fundamental purpose of the present invention is to provide a kind of distributed data base and data manipulation method thereof, to solve the limited problem of existing distributed data base data managing capacity.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention provides a kind of distributed data base, described distributed data base comprises one or more node, and described node is used for storing one or more data object, and described data object comprises one or more table, comprises data in described table;
The described data object that structure is identical belongs to same set of data objects; Described data object has data object tag, and this data object tag is for distinguishing each data object in same set of data objects.
In such scheme, described node is specifically for storing the data object in designation area, and described interval divides based on the data object tag of each data object.
In such scheme, described table comprises at least zero row and at least one row.
Present invention also offers a kind of data manipulation method of distributed data base, described distributed data comprises one or more node, and described method comprises:
Distributed by one or more data object and be stored into each node of distributed data base, described data object comprises one or more table, comprises data in described table, and the described data object that structure is identical belongs to same set of data objects; Described data object has data object tag, and this data object tag is for distinguishing each data object in same set of data objects;
Described node, after receiving data operation request or trigger data operation requests, according to the operational order in described data operation request, operates the data object specified by described data operation request.
In such scheme, described data operation request comprises the set of data objects title, data object tag and the operational order sequence that are used to specify set of data objects, and this operational order sequence comprises at least one operational order.
In such scheme, describedly one or more data object is distributed and is stored into each node of distributed data base, comprise: based on described data object tag, each data object is divided into one or more interval, and the data object in described one or more interval is distributed and is stored in corresponding node.
In such scheme, describedly one or more data object is distributed and is stored into each node of distributed data base, for: adopt distributed hashtable (DHT) algorithm to be distributed by one or more data object and be stored into each node of described distributed data base.
Distributed data base provided by the invention and data manipulation method thereof, data are carried out distributed storage with the form of data object, one or more table is comprised in a data object, thus one group of complex data in close relations can be comprised, be convenient to manage complex data, extendability is strong, and with better function; In addition, data manipulation can also be carried out in units of data object, thus realize the operation to complex data.
Accompanying drawing explanation
Fig. 1 is the schematic diagram that each node of the embodiment of the present invention one distributed data base stores data;
Fig. 2 is the schematic diagram that each node of the embodiment of the present invention two distributed data base stores data;
Fig. 3 by the embodiment of the present invention three distributed data base the structural representation of storage set of data objects;
Fig. 4 is the schematic flow sheet carrying out data manipulation in the embodiment of the present invention four;
Fig. 5 is another schematic flow sheet carrying out data manipulation in the embodiment of the present invention four.
Embodiment
Basic thought of the present invention is: provide a kind of distributed data base, possesses the extendability the same with the distributed data base towards row, can greatly strengthen data manipulation ability simultaneously.
A kind of distributed data base of the present invention, comprises one or more node, and a node stores one or more data object, and each data object comprises one or more table, comprises data in described table.
Wherein, each data object that structure is identical belongs to same set of data objects, and each data object all has data object tag, and data object tag is unique in set of data objects, for being distinguished by each data object in a set of data objects.
Here, identical quantity, title and the structure referring to the table comprised in described data object of the structure of data object is identical.
Wherein, table can store the data of at least 0 row and at least one row.
Wherein, described interval divides based on the data object tag of each data object, and a node is responsible for storing the data object in designation area.
Accordingly, present invention also offers the method that above-mentioned distributed data base carries out data manipulation, described method comprises: distributed by one or more data object and be stored into each node of distributed data base, described data object comprises one or more table, comprises data in described table; Described node, after receiving data operation request or trigger data operation requests, according to the operational order in described data operation request, operates the data object specified by described data operation request.
Here, a data operation request limits and operates a data object.Data operation request comprises: be used to specify the set of data objects title of set of data objects, data object tag, operational order sequence.Wherein, operational order sequence can comprise at least one operational order.Particularly, operational order can adopt the form of Structured Query Language (SQL) (SQL, Structured Query Language), and the SQL that SQL here can adopt with access relation type database is identical.
Describedly one or more data object is distributed and is stored into each node of distributed data base, comprise: based on described data object tag, each data object is divided into one or more interval, and the data object in described one or more interval is distributed and is stored in corresponding node.
Particularly, distributed hashtable (DHT) algorithm can be adopted to be distributed by one or more data object and be stored into each node of described distributed data base.
In addition, distributed data base can also be managed each table by the Biao Ji version number in data object level or data object or lock, to realize high Concurrency Access and to avoid data inconsistent.Specific implementation process manage with existing Biao Ji version number and the implementation procedure that locks identical, repeat no more.
Embodiment one
The present embodiment, is illustrated the distribution of data object and storage.
Particularly, data object can be distinguished with 26 letters of a-z respectively, be divided into 26 parts, such as, corresponding letter can be comprised in the mark of each data object.
As shown in Figure 3, distributed data base comprises four nodes, is node A, Node B, node C, node D respectively, stores a part of data object respectively.Particularly, node A is responsible for storing the data object in a-g interval, and Node B is responsible for storing the data object in h-p interval, and node C is responsible for storing the data object in p-r interval, and node D is responsible for storing the data object in s-z interval.
Embodiment two
In the present embodiment, the distribution of data object and storage are illustrated.
Particularly, by comprising corresponding numeral in each data object tag, data object being used respectively the value distinguishing of 1 to 16, being divided into 16 parts.
As shown in Figure 4, distributed data base comprises four nodes, is node A, Node B, node C, node D respectively, stores a part of data object respectively.Particularly, between node A memory block (Isosorbide-5-Nitrae] and interval (12,16] data object in, between Node B memory block (4,8],, and interval (0,4] data object in, between node C memory block (8,12], interval (4,8] data object in, between node D memory block (12,16], interval (8,12] in data object.
Here, numeric type data object identity can be mapped as by unified for a certain attribute of data object with mapping functions such as hash functions, based on the numeric type data object identity of data object, data object is divided into and is evenly divided into several part, thus data object also can be uniformly distributed when distributing and store.Such as, a certain attribute of data object can be telephone number, user's title etc.
Embodiment three
The present embodiment, is illustrated the structure of the set of data objects of distributed data library storage and the structure of data object.
As shown in Figure 3, distributed data base stores two set of data objects (Object collection), is two set of data objects that name is called user (user), service (service) respectively.
As shown in Figure 3, data object 12 (Object 12) and data object 30 (Object 30) is contained in set of data objects user, the structure of Object 12 and Object 30 is identical, all contain public subscriber identification (PUI, Public user identity), private user identity (PVI, Private User Identity), signing (subscription), contact (contact) four table.Wherein, its structure of table of the same name in Object 12 and Object 30 is also identical.Such as, the number of columns shown with the PUI of Object 30 of the PUI table of Object 12 is all identical with row name.
As shown in Figure 3, contain data object 22 (Object 22) and data object 42 (Object 42) in set of data objects service, the structure of Object 22 and Object 42 is identical, all contains t1, t2 two table.Wherein, its structure of table of the same name in Object22 and Object 42 is also identical.
Embodiment four
The present embodiment, for be distributed by each data object and the flow process of data manipulation is described in detail after being stored into each node of distributed data base.
If the node of request operational data is not same node with the responsible node storing these data, data manipulation flow process as shown in Figure 4, comprises step:
The node of step 401, request operational data sends data operation request to the node being responsible for storing described data, wherein, includes set of data objects title, data object tag, operational order sequence in described data operation request.
Here, the node of request operational data directly can send described data operation request to the node being responsible for storing data, also can forward described data operation request to the node being responsible for storing data via other nodes.
The node of step 402, the described data of responsible storage, according to the operational order sequence in described data operation request, operates the specified data object in specified data object set successively.Afterwards, the result of data manipulation can also be returned to the node of described request service data.
Here, specified data object set is the set of data objects that in described data operation request, set of data objects title identifies, and specified data object is the data object in described data operation request corresponding to data object tag.
Here, the node of request operational data and the responsible node storing data can be the nodes that two in same distributed data are different, also can be two the different nodes belonging to different distributions formula database respectively.The node of request operational data can also be the client node outside distributed data base.
If the node of request operational data is same node with the responsible node storing data, data manipulation flow process as shown in Figure 5, comprises step:
Step 501, the responsible node trigger data operation requests storing data, wherein, include set of data objects title, data object tag, operational order sequence in described data operation request.
Here, client-side program can be loaded in the node of responsible storage data, when this client-side program is accessed, trigger data can operates on other occasions, generate data operation request.Such as, when receiving call request, corresponding data manipulation can be triggered, generating corresponding data operation request.
The node of step 502, the described data of responsible storage, according to the operational order sequence in described data operation request, operates the specified data object in specified data object set successively.
Such as, service data object can be: according to the table in the train value inquiry specified data object of the one or more row comprised in described data operation request, obtain the data of corresponding line and return; Or, described data operation request be joint operation (join) ask time, data object specified by described data operation request is inner, and two tables specified by described data operation request are carried out joint operation (join).
Be described in further details for the process of the data object of Fig. 3 to data manipulation below.
If in the set of data objects shown in Fig. 3 and data object, in Object 12, the content of PUI table is as shown in table 1 below, and the content of contact table is as shown in table 2 below:
PUI Login state (Reg_state) Disable flag (barring)
SIP:[email protected] 1 0
SIP:[email protected] 1 0
Table 1
PUI PVI Path (Path) (expires) time of termination
SIP:[email protected] [email protected] 10.0.0.2:5060 2011-11-14 09:56:07
SIP:[email protected] [email protected] 10.0.0.2:5060 2011-11-14 09:56:07
SIP:[email protected] [email protected] 10.0.0.5:5060 2011-11-14 10:01:05
Table 2
The set of data objects name of tentation data operation requests is called user, and data object tag is 12.
If the operational order sequence in data operation request is: select * from contact where PUI=SIP:[email protected] and [email protected], then following data manipulation is performed: inquiry obtains the first row data of the contact table of Object 12 and returns to the node of request operational data.
If the operational order sequence in data operation request is: Update PUI set reg_state=0 where PUI=SIP:[email protected]; Delete from contact where PUI=SIP:[email protected], then perform following data manipulation: the reg_state value that the PUI of Object 12 shows the first row data is revised as 0, and delete the first row data and the third line data of the contact table of Object 12, afterwards, the response of successful operation can also be returned to the node of request operational data.
The above, be only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.

Claims (7)

1. a distributed data base, is characterized in that, described distributed data base comprises one or more node, and described node is used for storing one or more data object, and described data object comprises one or more table, comprises data in described table;
The described data object that structure is identical belongs to same set of data objects; Described data object has data object tag, and this data object tag is for distinguishing each data object in same set of data objects, and the structure of described data object is identical refers to that the quantity of the table comprised in described data object, title and structure are identical;
By the Biao Ji version number in data object level or data object, each described table is managed or locked.
2. distributed data base according to claim 1, is characterized in that,
Described node is specifically for storing the data object in designation area, and described interval divides based on the data object tag of each data object.
3. distributed data base according to claim 1, is characterized in that, described table comprises at least zero row and at least one row.
4. a data manipulation method for distributed data base, is characterized in that, described distributed data comprises one or more node, and described method comprises:
Distributed by one or more data object and be stored into each node of distributed data base, described data object comprises one or more table, comprises data in described table, and the described data object that structure is identical belongs to same set of data objects; Described data object has data object tag, and this data object tag is for distinguishing each data object in same set of data objects, and the structure of described data object is identical refers to that the quantity of the table comprised in described data object, title and structure are identical;
Described node, after receiving data operation request or trigger data operation requests, according to the operational order in described data operation request, operates the data object specified by described data operation request;
By the Biao Ji version number in data object level or data object, each described table is managed or locked.
5. the data manipulation method of distributed data base according to claim 4, is characterized in that,
Described data operation request comprises the set of data objects title, data object tag and the operational order sequence that are used to specify set of data objects, and this operational order sequence comprises at least one operational order.
6. the data manipulation method of distributed data base according to claim 4, is characterized in that,
Describedly one or more data object is distributed and is stored into each node of distributed data base, comprise: based on described data object tag, each data object is divided into one or more interval, and the data object in described one or more interval is distributed and is stored in corresponding node.
7. the data manipulation method of distributed data base according to claim 4, it is characterized in that, describedly one or more data object is distributed and is stored into each node of distributed data base, for: adopt distributed hashtable (DHT) algorithm to be distributed by one or more data object and be stored into each node of described distributed data base.
CN201110440736.7A 2011-12-26 2011-12-26 Distributed database and data manipulation method Expired - Fee Related CN102567505B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110440736.7A CN102567505B (en) 2011-12-26 2011-12-26 Distributed database and data manipulation method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110440736.7A CN102567505B (en) 2011-12-26 2011-12-26 Distributed database and data manipulation method

Publications (2)

Publication Number Publication Date
CN102567505A CN102567505A (en) 2012-07-11
CN102567505B true CN102567505B (en) 2015-05-20

Family

ID=46412904

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110440736.7A Expired - Fee Related CN102567505B (en) 2011-12-26 2011-12-26 Distributed database and data manipulation method

Country Status (1)

Country Link
CN (1) CN102567505B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103902568B (en) * 2012-12-27 2017-05-31 ***股份有限公司 A kind of multinode database synchronization method divided based on data and multinode Database Systems
CN105025057A (en) * 2014-04-25 2015-11-04 中兴通讯股份有限公司 Method, device and system for realizing user data distribution
CN104202435B (en) * 2014-09-28 2017-10-31 北京奇虎科技有限公司 Data drag the method and apparatus taken
CN105022833A (en) * 2015-08-10 2015-11-04 浪潮(北京)电子信息产业有限公司 Data processing method, nodes and monitoring system
CN106372160A (en) * 2016-08-31 2017-02-01 天津南大通用数据技术股份有限公司 Distributive database and management method
CN107193654B (en) * 2017-05-12 2020-11-10 广州接入信息科技有限公司 Resource operation method and device of distributed system and distributed system
CN110337633A (en) * 2017-06-30 2019-10-15 华为技术有限公司 A kind of date storage method and equipment
CN107679237A (en) * 2017-10-26 2018-02-09 杨晓艳 A kind of distributed data base management system (DDBMS), method and device
CN108696585A (en) * 2018-05-11 2018-10-23 国网电子商务有限公司 A kind of distributed storage method and system of data
CN110032553B (en) * 2019-04-08 2021-04-06 中国人民大学 DNA generation and verification method of data object

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101529809A (en) * 2006-11-02 2009-09-09 北方电讯网络有限公司 Distributed storage of routing information in a link state protocol controlled network
CN102053975A (en) * 2009-10-30 2011-05-11 国际商业机器公司 Database system and cross-database query optimization method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100049715A1 (en) * 2008-08-20 2010-02-25 Yahoo! Inc. Controlled parallel propagation of view table updates in distributed database systems

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101529809A (en) * 2006-11-02 2009-09-09 北方电讯网络有限公司 Distributed storage of routing information in a link state protocol controlled network
CN102053975A (en) * 2009-10-30 2011-05-11 国际商业机器公司 Database system and cross-database query optimization method

Also Published As

Publication number Publication date
CN102567505A (en) 2012-07-11

Similar Documents

Publication Publication Date Title
CN102567505B (en) Distributed database and data manipulation method
CN102567495B (en) Mass information storage system and implementation method
US7461066B2 (en) Techniques for sharing persistently stored query results between multiple users
US9239763B2 (en) Container database
US20140122510A1 (en) Distributed database managing method and composition node thereof supporting dynamic sharding based on the metadata and data transaction quantity
US8700560B2 (en) Populating a multi-relational enterprise social network with disparate source data
CN107247734A (en) A kind of distributed data base major key generation method and system
CN105512200A (en) Distributed database processing method and device
CN102663007B (en) Data storage and query method supporting agile development and lateral spreading
CN101901242A (en) Federated configuration data management
CN102122285A (en) Data cache system and data inquiry method
JP6928677B2 (en) Data processing methods and equipment for performing online analysis processing
EP2713555B1 (en) Data configuration method and device, and rollback method and device for data configuration
CN104657387B (en) A kind of data query method and device
CN103838770A (en) Logic data partition method and system
CN102915382A (en) Method and device for carrying out data query on database based on indexes
CN103761102B (en) A kind of uniform data service platform and its implementation
CN104008199B (en) A kind of data query method
CN102193990A (en) Pattern database and realization method thereof
CN104091228A (en) Systems for resource management, resource registering, resource inquiry and resource semantic corpus management of internet of things
US20080097971A1 (en) Peer-to-peer based secondary key search method and system for cluster database
CN106815258A (en) A kind of date storage method and coordinator node
CN113704248B (en) Block chain query optimization method based on external index
US9239852B1 (en) Item collections
RU2004131664A (en) METHOD AND DEVICE FOR HANDLING A REQUEST FOR RELATIVE DATABASES

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150520

Termination date: 20191226