CN101968794A - Method for transforming between embedded database and PC database - Google Patents

Method for transforming between embedded database and PC database Download PDF

Info

Publication number
CN101968794A
CN101968794A CN 201010270152 CN201010270152A CN101968794A CN 101968794 A CN101968794 A CN 101968794A CN 201010270152 CN201010270152 CN 201010270152 CN 201010270152 A CN201010270152 A CN 201010270152A CN 101968794 A CN101968794 A CN 101968794A
Authority
CN
China
Prior art keywords
database
embedded
platform
data
embedded database
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.)
Pending
Application number
CN 201010270152
Other languages
Chinese (zh)
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric Co Ltd
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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN 201010270152 priority Critical patent/CN101968794A/en
Publication of CN101968794A publication Critical patent/CN101968794A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

The invention is applicable to the field of databases and provides a method for transforming between an embedded database and a PC database. The method comprises the following steps of: when the PC database needs to be transformed into the embedded database, creating the embedded database, querying fields in the PC database, creating the same fields in the embedded database according to the query result, querying data records in the PC database, and adding all queried data into the embedded database; and when the embedded database needs to be transformed into the PC database, querying the data records in the embedded database which are transformed from the PC database and used in an embedded platform, and adding all queried data records into the PC database. The method realizes mutual recognition and data communication between the databases under the embedded platform and the PC platform, and greatly facilitates the data acquisition and processing under the two platforms.

Description

The method that a kind of embedded database and PC database are changed mutually
Technical field
The invention belongs to database field, relate in particular to the method that a kind of embedded database and PC database are changed mutually.
Background technology
At present, because the resource-constrained of embedded product, adopt small-sized data base management system (DBMS),, and can't adopt Database Systems with the similar large-scale general of PC as Sqlite3 for the management of data is general, as: SQLServer.But for most embedded product, the data in the special-purpose field that collects are saved in toy data base after, finally these data also need be transferred in the large database in the PC, add up processing accordingly and handle.So this just relates to intercommunication and transfer problem between embedded database and PC database.
Summary of the invention
The objective of the invention is to: the method that provides a kind of embedded database and PC database to change mutually, be intended to solve the problem that database under the different platform can not intercommunication.
The object of the present invention is achieved like this:
The method that a kind of embedded database and PC database are changed mutually, described method comprises:
When the PC database will be converted to embedded database, create embedded database earlier, field in the inquiry PC database, and in embedded database, create identical field according to Query Result, inquire about the data recording in the PC database again, all add to all data that inquire in the embedded database;
When embedded database will be converted to the PC database, inquiry converted the data recording in the embedded database after the use in embedded platform through the PC database, and every of inquiring data recording is all added in the PC database.
For the various associative operations of embedded database, all be to adopt relevant storehouse and the interface of embedded database exploitation to realize.
Mutual conversion between embedded database and PC database all is to finish under the PC platform.
Described embedded database is specially the Sqlite3 database; Described PC database is specially the SQLserver database.
Outstanding advantage of the present invention is: the present invention has realized mutual knowledge and the data interchange between the database under embedded platform and the PC platform, is very easy under these two platforms collection and operational processes to data.
Description of drawings
Fig. 1 is the process flow diagram that PC database that the embodiment of the invention provides is converted to the method for embedded database;
Fig. 2 is the process flow diagram that embedded database that the embodiment of the invention provides is converted to the method for PC database.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Be applied under the embedded platform respectively and the type of database under the PC platform all many, but be most widely used for two types with Sqlite3 and SQLserver respectively, and Sqlite3 and SQLserver database are all followed the SQL query order, operation realizes convenient, therefore, be conversion method between the database of example explanation embedded platform and PC platform just below with this database of two types.
The PC database that Fig. 1 shows the embodiment of the invention to be provided is converted to the realization flow of the method for embedded database, and details are as follows:
In step S101, adopt Sqlite3 development interface and development library, create the Sqlite3 database.
In step S103, the field in the query SQL Server database according to the field that inquires, is created identical field in the Sqlite3 database.
In step S105, the data recording in the query SQL server database is all added every data that inquire in the Sqlite3 database again.
So just all data recording among the SQLServer have been copied in the database of Sqlite3 generation, finished conversion work from the PC client database to embedded database.
Above-mentioned transfer process is a database file of waiting to preserve the SQLServer form of data result to one, convert embedded platform to and can discern the database format file of the Sqlite3 form of support, its effect is to make SQLServer database format file with Sqlite3 database format file identical Database field be arranged, and so just can make the data result of measurement effectively useful.
The embedded database that Fig. 2 then shows the embodiment of the invention to be provided is converted to the realization flow of the method for PC database, and details are as follows:
In step S201, under embedded platform, be saved in the Sqlite3 database that is converted to by the method among above-mentioned Fig. 1 measuring the data of handling gained, can add, operation such as modification, deletion, after data are obtained and are finished, transfer to this Sqlite3 database under the PC platform and open, simultaneously, also open the SQLServer database.
In step S203, above-mentioned Sqlite3 database is carried out the select inquiry, every the data recording that inquires is all added in the SQLserver database.
Above-mentioned transfer process then is after using through the measurement of embedded system, a lot of true useful measurement data results have been preserved this moment in the Sqlite3 database, if but directly place under the office PC platform, system can't discern and handle, through after the conversion process, just the data in all Sqlite3 databases have been added in the SQLserver database, promptly finished mutual transfer process.
Above-mentioned two transfer processes are all finished under the PC platform, and for the various associative operations of Sqlite3 database, as: establishment, interpolation, deletion etc. all are to adopt Sqlite3 database development relevant storehouse and interface to realize.
Except the Sqlite3 database, other are applicable to the database under the embedded platform, for example: and MySql, and the mutual conversion between the database under the PC platform can use said method to realize too.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (4)

