CN103617181A - Method and device for establishing universal database of relationships - Google Patents
Method and device for establishing universal database of relationships Download PDFInfo
- Publication number
- CN103617181A CN103617181A CN201310544882.3A CN201310544882A CN103617181A CN 103617181 A CN103617181 A CN 103617181A CN 201310544882 A CN201310544882 A CN 201310544882A CN 103617181 A CN103617181 A CN 103617181A
- Authority
- CN
- China
- Prior art keywords
- sibship
- data
- relationships
- stored
- canonical representation
- 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.)
- Withdrawn
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2291—User-Defined Types; Storage management thereof
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a method and a device for establishing a universal database of relationships. The method includes distributing storage spaces for the universal database of the relationships in a relational database system; creating a table in each distributed storage space for each attribute of a standard representation structure implemented in a process or a device for universally representing data of the relationships; storing the data of the relationships into the tables according to corresponding relations of fields of the attributes. Each table can be used for storing the fields of data items represented by the corresponding attribute in the standard representation structure. The data stored in the tables are presented by standard representation structural units. Each standard representation structural unit is recorded and stored by the single corresponding table. An index further can be created for each two fields which specify two relevant parties in the corresponding tables so as to increase the retrieval speed, and two or more tables can be created for separately storing the data of the relationships according to importance of the data of the relationships. The method and the device have the advantages that the data of the relationships of all categories of relationships can be truly stored in a concentrated and unified manner, and accordingly comprehensive systematic analysis can be carried out on the basis of the stored data of the relationships.
Description
Technical field
The invention belongs to computer information processing field, relate in particular to a kind of sibship conventional data base construction method and device.
Background technology
Application for a patent for invention a kind of sibship data general-purpose method for expressing and device are given chapter and verse extracting rule from sibship data between existing sibship extracting data two people, then according to transformation rule, the data of extraction are converted to canonical representation structure, the method is that the centralized and unified storage of all sibship data lays the foundation, and really will realize the centralized and unified storage of sibship data and carry out on this basis comprehensive systematic analysis also must building sibship Universal Database.The database platform of current popular is relational database system, and conventional have MS SQL, ORACLE, a MYSQL etc., and building sibship Universal Database can build on the basis of these ripe relational database systems.
Summary of the invention
The present invention will solve the Construct question of sibship Universal Database, for addressing the above problem, the object of the present invention is to provide a kind of sibship conventional data base construction method and device, make all sibship data of whole sibship kinds can really accomplish centralized and unified storage and carry out comprehensive systematic analysis on this basis.
For solving the problems of the technologies described above, the sibship conventional data base construction method that the present invention proposes, comprises the following steps:
It in relational database system, is general sibship database memory allocated space;
Each attribute that creates a canonical representation structure for institute's employing sibship data general-purpose method for expressing or in installing in the storage space distributing has all created the table of the field that can store the represented data item of respective attributes of correspondence;
According to attribute field corresponding relation, the sibship data that represent by canonical representation structural unit are stored in table, a canonical representation structural unit is stored with a table record.
For solving the problems of the technologies described above, the sibship Universal Database construction device that the present invention proposes, this device possesses:
At least one processor; And
At least one storer, contains computer program code, and described at least one storer and computer program code are configured to utilize described at least one processor to make described device
It in relational database system, is general sibship database memory allocated space;
Each attribute that creates a canonical representation structure for institute's employing sibship data general-purpose method for expressing or in installing in the storage space distributing has all created the table of the field that can store the represented data item of respective attributes of correspondence;
According to attribute field corresponding relation, the sibship data that represent by canonical representation structural unit are stored in table, a canonical representation structural unit is stored with a table record.
As the further improvement of the method for the invention or device, described method or device can be set up index for indicating two fields of two attributes of two parties that participate in sibship in corresponding canonical representation structure in table, to improve query and search efficiency.Also can do following adjustment according to actual, in the step of establishment table, create two or more tables, one of them is as master data sheet, for storing, by canonical representation structure, for indicating, participate in the represented data item of main attribute of sibship classification and the residing sibship role of two people etc. between two parties, two people of sibship, other data item is stored in other table, and this is not in the situation that above-mentioned other data item outside important is each party possesses a minute different table and store and can realize conserve space.
Accompanying drawing explanation
Fig. 1 is the basic procedure that sibship Universal Database builds.
Embodiment
Below in conjunction with accompanying drawing, describe.
The basic procedure of sibship conventional data base construction method and device is referring to Fig. 1:
The first step is general sibship database memory allocated space in relational database system.First choose a kind of relational database system as the basic database platform of setting up sibship Universal Database, and in this relational database system, be sibship Universal Database memory allocated space, conventional relational database system has MS SQL, ORACLE, MYSQL etc. at present, can choose according to actual conditions, the factor of considering mainly contains data volume, performance requirement, cost input etc., if just can select such as wanting to reduce costs the MYSQL that freely increases income;
Second step, each attribute that creates a canonical representation structure for institute's employings sibship data general-purpose method for expressing or in installing in the storage space distributing has all created the table of the field that can store the represented data item of respective attributes of correspondence, thereby assurance sibship tables of data can be stored completely by sibship data in the data of canonical representation representation; Also can create two or more tables of data, one of them is as master data sheet, for storing, by canonical representation structure, for indicating, participate in the represented data item of main attribute of sibship classification and the residing sibship role of two people etc. between two parties, two people of sibship, other data item is stored in other table, when query analysis, these two or more tables of data can be placed in a view, similarly be also in a table for inquiring user etc.; In order to improve the speed of retrieval, can set up index for indicating two fields of two attributes of two parties that participate in sibship in corresponding canonical representation structure in table;
The 3rd step, stores the sibship data that represent by canonical representation structural unit in table into according to attribute field corresponding relation, and a canonical representation structural unit is stored with a table record; In the situation that establishment has a plurality of tables of data to store respectively, a canonical representation structural unit may need each tables of data, and each stores respectively corresponding data with a table record.
Embodiment 1
This example relies on commercial relational database system ORACLE to realize, login ORACLE Database Systems, create a COMM_RELATION database as sibship Universal Database, memory allocated space, in COMM_RELATION database, create a COMM_RELATION table, the field of definition list has P1, P2, R, type is respectively VCHAR (18), VCHAR (18), VCHAR (12), the P1 of the corresponding canonical representation structure of difference, P2, tri-attributes of R, it in actual storage, is the identification card number of storing respectively party 1, party 2 identification card number, concrete sibship kind, and at field P1, the upper establishment of P2 index,
Suppose to have certain family in census register management system to have 4 people V0, V1, V2, V3, householder is V0, the currency of V1 " with householder's relation " is " wife ", and the currency of V2 " with householder's relation " is " son ", and the currency of V3 " with householder's relation " is " daughter ".Through extracting and be converted to canonical representation structure, the simplest canonical representation structure should have three attributes, and wherein two attributes indicate both sides party, and an attribute indicates sibship classification and the implicit residing sibship role of two people of determining between two people.With tlv triple (P1, P2, R) represent, P1, P2 get the value of the representation relation people I.D.s such as V0, V1, V2, V3, R gets the sibship classification of text description, be converted to corresponding polynary ancestral and be respectively (V0, V1, marital relations), (V0, V2, relations between parents and children), (V0, V3, relations between parents and children).
By INSERT statement, insert three and be recorded in COMM_RELATION table, by attribute field corresponding relation, carry out assignment.Complete insertion statement example is as follows:
INSERT COMM_RELATION
SET P1=E1.P1,P2=E1.P2,R=E.R。
Claims (6)
1. a sibship conventional data base construction method, is characterized in that comprising the following steps:
It in relational database system, is sibship Universal Database memory allocated space;
Each attribute that creates a canonical representation structure for institute's employing sibship data general-purpose method for expressing or in installing in the storage space distributing has all created the table of the field that can store the represented data item of respective attributes of correspondence;
According to attribute field corresponding relation, the sibship data that represent by canonical representation structural unit are stored in table, a canonical representation structural unit is stored with a table record.
2. method according to claim 1, is characterized in that: for indicating two fields of two attributes of two parties that participate in sibship in corresponding canonical representation structure in table, set up index.
3. method according to claim 1 and 2, it is characterized in that: in the step of establishment table, create two or more tables, one of them is as master data sheet, the represented data item of main attribute that participates in sibship classification and the residing sibship role of two people etc. between two parties, two people of sibship for storing by canonical representation structure for indicating, other data item is stored in other table.
4. a sibship Universal Database construction device, is characterized in that, this device possesses:
At least one processor; And
At least one storer, contains computer program code, and described at least one storer and computer program code are configured to utilize described at least one processor to make described device
It in relational database system, is sibship Universal Database memory allocated space;
Each attribute that creates a canonical representation structure for institute's employing sibship data general-purpose method for expressing or in installing in the storage space distributing has all created the table of the field that can store the represented data item of respective attributes of correspondence;
According to attribute field corresponding relation, the sibship data that represent by canonical representation structural unit are stored in table, a canonical representation structural unit is stored with a table record.
5. device according to claim 4, is characterized in that: for indicating two fields of two attributes of two parties that participate in sibship in corresponding canonical representation structure in table, set up index.
6. according to the device described in claim 4 or 5, it is characterized in that: in the step of establishment table, create two or more tables, one of them is as master data sheet, the represented data item of main attribute that participates in sibship classification and the residing sibship role of two people etc. between two parties, two people of sibship for storing by canonical representation structure for indicating, other data item is stored in other table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310544882.3A CN103617181A (en) | 2013-11-07 | 2013-11-07 | Method and device for establishing universal database of relationships |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310544882.3A CN103617181A (en) | 2013-11-07 | 2013-11-07 | Method and device for establishing universal database of relationships |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103617181A true CN103617181A (en) | 2014-03-05 |
Family
ID=50167884
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310544882.3A Withdrawn CN103617181A (en) | 2013-11-07 | 2013-11-07 | Method and device for establishing universal database of relationships |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103617181A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105069045A (en) * | 2015-07-23 | 2015-11-18 | 百度在线网络技术(北京)有限公司 | Method and system for updating non-permanent relational data in database |
WO2016127739A1 (en) * | 2015-02-13 | 2016-08-18 | 广州神马移动信息科技有限公司 | Method and device for storing data |
CN109815296A (en) * | 2018-12-29 | 2019-05-28 | 北京中科闻歌科技股份有限公司 | The personage's construction of knowledge base method, apparatus and storage medium of notarization document |
-
2013
- 2013-11-07 CN CN201310544882.3A patent/CN103617181A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2016127739A1 (en) * | 2015-02-13 | 2016-08-18 | 广州神马移动信息科技有限公司 | Method and device for storing data |
RU2671044C1 (en) * | 2015-02-13 | 2018-10-29 | Гуанчжоу Шэньма Мобайл Информэйшн Текнолоджи Ко., Лтд. | Method and device for data storage |
CN105069045A (en) * | 2015-07-23 | 2015-11-18 | 百度在线网络技术(北京)有限公司 | Method and system for updating non-permanent relational data in database |
CN105069045B (en) * | 2015-07-23 | 2018-07-31 | 百度在线网络技术(北京)有限公司 | Update the data the method and system of relation data non-permanent in library |
CN109815296A (en) * | 2018-12-29 | 2019-05-28 | 北京中科闻歌科技股份有限公司 | The personage's construction of knowledge base method, apparatus and storage medium of notarization document |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106997378B (en) | Redis-based database data aggregation synchronization method | |
CN111046034B (en) | Method and system for managing memory data and maintaining data in memory | |
CN103703467B (en) | Method and apparatus for storing data | |
Zhao et al. | Modeling MongoDB with relational model | |
CN103577440B (en) | A kind of data processing method and device in non-relational database | |
CN106933833B (en) | Method for quickly querying position information based on spatial index technology | |
CN111191303A (en) | BIM data processing method and device, electronic equipment and computer storage medium | |
US10002142B2 (en) | Method and apparatus for generating schema of non-relational database | |
CN105630803B (en) | The method and apparatus that Document image analysis establishes index | |
CN103605651A (en) | Data processing showing method based on on-line analytical processing (OLAP) multi-dimensional analysis | |
US20160328445A1 (en) | Data Query Method and Apparatus | |
EP2821924A1 (en) | Method, device and system for querying data index | |
CN108009265B (en) | Spatial data indexing method in cloud computing environment | |
CN102819589B (en) | ETL (Extract Transform Load)-based data optimization method and equipment | |
CN105589864A (en) | Data inquiry method and apparatus | |
CN111008521A (en) | Method and device for generating wide table and computer storage medium | |
US10078624B2 (en) | Method of generating hierarchical data structure | |
CN107609151A (en) | The method that XBRL instance documents caching is realized based on Redis | |
CN105760505A (en) | Hive-based historical data analysis and archiving method | |
CN103617181A (en) | Method and device for establishing universal database of relationships | |
US20130262400A1 (en) | Data index query method, apparatus and system | |
CN105138638A (en) | Database distribution method based on application layer | |
CN101639851A (en) | Method for storing and querying data and devices therefor | |
CN110874366A (en) | Data processing and query method and device | |
CN117216109A (en) | Data query method, device and storage medium for multi-type mixed data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C04 | Withdrawal of patent application after publication (patent law 2001) | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20140305 |