IP Library › Granted Patent US 9,928,289
Granted Patent B2
US 9,928,289 · App. 14/385,184 · Granted Mar 27, 2018

Method for storing XML data into relational database

Inventor: Song Bi (Beijing, CN)
Assignee: BORQS WIRELESS LTD.
G06F17/30598G06F17/30917
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,928,289
App. No.
14/385,184
Granted
Mar 27, 2018
Kind
B2
Abstract

A method for storing XML data into a relational database, including the following steps: splitting an XML Schema into one or more mapping configuration files, each mapping configuration file corresponding to a relational database table; parsing an XML text, and according to the associative relationship in the mapping configuration files, inserting the data in the XML text into the multiple relational database tables; and accessing the database to read the data in the XML text. The method stores XML file data into a relational database, and accelerates data reading and access speed.

Claims (24)

1. A method for storing Extensible Markup Language (XML) data into a relational database, comprising:

splitting an XML Schema into one or more mapping configuration files, each of which corresponds to a relational database table, the one or more mapping configuration files each including of one root node and a plurality of child nodes, wherein XML attributes of the root node include Name, Initial Depth, and Depth Number, and XML attributes of the child nodes include identification (ID), Parent identification (Parent ID), Name, Depth Number, Maximum Value, and Type;

parsing XML text from the one or more mapping configuration files, and inserting data from the XML text into multiple relational database tables according to associative relationships in the one or more mapping configuration files, wherein parsing XML text from the one or more mapping configuration files includes:

judging whether to enter into a node of the XML text, according to an index file, by judging that a current parsing depth of the XML text is within a depth range attribute specified in the index file, and judging that a tag with a Depth Number attribute and a Name attribute exists in the mapping configuration file that matches the index file, and otherwise stopping the parsing, the parsing XML;

judging whether the node is a leaf node that does not contain a child node, according to the index file, and judging whether a record has been completed, according to the index file;

logging, in the index file, a tag entry flag, and saving all attributes of the tag, and logging a tag with a Depth Number attribute and a Name attribute found in the XML text; and

reading the data from the XML text by accessing the multiple relational database tables;

wherein the Name attribute of the root node of each of the one or more mapping configuration files is a non-null string, and specifies a name of a database table;

the Initial Depth attribute of the root node of each of the one or more mapping configuration files is a positive integer, and the one or more mapping configuration files are used when a parsing depth of the XML text is equal to the positive integer of the Initial Depth attribute of the root node;

the Depth Number attribute of the root node of each of the one or more mapping configuration files is a positive integer, and the one or more mapping configuration files are not used any more when the XML text is parsed from the Initial Depth attribute to the positive integer of the Depth Number attribute of the root node;

the ID attribute of the child nodes are positive integers, and represent node identifications for the child nodes;

the Parent ID attribute of the child nodes are integers, and represent identifications for parent nodes for one or more of the child nodes wherein the integer of the Parent ID is zero for each child node of the plurality of child nodes that has no parent node;

the Name attribute of the child nodes are non-null strings, and represent names of one or more tags;

the Depth Number attribute of the child nodes are positive integers;

the Maximum Value attribute of the child nodes are positive integers; and

the Type attribute of the child nodes are strings, and indicate whether the child nodes are primary key, indicate a basic data type for the child nodes, and indicate whether the child nodes are a leaf node, wherein indexes are created in different mapping configuration files according to a node of Primary Key type.

2. The method for storing XML data into a relational database according to claim 1 , wherein, identical nodes can appear in different mapping configuration files.

3. The method for storing XML data into a relational database according to claim 1 , wherein, judging whether the node is a leaf node that does not contain a child node according to the index file further comprises:

judging whether a tag of the node has a tag flag; and

converting a format for storing a tag content if the tag has a flag and the node is a leaf node; and

otherwise stopping the parsing.

4. The method for storing XML data into a relational database according to claim 3 , wherein, judging whether a record has been completed according to the index file further comprises:

saving the completed record and clearing the tag flag if the record has been completed; and

otherwise stopping the parsing.

Assignments (4)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 20, 2025
From: BORQS BEIJING LTD.
To: NEW BORQS TECHNOLOGIES(BEIJING) COMPANY, LTD.
Reel/Frame 072070/0923 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 14, 2021
From: BORQS WIRELESS LTD.
To: BORQS BEIJING LTD.
Reel/Frame 057790/0701 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 19, 2021
From: BORQS WIRELESS LTD.
To: BORQS BEIJING LTD.
Reel/Frame 056901/0245 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 11, 2014
From: BI, SONG
To: BORQS WIRELESS LTD.
Reel/Frame 034480/0381 →
Priority Claims (1)
CN 2012 1 0067768 · Mar 15, 2012 · national
Continuity (1)
Related Publication 20150046455A1 · Feb 12, 2015