1. the method changed mutually of embedded database and PC database is characterized in that described method comprises:
When the PC database will be converted to embedded database, create embedded database earlier, field in the inquiry PC database, and in embedded database, create identical field according to Query Result, inquire about the data recording in the PC database again, all add to all data that inquire in the embedded database;
When embedded database will be converted to the PC database, inquiry converted the data recording in the embedded database after the use in embedded platform through the PC database, and every of inquiring data recording is all added in the PC database.
2. the method that embedded database as claimed in claim 1 and PC database are changed mutually is characterized in that, for the various associative operations of embedded database, all is to adopt relevant storehouse and the interface of embedded database exploitation to realize.
3. the method that embedded database as claimed in claim 1 and PC database are changed mutually is characterized in that, the mutual conversion between embedded database and PC database all is to finish under the PC platform.
4. the method that embedded database as claimed in claim 1 and PC database are changed mutually is characterized in that described embedded database is specially the Sqlite3 database; Described PC database is specially the SQLserver database.
CN 201010270152 2010-09-02 2010-09-02 Method for transforming between embedded database and PC database Pending CN101968794A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201010270152 CN101968794A (en) 2010-09-02 2010-09-02 Method for transforming between embedded database and PC database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201010270152 CN101968794A (en) 2010-09-02 2010-09-02 Method for transforming between embedded database and PC database

Publications (1)

Publication Number Publication Date
CN101968794A true CN101968794A (en) 2011-02-09

Family

ID=43547951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201010270152 Pending CN101968794A (en) 2010-09-02 2010-09-02 Method for transforming between embedded database and PC database

Country Status (1)

Country Link
CN (1) CN101968794A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645073A (en) * 2009-08-25 2010-02-10 浪潮电子信息产业股份有限公司 Method for guiding prior database file into embedded type database

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101645073A (en) * 2009-08-25 2010-02-10 浪潮电子信息产业股份有限公司 Method for guiding prior database file into embedded type database

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
《中南工业大学学报》 19991031 韩庆兰 基于事务对象的异种数据库集成与互操作技术 92-93 第30卷, 2 *
《军械工程学院学报》 19980630 王红霞等 MS SQL Server与异种数据库数据的相互转换 65-68 第10卷, 第2期 2 *

Similar Documents

Publication Publication Date Title
CN102270225B (en) Data change daily record method for supervising and data change daily record supervising device
CN103345521B (en) A kind of method and apparatus processing key assignments in Hash table database
CN104123392A (en) Tool and method for transferring relational database to HBase
CN102346775A (en) Method for synchronizing multiple heterogeneous source databases based on log
CN102752372A (en) File based database synchronization method
CN107391306A (en) A kind of isomeric data library backup file access pattern method
CN106951552A (en) A kind of user behavior data processing method based on Hadoop
CN102135995A (en) Extract transform and load (ETL) data cleaning design method
CN102663114A (en) Database inquiry processing method facing concurrency OLAP (On Line Analytical Processing)
CN106126601A (en) A kind of social security distributed preprocess method of big data and system
CN102521364B (en) Method for inquiring shortest path between two points on map
CN102999524B (en) A kind of document associations search method and system
CN104216961A (en) Method and device for data processing
CN102779138B (en) The hard disk access method of real time data
WO2012059816A3 (en) Method and apparatus for handling digital objects in a communication network
CN102567297A (en) Data conversion device and data conversion method
CN103853714A (en) Data processing method and device
CN104391908B (en) Multiple key indexing means based on local sensitivity Hash on a kind of figure
CN102663007A (en) Data storage and query method supporting agile development and lateral spreading
CN104268298A (en) Method for creating database index and inquiring data
CN101710336A (en) Method for accelerating data processing by using relational middleware
CN100589101C (en) Data access method based on the Oracle relational database of routine call interface
CN101963993B (en) Method for fast searching database sheet table record
CN103678682A (en) Mass grid data processing and management method based on abstract templates
CN102346765A (en) Method and device for querying memory data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20110209