Method and system for migrating relational data to HBbase
A relational and data technology, applied in the field of HBase database, can solve the problems of reading and writing performance impact, loss of data mode information and data, space waste, etc., to achieve the effect of improving access performance, flexible configuration, and saving storage space
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0059] In Embodiment 1, the table mapping adopts one-to-one mapping, the column mapping adopts the default mode, and the row key is a multi-key type. For example, Table 1 is the schema definition of the table named t1 in the relational database, and Table 2 and Table 3 are respectively the schema definition and the data storage table schema mapped to the corresponding table named hash(t1) in HBase.
[0060] Table 1
[0061]
[0062] Table 2
[0063]
[0064] table 3
[0065]
Embodiment 2
[0066] In Embodiment 2, the table mapping adopts many-to-one mapping, the column mapping adopts a sequential method, and the row key is a single key type. As shown in Table 4, it is a sampling table stored in the relational database. The generation time of the sampling table is November 12, 2013. Table 5 is another sampling table stored in the relational database. The generation of the sampling table The time is November 13, 2013. Since Table 4 and Table 5 express the same business and table schema, in order to control the data volume of a single table and improve local access performance, the annual log information table generated on a daily basis can be Store the date information on the timestamp of the column, thereby merging and storing tables of multiple days into one table. Therefore, Table 4 and Table 5 can be combined and stored as Table 6, where Table 6 is a data storage table in HBase.
[0067] Table 4
[0068] ID
sample value
123
12.1
...
Embodiment 3
[0073] In Embodiment 3, the table mapping adopts one-to-one mapping, the column mapping adopts a sequential manner, and the row key is a single key type. Table 7 is a data table in the relational database, and Table 8 is the corresponding data storage table mapped to HBase.
[0074] Table 7
[0075] ID
0:00
0:15
0:30
...
23:45
123
12.1
15.1
13.1
...
1.1
124
11.1
16.1
18.1
...
8.1
...
...
...
...
...
...
[0076] Table 8
[0077]
[0078] The above column mapping is carried out in a time-series manner, that is, to list all the time value attributes in the table in the relational database in the data storage table of HBase and define a column cluster separately. The column cluster contains a column, and the migrated data corresponds to the columns with different timestamps.
[0079] Batch data import is divided into two parts: data reading and data writing, ...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com