CN106339384A - Conversion method and device for storage procedures - Google Patents
Conversion method and device for storage procedures Download PDFInfo
- Publication number
- CN106339384A CN106339384A CN201510395665.1A CN201510395665A CN106339384A CN 106339384 A CN106339384 A CN 106339384A CN 201510395665 A CN201510395665 A CN 201510395665A CN 106339384 A CN106339384 A CN 106339384A
- Authority
- CN
- China
- Prior art keywords
- code
- data base
- sentence
- storing process
- type
- 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.)
- Granted
Links
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/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The disclosure is related to a conversion method and device for storage procedures. The method comprises following steps: a name of a first type storage procedure is selected from a first type database; a first code and a first input parameter corresponding to the first type storage procedure in the first type database according to the name of the first type storage procedure; the first input parameter and the first code are converted into a second input parameter and a second code which are compatible to a second type database; a second type storage procedure is generated according to the second input parameter and the second code. The technical scheme can automatically and quickly convert the first type storage procedure of the first type database into the second type storage procedure without human intervention to improve the user and developer experience.
Description
Technical field
It relates to the conversion method of database technical field, more particularly, to storing process and device.
Background technology
At present, lnmp framework has become as the development mode of internet industry main flow, and mostly several
Mesh select data base when it will usually select mysql PostgreSQL database, because it can freely use,
And source code is open, user even can directly change and submit to correlative code, also do not exist technically simultaneously
Situation about being controlled by certain manufacturer, therefore, can greatly facilitate developer.
But it is because Technology Selection during project initiation or other reasonses yet suffer from some projects and adopt it
He commercially closes source database, but when closing source database performance issue or bug occurring, can only Shi Zhao manufacturer
Solve or buy more redaction database software, therefore, from time and Financial cost for, open
Source database is compared to and closes for source database advantageously.For example: some run in practice very
For a long time project, has been not suitable with large-scale user and has used web services to access data base, need into
Line reconstruction, and if employing the project closing source business database before, in the project of reconstruct, want to consider
Using the free PostgreSQL database of mysql in lnmp framework it is necessary to move to from legacy data storehouse
Mysql, and at present when source database sqlserver will be closed is converted into PostgreSQL database mysql,
It is required for being accomplished manually, need technical staff that the storing process grammer of sqlserver and mysql is entered
Row is studied in depth, then just enables artificial treatment;But when the size of code of database store process is larger
When, even if technical staff is very professional, its workload as well as the growth of size of code and linear increase,
And because the storing process in different data bases is typically different during conversion, therefore, even
Artificially the storing process of sqlserver is converted to the storing process of mysql, after conversion
Mysql storing process also cannot run well.
Taking the storing process that the storing process of sqlserver is converted to tsql2mysql as a example:
Tsql2mysql: be developed in 2006, the program can realize basic keyword (as create
Procedure etc.) conversion, add branch, converted variable form, conversion togo, label and
Change the functions such as interim predicative method, but because the exploitation age is more remote, therefore, when depositing of sqlserver
When storage process is converted to the storing process of tsql2mysql, meeting there is problems in that
1st, the tsql2mysql development time is more remote, can only process and specific write special specification style
Sqlserver storing process code, but the continuous issue with sqlserver and mysql redaction,
Tsql2mysql has not caught up with the development of technology, a lot of new syntax cannot be carried out identify and has changed,
Do not support the new syntax of some storing processs, nor identify some functions newly increasing, especially to one
A little functions only can replace title, but cannot accomplish veritably conversion parameter, effectively meet this kind of letter
Code after number can lead to change cannot normally run.
2nd, it is not directed to sql and be syntax compliance conversion, such as rowcount and limit during page turning
Deng;
3rd, because the grammar request of sqlserver storing process is loose, developer can use much non-standard
Style, when running into the random situation of this kind of written in code, will be unable to normally complete conversion work.
Content of the invention
The embodiment of the present disclosure provides conversion method and the device of storing process.Described technical scheme is as follows:
According to the embodiment of the present disclosure in a first aspect, provide a kind of conversion method of storing process, comprising:
The title of first kind storing process is obtained from first kind data base;
According to the title of described first kind storing process, read described first kind storing process described
Corresponding first code and the first |input paramete in first kind data base;
Described first |input paramete and described first code are converted to mutually simultaneous with described Second Type data base
The second |input paramete held and second code;
According to described second |input paramete and described second code, generate Second Type storing process.
In one embodiment, methods described also includes: described Second Type storing process is stored in institute
State in Second Type data base.
In one embodiment, methods described also includes: described first code is being converted to and described
Before the mutually compatible second code of two types of database, identify language, institute that described first code used
State the type of variables that first code includes, function that described first code includes, the described first generation
The grammer of code, the sentence of described first code.
In one embodiment, described first code is converted to mutually compatible with Second Type data base
Two codes, comprising:
Type of variables that language that described first code is used, described first code include, institute
State the function that first code includes, the grammer of described first code, described first code sentence successively
Be converted to the language mutually compatible with described Second Type data base, types of variables, function, grammer, sentence;
According to the mutually compatible language of described and described Second Type data base, types of variables, function, grammer,
Sentence, generates described second code.
In one embodiment, the sentence of described first code is converted to and described Second Type data base
Mutually compatible sentence, comprising:
Be converted to successively and described Equations of The Second Kind at least one of described first code the first controlling stream sentence
After at least one mutually compatible second controlling stream sentence of type data base, by least one first controlling stream described
Logic execution sentence corresponding to each in sentence the first controlling stream sentence is converted to and described second successively
Types of database mutually compatible and with least one second controlling stream sentence described in each second controlling stream
The corresponding logic execution sentence of sentence.
In one embodiment, described first kind data base includes: closes source database, described Equations of The Second Kind
Type data base include: PostgreSQL database.
According to the second aspect of the embodiment of the present disclosure, provide a kind of conversion equipment of storing process, comprising:
Acquisition module, for obtaining the title of first kind storing process from first kind data base;
Read module, for the title according to described first kind storing process, reads the described first kind
Storing process corresponding first code and first |input paramete in described first kind data base;
Modular converter, for being converted to and described second described first |input paramete and described first code
The second mutually compatible |input paramete of types of database and second code;
Generation module, for according to described second |input paramete and described second code, generating Second Type
Storing process.
In one embodiment, described device also includes: memory module, for depositing described Second Type
Storage process is stored in described Second Type data base.
In one embodiment, described device also includes:
Identification module, for described first code is converted to mutually compatible with described Second Type data base
Second code before, identify that the language that used of described first code, described first code include
Function that type of variables, described first code include, the grammer of described first code, described first
The sentence of code.
In one embodiment, described modular converter includes: transform subblock, for by the described first generation
The type of variables that the language that used of code, described first code include, described first code include
Function, the grammer of described first code, the sentence of described first code be converted to and described second successively
The mutually compatible language of types of database, types of variables, function, grammer, sentence;
Generate submodule, for the language mutually compatible according to described and described Second Type data base, variable
Type, function, grammer, sentence, generate described second code.
In one embodiment, described transform subblock is additionally operable to:
Be converted to successively and described Equations of The Second Kind at least one of described first code the first controlling stream sentence
After at least one mutually compatible second controlling stream sentence of type data base, by least one first controlling stream described
Logic execution sentence corresponding to each in sentence the first controlling stream sentence is converted to and described second successively
Types of database mutually compatible and with least one second controlling stream sentence described in each second controlling stream
The corresponding logic execution sentence of sentence.
In one embodiment, described first kind data base includes: closes source database, described Equations of The Second Kind
Type data base include: PostgreSQL database.
The third aspect according to the embodiment of the present disclosure is it is proposed that a kind of conversion equipment of storing process, comprising:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
The title of first kind storing process is obtained from first kind data base;
According to the title of described first kind storing process, read described first kind storing process described
Corresponding first code and the first |input paramete in first kind data base;
Described first |input paramete and described first code are converted to mutually simultaneous with described Second Type data base
The second |input paramete held and second code;
According to described second |input paramete and described second code, generate Second Type storing process.
The technical scheme that embodiment of the disclosure provides can include following beneficial effect:
After the title obtaining first kind storing process from first kind data base, this name can be passed through
Read takes first kind storing process corresponding first code and first input ginseng in first kind data base
Number, and first code and the first |input paramete are converted to being capable of even running in Second Type data base
The second |input paramete and second code, thus realize be not required to very important person be participate on the basis of, can from
Dynamic, rapidly the first kind storing process in first kind data base is converted into Second Type and stored
Journey, to improve the experience of user and developer.
It should be appreciated that above general description and detailed description hereinafter are only exemplary and explanatory
, the disclosure can not be limited.
Brief description
Accompanying drawing herein is merged in description and constitutes the part of this specification, shows and meets this
Bright embodiment, and be used for explaining the principle of the present invention together with description.
Fig. 1 is a kind of flow chart of the conversion method of storing process according to an exemplary embodiment.
Fig. 2 is the flow process of the conversion method of another kind of storing process according to an exemplary embodiment
Figure.
Fig. 3 is the flow process of the conversion method of another storing process according to an exemplary embodiment one
Figure.
Fig. 4 is the flow process of the conversion method of another storing process according to an exemplary embodiment one
Figure.
Fig. 5 is a kind of block diagram of the conversion equipment of storing process according to an exemplary embodiment.
Fig. 6 is the block diagram of the conversion equipment of another kind of storing process according to an exemplary embodiment.
Fig. 7 is the block diagram of the conversion equipment of another storing process according to an exemplary embodiment.
Fig. 8 is the block diagram of the conversion equipment of another storing process according to an exemplary embodiment.
Fig. 9 is the block diagram of the conversion equipment being applied to storing process according to an exemplary embodiment.
Specific embodiment
Here will in detail exemplary embodiment be illustrated, its example is illustrated in the accompanying drawings.Following retouches
State when being related to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represent same or analogous will
Element.Embodiment described in following exemplary embodiment does not represent own consistent with the present invention
Embodiment.On the contrary, they be only with such as appended claims in described in detail, the present invention some
The example of the consistent apparatus and method of aspect.
At present the storing process in a type of data base is being converted in another type of data base
Storing process when, need technical staff to carry out deep to the storing process grammer of two types data base
Practise, then just can complete manually to change;But when the size of code of database store process is larger, even if
Technical staff is very professional, its workload as well as the growth of size of code and linear increase, and stored
The accuracy rate of journey conversion cannot be protected;In addition, due in different data bases during conversion
Storing process be typically different, therefore, even by artificial by the storage in a type of data base
Journey is converted to the storing process in another type of data base, and the storing process after conversion also cannot be fine
Operation.
In order to solve above-mentioned technical problem, the embodiment of the present disclosure provides a kind of conversion method of storing process,
The method can be used in converse routine, system or the device of storing process, as shown in figure 1, the method includes
Step s101-s104:
From first kind data base, in step s101, obtain the title of first kind storing process;Its
In, it can also be multiple that the first kind storing process in first kind data base can be one, and deposits
Storage process (stored procedure) is computer language, and corresponding is one section of code, be one group in order to
Complete the sql sentence collection of specific function, be the transact-sql language institute being provided using sql server
The program write.
In step s102, according to the title of first kind storing process, read first kind storing process
Corresponding first code and the first |input paramete in first kind data base;
Reading first kind storing process corresponding first code and first defeated in first kind data base
When entering parameter, if first kind storing process is multiple, reading process can have following two modes:
Mode one:
Multiple first kind storing processs are distributed to m thread so that m thread read simultaneously these
One type storing process, with synchronous each first kind reading in multiple first kind storing processs storage
The corresponding first code of process and the first |input paramete, thus accelerate the reading of multiple first kind storing processs
Take speed;
Mode two: these first kind storing processs are distributed to same thread so that same thread by
Step reads these first kind storing processs, that is, read a first kind storing process corresponding first
After code and the first |input paramete, then read another corresponding first code of first kind storing process and
First |input paramete, thus mitigate the burden of system.
In step s103, the first |input paramete and first code are converted to and Second Type data base's phase
The second compatible |input paramete and second code;
Similarly, the first |input paramete and first code are converted to mutually compatible with Second Type data base
When the second |input paramete and second code, if first kind storing process is multiple, transformation process can
There to be following two modes:
Mode a:
Multiple first kind storing processs are distributed to n thread so that n thread change simultaneously these
One type storing process, with synchronous each first kind changed in multiple first kind storing processs storage
Corresponding first |input paramete of process and first code, thus accelerate turning of multiple first kind storing processs
Throw-over rate;
Mode b:
These first kind storing processs are distributed to same thread, so that same thread progressively changes this
Corresponding first |input paramete of each first kind storing process and first in a little first kind storing processs
Code, will corresponding first |input paramete of first kind storing process and first code change respectively
After the second |input paramete and second code more defeated by corresponding for another first kind storing process first
Enter parameter and first code is respectively converted into the second |input paramete and second code, thus mitigating the negative of system
Load.
Wherein, second |input paramete mutually compatible with Second Type data base and second code refer to: the first ginseng
Number and first code can be converted to the second input ginseng that can stably run in Second Type data base
Number and second code are that is to say, that be converted to first kind storing process can be in Second Type data base
The Second Type storing process that can stably run.
In step s104, according to the second |input paramete and second code, generate Second Type storing process.
Function due to data base is realized by storing process, and different storing processs has difference
Storing process title, therefore, getting first kind storing process from first kind data base
After title, first kind storing process can be read by this title corresponding in first kind data base
First code and the first |input paramete, and then first code and the first |input paramete are converted to can be
Second |input paramete of even running and second code in two types of database, thus realize being not required to very important person
On the basis of participating in, can automatically and quickly the first kind in first kind data base be stored
Journey is converted into Second Type storing process, to improve the experience of user and developer.
As shown in Fig. 2 in one embodiment, said method can also include: in step s201, will
Second Type storing process is stored in Second Type data base.
Because Second Type storing process is mutually compatible with Second Type data base, therefore, Second Type is stored
After process is stored in Second Type data base, Second Type storing process will be in Second Type data base
Steadily, normally run, so that the various functions in Second Type data base can normally be realized.Wherein,
First kind data base and Second Type data base are the diverse data bases of two types, for example: the
One types of database may is that closes source database, and Second Type data base may is that PostgreSQL database,
Correspondingly, first kind storing process and Second Type data base are also the diverse storage of two types
Process, wherein, first kind storing process is the storing process being pre-stored in first kind data base,
Second Type storing process is the storing process being pre-stored in Second Type data base, when first kind number
During according to storehouse for sqlserver data base, first kind storing process is exactly in sqlserver data base
Sqlserver storing process, when Second Type data base is mysql data Kuku, Second Type is deposited
Storage process is exactly the mysql storing process in mysql data base.
As shown in figure 3, in one embodiment, said method may also include that in step s301, is inciting somebody to action
Before first code is converted to the second code mutually compatible with Second Type data base, identify first code institute
Function that the language that uses, the type of variables that includes of first code, first code include, first
The grammer of code, the sentence of first code.
Before first code is converted to the second code mutually compatible with Second Type data base, by identification
Language that first code is used is (if first code is compiled with c language, c# language or with java language
Write), first code include type of variables (as each variable in first code be long,
Floating type or other kinds of variable, the different variables between especially two kinds storing processs are such as
Rowcount transformation amount, top and limit etc.), the function that includes of first code is (especially in first code
Special function, as functions such as convert, cas, datediff, row_count, exec), first code
Grammer, first code sentence (different grammers and sentence style between especially two kinds storing processs,
For example: the storing process of sqlserver data base can use some off-gauge storing process grammers, such as
The complicated sql that multirow is write, the parameter of storing process sometimes with bracket sometimes without bracket, body of code
Part uses state pause judgments label sometimes without and language used in the storing process of mysql data base sometimes
Method must be all just standard, such as: be unable to the complicated sql that multirow is write, the parameter of storing process whether
To be unified with bracket, whether body of code part will be unified using state pause judgments label) it can be ensured that being
Variable, function, grammer and sentence that system can normally identify and parse in first code, in order to automatic
First code is converted to second code by ground, is automatically performed the migration of heterogeneous database, and then is easy to improve
The efficiency of storing process and accuracy, with avoid change after storing process cannot be with Second Type data base
Mutually compatible and cannot steadily, normally run in grammer, sentence or function.
As shown in figure 4, in one embodiment, first code is converted to and Second Type data base's phase
Compatible second code, can execute according to following steps and be:
In step a1, the class of the variable that language that first code is used, first code include
Function that type, first code include, the grammer of first code, the sentence of first code are converted to successively
The language mutually compatible with Second Type data base, types of variables, function, grammer, sentence;
In step a2, according to the language mutually compatible with Second Type data base, types of variables, function,
Grammer, sentence, generate second code.
The function that included by the type of variables that includes first code, first code, the first generation
The grammer of code, the sentence of first code are converted to the language mutually compatible with Second Type data base, change successively
Amount type, function, grammer, sentence, and according to the language mutually compatible with Second Type data base after changing
Speech, types of variables, function, grammer, sentence generate second code and not only can automatically store first
Process is converted to the second storing process, is automatically performed the migration of heterogeneous database, is simultaneously also beneficial to improve
The efficiency of storing process and accuracy, with avoid change after storing process cannot be with Second Type data base
Grammer, sentence or function mutually compatible and cannot steadily, normally run.For example: when the first kind
Data base is sqlserver data base, when Second Type data base is mysql data base, by inciting somebody to action
The c language in the first code write by c language in the storing process of sqlserver data base,
Types of variables in one code, function, the grammer of c language, the sentence of c language, correspondingly turn successively
It is changed to the second code being made up of java language that mysql data base can be compatible, java language is supported
Types of variables, function, the grammer of java, the sentence of java is it is possible to by sqlserver data base
Storing process be changed into mysql data base and can identify and compatible mysql storing process, enter
And realize being automatically completed the migration of heterogeneous database.
In one embodiment, the sentence of first code is converted to mutually compatible with Second Type data base
Sentence, comprising:
Be converted to successively and Second Type data base at least one of first code the first controlling stream sentence
Mutually after at least one compatible second controlling stream sentence, by each at least one first controlling stream sentence
Logic execution sentence corresponding to first controlling stream sentence is converted to mutually simultaneous with Second Type data base successively
Hold and the logic corresponding with each the second controlling stream sentence at least one second controlling stream sentence is held
Line statement.
When the sentence of first code is converted to the sentence mutually compatible with Second Type data base, in order that
Conversion level is clearly more demarcated, and conversion efficiency and accuracy are higher, needs first by least in first code
Individual first controlling stream sentence is converted at least one second control mutually compatible with Second Type data base successively
After stream sentence, then by corresponding to each the first controlling stream sentence at least one first controlling stream sentence
Logic execution sentence be converted to successively mutually compatible with Second Type data base and with least one second control
The corresponding logic execution sentence of each the second controlling stream sentence in stream sentence.
For example: can be by controls such as if ... the else in first code (code as write by c language)
System stream sentence is converted into the if ... of the java language mutually compatible with Second Type data base (as mysql)
After the controlling stream sentence such as else, then the logic that will comprise in the controlling stream sentences such as if ... the else in c language
The controlling stream sentence such as if ... else that execution sentence is converted into java language is supported corresponding and with
The compatible logic execution sentence of mysql data base, thus not only make conversion level more clearly demarcated, more
Adduction is managed, and can improve conversion efficiency and accuracy is higher.
In one embodiment, first kind data base may is that and closes source database, Second Type data
Storehouse may is that PostgreSQL database.
Classification can be carried out make first kind data base and Second Type data according to whether source code is open
Storehouse is respectively PostgreSQL database disclosed in source code (as mysql, maxdb, postgresql data
Storehouse etc.) and source code is covert closes source database (mssql, oracle, sqlserver database),
It is achieved thereby that close the automatic conversion of the storing process between source database and PostgreSQL database, and then automatically
Complete the migration closing the heterogeneous database between source database and PostgreSQL database, save storing process
Conversion time and cost.
Certainly, first kind data base and Second Type data base not only can be respectively close source database and
PostgreSQL database is it is also possible to be hierarchical database, network database and relational database three respectively
Any one in kind.
The conversion method of the above-mentioned storing process that the corresponding embodiment of the present disclosure provides, the embodiment of the present disclosure also carries
For a kind of conversion equipment of storing process, as shown in figure 5, this device includes:
Acquisition module 501, is configured to obtain first kind storing process from first kind data base
Title;
Read module 502, is configured to the title according to first kind storing process, reads the first kind
Storing process corresponding first code and first |input paramete in first kind data base;
Modular converter 503, is configured to be converted to and Second Type the first |input paramete and first code
The second mutually compatible |input paramete of data base and second code;
Generation module 504, is configured to, according to the second |input paramete and second code, generate Second Type
Storing process.
As shown in fig. 6, in one embodiment, said apparatus may also include that memory module 601, quilt
It is configured to Second Type storing process is stored in Second Type data base.
As shown in fig. 7, in one embodiment, said apparatus may also include that
Identification module 701, be configured to first code is converted to mutually compatible with Second Type data base
Second code before, the class of the variable that the identification language that used of first code, first code include
Function that type, first code include, the grammer of first code, the sentence of first code.
As shown in figure 8, in one embodiment, modular converter 503 includes: transform subblock 5031,
Type of variables that the language that is configured to be used first code, first code include, the first generation
The function that code includes, the grammer of first code, the sentence of first code are converted to and Second Type successively
The mutually compatible language of data base, types of variables, function, grammer, sentence;
Generate submodule 5032, be configured to according to the language mutually compatible with Second Type data base, variable
Type, function, grammer, sentence, generate second code.
In one embodiment, transform subblock 5031 is also configured to
Be converted to successively and Second Type data base at least one of first code the first controlling stream sentence
Mutually after at least one compatible second controlling stream sentence, by each at least one first controlling stream sentence
Logic execution sentence corresponding to first controlling stream sentence is converted to mutually simultaneous with Second Type data base successively
Hold and the logic corresponding with each the second controlling stream sentence at least one second controlling stream sentence is held
Line statement.
In one embodiment, first kind data base includes: closes source database, Second Type data base
Including: PostgreSQL database.
Fig. 9 is a kind of conversion equipment 900 for storing process according to an exemplary embodiment
Block diagram, this device is applied to terminal unit.For example, device 900 can be mobile phone, computer,
Digital broadcast terminal, messaging devices, game console, tablet device, armarium, body-building sets
Standby, personal digital assistant etc..
With reference to Fig. 9, device 900 can include with next or at least two assemblies: process assembly 902,
Memorizer 904, power supply module 906, multimedia groupware 9908, audio-frequency assembly 910, input/output (i/
O) interface 914, sensor cluster 914, and communication component 916.
The integrated operation of the usual control device 900 of process assembly 902, such as with display, call,
The associated operation of data communication, camera operation and record operation.Treatment element 902 can include one
Or at least two processor 920 carry out execute instruction, to complete all or part of step of above-mentioned method.
Additionally, process assembly 902 can include one or at least two modules, be easy to process assembly 902 and its
Interaction between his assembly.For example, processing component 902 can include multi-media module, to facilitate many matchmakers
Interaction between body assembly 908 and process assembly 902.
Memorizer 904 is configured to store various types of data to support the operation in equipment 900.This
The example of a little data includes the instruction for any storage object of operation or method on device 900, connection
It is personal data, telephone book data, message, picture, video etc..Memorizer 904 can be by any types
Volatibility or non-volatile memory device or combinations thereof realize, such as static RAM
(sram), Electrically Erasable Read Only Memory (eeprom), erasable programmable is read-only to be deposited
Reservoir (eprom), programmable read only memory (prom), read only memory (rom), magnetic is deposited
Reservoir, flash memory, disk or CD.
Electric power assembly 906 provides electric power for the various assemblies of device 900.Electric power assembly 906 can include
Power-supply management system, one or at least two power supplys, and other with generate for device 900, manage and point
The assembly that distribution power is associated.
Multimedia groupware 908 includes one output interface of offer between described device 900 and user
Screen.In certain embodiments, screen can include liquid crystal display (lcd) and touch panel (tp).
If screen includes touch panel, screen may be implemented as touch screen, to receive the input from user
Signal.Touch panel includes one or at least two touch sensors with sensing touch, slip and touch surface
Gesture on plate.Described touch sensor can not only sensing touch or sliding action border, but also
The detection persistent period related to described touch or slide and pressure.In certain embodiments, many matchmakers
Body assembly 908 includes a front-facing camera and/or post-positioned pick-up head.When equipment 900 is in operator scheme,
During as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside many matchmakers
Volume data.Each front-facing camera and post-positioned pick-up head can be optical lens system or the tools of a fixation
There is focusing and optical zoom capabilities.
Audio-frequency assembly 910 is configured to export and/or inputs airflow signal.For example, audio-frequency assembly 910 wraps
Include a mike (mic), when device 900 is in operator scheme, such as call model, logging mode and
During speech recognition mode, mike is configured to receive outer gas stream signal.The airflow signal being received can
To be further stored in memorizer 904 or to send via communication component 916.In certain embodiments,
Audio-frequency assembly 910 also includes a speaker, for output gas flow signal.
I/o interface 914 is for providing interface, above-mentioned periphery between process assembly 902 and peripheral interface module
Interface module can be keyboard, click wheel, button etc..These buttons may include but be not limited to: homepage is pressed
Button, volume button, start button and locking press button.
Sensor cluster 914 includes one or at least two sensors, for providing each for device 900
The state estimation of aspect.For example, what sensor cluster 914 can detect equipment 900 beats opening/closing shape
State, the relative localization of assembly, for example described assembly is display and the keypad of device 900, sensor
Assembly 914 can be with position change, user and the device of detection means 900 or 900 1 assemblies of device
Presence or absence of, the temperature change of device 900 orientation or acceleration/deceleration and device 900 of 900 contacts.
Sensor cluster 914 can include proximity transducer, is configured to when not having any physical contact
The presence of object near detection.Sensor cluster 914 can also include optical sensor, such as cmos or
Ccd imageing sensor, for using in imaging applications.In certain embodiments, this sensor cluster
914 can also include acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature
Degree sensor.
Communication component 916 is configured to facilitate wired or wireless way between device 900 and other equipment
Communication.Device 900 can access the wireless network based on communication standard, such as wifi, 2g or 3g, or
Combinations thereof.In one exemplary embodiment, communication component 916 receives via broadcast channel and is derived from
The broadcast singal of external broadcasting management system or broadcast related information.In one exemplary embodiment, institute
State communication component 916 and also include near-field communication (nfc) module, to promote junction service.For example, exist
Nfc module can be based on RF identification (rfid) technology, Infrared Data Association (irda) technology, surpasses
Broadband (uwb) technology, bluetooth (bt) technology and other technologies are realizing.
In the exemplary embodiment, device 900 can be by one or at least two application specific integrated circuits
(asic), digital signal processor (dsp), digital signal processing appts (dspd), programmable patrol
Collect device (pld), field programmable gate array (fpga), controller, microcontroller, microprocessor
Or the realization of other electronic components, for executing said method.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable storage including instruction
Medium, for example, include the memorizer 904 instructing, and above-mentioned instruction can be held by the processor 820 of device 900
Row is to complete said method.For example, described non-transitorycomputer readable storage medium can be rom,
Random access memory (ram), cd-rom, tape, floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice disclosure disclosed herein, will readily occur to this
Disclosed other embodiment.The application is intended to any modification, purposes or the adaptability of the disclosure
Change, these modifications, purposes or adaptations are followed the general principle of the disclosure and are included this public affairs
Open undocumented common knowledge in the art or conventional techniques.Description and embodiments only by
It is considered as exemplary, the true scope of the disclosure and spirit are pointed out by claim below.
It should be appreciated that the disclosure is not limited to be described above and illustrated in the accompanying drawings accurate
Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only by institute
Attached claim is limiting.
Claims (13)
1. a kind of conversion method of storing process is it is characterised in that include:
The title of first kind storing process is obtained from first kind data base;
According to the title of described first kind storing process, read described first kind storing process described
Corresponding first code and the first |input paramete in first kind data base;
Described first |input paramete and described first code are converted to mutually simultaneous with described Second Type data base
The second |input paramete held and second code;
According to described second |input paramete and described second code, generate Second Type storing process.
2. method according to claim 1 is it is characterised in that methods described also includes:
Described Second Type storing process is stored in described Second Type data base.
3. method according to claim 1 is it is characterised in that methods described also includes:
By described first code be converted to the second code mutually compatible with described Second Type data base it
Before, identify type of variables that the language that used of described first code, described first code include,
Function that described first code includes, the grammer of described first code, the sentence of described first code.
4. method according to claim 3 it is characterised in that
Described first code is converted to the second code mutually compatible with Second Type data base, comprising:
Type of variables that language that described first code is used, described first code include, institute
State the function that first code includes, the grammer of described first code, described first code sentence successively
Be converted to the language mutually compatible with described Second Type data base, types of variables, function, grammer, sentence;
According to the mutually compatible language of described and described Second Type data base, types of variables, function, grammer,
Sentence, generates described second code.
5. method according to claim 4 it is characterised in that
The sentence of described first code is converted to the sentence mutually compatible with described Second Type data base, bag
Include:
Be converted to successively and described Equations of The Second Kind at least one of described first code the first controlling stream sentence
After at least one mutually compatible second controlling stream sentence of type data base, by least one first controlling stream described
Logic execution sentence corresponding to each in sentence the first controlling stream sentence is converted to and described second successively
Types of database mutually compatible and with least one second controlling stream sentence described in each second controlling stream
The corresponding logic execution sentence of sentence.
6. method according to any one of claim 1 to 5 it is characterised in that
Described first kind data base includes: closes source database, described Second Type data base includes: opens
Source database.
7. a kind of conversion equipment of storing process is it is characterised in that include:
Acquisition module, for obtaining the title of first kind storing process from first kind data base;
Read module, for the title according to described first kind storing process, reads the described first kind
Storing process corresponding first code and first |input paramete in described first kind data base;
Modular converter, for being converted to and described second described first |input paramete and described first code
The second mutually compatible |input paramete of types of database and second code;
Generation module, for according to described second |input paramete and described second code, generating Second Type
Storing process.
8. device according to claim 7 is it is characterised in that described device also includes:
Memory module, for being stored in described Second Type storing process in described Second Type data base.
9. device according to claim 7 is it is characterised in that described device also includes:
Identification module, for described first code is converted to mutually compatible with described Second Type data base
Second code before, identify that the language that used of described first code, described first code include
Function that type of variables, described first code include, the grammer of described first code, described first
The sentence of code.
10. device according to claim 9 it is characterised in that
Described modular converter includes:
Transform subblock, includes for the language being used described first code, described first code
Type of variables, described first code include function, the grammer of described first code, described
The sentence of one code be converted to successively the language mutually compatible with described Second Type data base, types of variables,
Function, grammer, sentence;
Generate submodule, for the language mutually compatible according to described and described Second Type data base, variable
Type, function, grammer, sentence, generate described second code.
11. devices according to claim 10 it is characterised in that
Described transform subblock is additionally operable to:
Be converted to successively and described Equations of The Second Kind at least one of described first code the first controlling stream sentence
After at least one mutually compatible second controlling stream sentence of type data base, by least one first controlling stream described
Logic execution sentence corresponding to each in sentence the first controlling stream sentence is converted to and described second successively
Types of database mutually compatible and with least one second controlling stream sentence described in each second controlling stream
The corresponding logic execution sentence of sentence.
12. devices according to any one of claim 7 to 11 it is characterised in that
Described first kind data base includes: closes source database, described Second Type data base includes: opens
Source database.
A kind of 13. conversion equipments of storing process are it is characterised in that include:
Processor;
For storing the memorizer of processor executable;
Wherein, described processor is configured to:
The title of first kind storing process is obtained from first kind data base;
According to the title of described first kind storing process, read described first kind storing process described
Corresponding first code and the first |input paramete in first kind data base;
Described first |input paramete and described first code are converted to mutually simultaneous with described Second Type data base
The second |input paramete held and second code;
According to described second |input paramete and described second code, generate Second Type storing process.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510395665.1A CN106339384B (en) | 2015-07-07 | 2015-07-07 | Storage process conversion method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510395665.1A CN106339384B (en) | 2015-07-07 | 2015-07-07 | Storage process conversion method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106339384A true CN106339384A (en) | 2017-01-18 |
CN106339384B CN106339384B (en) | 2021-03-09 |
Family
ID=57826004
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510395665.1A Active CN106339384B (en) | 2015-07-07 | 2015-07-07 | Storage process conversion method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106339384B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107992417A (en) * | 2017-11-29 | 2018-05-04 | 平安科技(深圳)有限公司 | Test method, device and equipment, readable storage medium storing program for executing based on storing process |
CN109408493A (en) * | 2018-10-17 | 2019-03-01 | 成都四方伟业软件股份有限公司 | A kind of moving method and system of data source |
CN109992259A (en) * | 2019-04-15 | 2019-07-09 | 成都四方伟业软件股份有限公司 | Function dynamic creation method, apparatus and electronic equipment |
CN110245148A (en) * | 2019-06-25 | 2019-09-17 | 河南中原消费金融股份有限公司 | A kind of date storage method, device, system and medium |
CN111708753A (en) * | 2020-05-18 | 2020-09-25 | 北京金山云网络技术有限公司 | Method, device and equipment for evaluating database migration and computer storage medium |
CN111897798A (en) * | 2020-07-15 | 2020-11-06 | 中国工商银行股份有限公司 | Database conversion device, method, computer system and storage medium |
CN112230934A (en) * | 2020-10-27 | 2021-01-15 | 北京人大金仓信息技术股份有限公司 | Method and device for converting code language |
WO2021057064A1 (en) * | 2019-09-23 | 2021-04-01 | 平安科技(深圳)有限公司 | Data interaction conversion method and apparatus based on artificial intelligence, device, and medium |
WO2021259290A1 (en) * | 2020-06-22 | 2021-12-30 | 中兴通讯股份有限公司 | Stored procedure conversion method and apparatus, and device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5768589A (en) * | 1996-07-12 | 1998-06-16 | Oracle Corporation | Method and apparatus for executing stored procedures in a foreign database management system |
CN104166737A (en) * | 2014-09-04 | 2014-11-26 | 北京国双科技有限公司 | Database name modifying method and device |
CN104346377A (en) * | 2013-07-31 | 2015-02-11 | 克拉玛依红有软件有限责任公司 | Method for integrating and exchanging data on basis of unique identification |
-
2015
- 2015-07-07 CN CN201510395665.1A patent/CN106339384B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5768589A (en) * | 1996-07-12 | 1998-06-16 | Oracle Corporation | Method and apparatus for executing stored procedures in a foreign database management system |
CN104346377A (en) * | 2013-07-31 | 2015-02-11 | 克拉玛依红有软件有限责任公司 | Method for integrating and exchanging data on basis of unique identification |
CN104166737A (en) * | 2014-09-04 | 2014-11-26 | 北京国双科技有限公司 | Database name modifying method and device |
Non-Patent Citations (2)
Title |
---|
TIANYA0136: "sql Sever的存储过程如何转换为mysql", 《HTTP://BBS.51CTO.COM/THREAD-1115779-1.HTML》 * |
唐友等: "《Java语言程序设计》", 31 July 2016, 哈尔滨工业大学出版社 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107992417B (en) * | 2017-11-29 | 2019-01-29 | 平安科技(深圳)有限公司 | Test method, device and equipment, readable storage medium storing program for executing based on storing process |
CN107992417A (en) * | 2017-11-29 | 2018-05-04 | 平安科技(深圳)有限公司 | Test method, device and equipment, readable storage medium storing program for executing based on storing process |
CN109408493A (en) * | 2018-10-17 | 2019-03-01 | 成都四方伟业软件股份有限公司 | A kind of moving method and system of data source |
CN109992259A (en) * | 2019-04-15 | 2019-07-09 | 成都四方伟业软件股份有限公司 | Function dynamic creation method, apparatus and electronic equipment |
CN110245148B (en) * | 2019-06-25 | 2021-03-23 | 河南中原消费金融股份有限公司 | Data storage method, device, system and medium |
CN110245148A (en) * | 2019-06-25 | 2019-09-17 | 河南中原消费金融股份有限公司 | A kind of date storage method, device, system and medium |
WO2021057064A1 (en) * | 2019-09-23 | 2021-04-01 | 平安科技(深圳)有限公司 | Data interaction conversion method and apparatus based on artificial intelligence, device, and medium |
CN111708753A (en) * | 2020-05-18 | 2020-09-25 | 北京金山云网络技术有限公司 | Method, device and equipment for evaluating database migration and computer storage medium |
WO2021259290A1 (en) * | 2020-06-22 | 2021-12-30 | 中兴通讯股份有限公司 | Stored procedure conversion method and apparatus, and device and storage medium |
CN114064601A (en) * | 2020-06-22 | 2022-02-18 | 金篆信科有限责任公司 | Storage process conversion method, device, equipment and storage medium |
CN111897798A (en) * | 2020-07-15 | 2020-11-06 | 中国工商银行股份有限公司 | Database conversion device, method, computer system and storage medium |
CN112230934A (en) * | 2020-10-27 | 2021-01-15 | 北京人大金仓信息技术股份有限公司 | Method and device for converting code language |
CN112230934B (en) * | 2020-10-27 | 2023-08-29 | 北京人大金仓信息技术股份有限公司 | Method and device for converting code language |
Also Published As
Publication number | Publication date |
---|---|
CN106339384B (en) | 2021-03-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106339384A (en) | Conversion method and device for storage procedures | |
US20220223154A1 (en) | Voice interaction method and apparatus | |
CN110377250A (en) | A kind of touch control method and electronic equipment thrown under screen scene | |
CN110489043A (en) | A kind of management method and relevant apparatus of suspension windows | |
CN107423106A (en) | The method and apparatus for supporting more frame grammars | |
CN107919123A (en) | More voice assistant control method, device and computer-readable recording medium | |
CN106804000A (en) | Direct playing and playback method and device | |
CN106791893A (en) | Net cast method and device | |
CN104536935B (en) | Calculate display methods, calculate edit methods and device | |
CN104811776B (en) | Multi-medium play method and device | |
CN109154858A (en) | Intelligent electronic device and its operating method | |
CN107066172A (en) | The document transmission method and device of mobile terminal | |
CN103916468B (en) | Method for upgrading system, terminal, server and upgrade-system | |
CN104035995A (en) | Method and device for generating group tags | |
CN106652336A (en) | Method and device for monitoring voice of children | |
CN106202223A (en) | Content collection method, device and for collecting the device of content in application program | |
CN107529699A (en) | Control method of electronic device and device | |
CN106648496A (en) | Electronic device and method for controlling display thereof | |
CN107105517A (en) | Method for connecting network and device | |
CN106776068A (en) | Display methods, device and equipment that candidate applies | |
CN107393528A (en) | Sound control method and device | |
CN106774849A (en) | virtual reality device control method and device | |
CN106484287A (en) | Display device control method, device and display device | |
CN106502403A (en) | Intelligent glasses control method, device and intelligent glasses | |
CN106471493A (en) | Method and apparatus for managing data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |