CN107766557A - The generation method and relevant apparatus of a kind of database sequence - Google Patents

The generation method and relevant apparatus of a kind of database sequence Download PDF

Info

Publication number
CN107766557A
CN107766557A CN201711072984.4A CN201711072984A CN107766557A CN 107766557 A CN107766557 A CN 107766557A CN 201711072984 A CN201711072984 A CN 201711072984A CN 107766557 A CN107766557 A CN 107766557A
Authority
CN
China
Prior art keywords
sequence
length
sequence table
application
isn
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
CN201711072984.4A
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.)
Kingdee Software China Co Ltd
Original Assignee
Kingdee Software China 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 Kingdee Software China Co Ltd filed Critical Kingdee Software China Co Ltd
Priority to CN201711072984.4A priority Critical patent/CN107766557A/en
Publication of CN107766557A publication Critical patent/CN107766557A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/252Integrating or interfacing systems involving database management systems between a Database Management System and a front-end application
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases

Abstract

This application discloses a kind of generation method of database sequence, generating means, computer-readable recording medium and server, this method includes:The application request sent according to called side judges whether the sequence table that called side needs;If so, then obtain according to the current length of sequence table and the length of application length increase sequence table and send the sequence ISN of increased portion sub-sequence table, so that called side calls increase partial sequence table according to sequence ISN;If it is not, then creating sequence table according to business table name and application length, obtain and send the sequence ISN of sequence table, so that called side is according to sequence ISN calling sequence table.By establishing the generation that unified sequence table realizes sequence for all type of database, the process using sequence of caller is facilitated, improves the efficiency and maintainability of program development.

Description

The generation method and relevant apparatus of a kind of database sequence
Technical field
The application is related to field of computer technology, more particularly to a kind of generation method of database sequence, generating means, meter Calculation machine readable storage medium storing program for executing and server.
Background technology
With the development of computer technology, the electronic equipment used in daily life is more and more, there is provided convenient same When also bring substantial amounts of data.Therefore, substantial amounts of database product is just generated, ensures the normal operation of data storage.
But developer faces substantial amounts of database product, and the specification type parameter of database product is different from, Developer would have to remember the use rule in mass data storehouse and using parameter.It is substantial amounts of negative with knowing clearly to developer Load, it has not been convenient to the development process of developer.Also, for the real-time mode phase not to the utmost of function of unity in disparate databases product Together, it is also possible to which partial database product does not support this function, it is necessary to from the function is realized otherwise, further causes The use of developer hinders, and is unfavorable for development process.
Wherein, especially with regard to the establishing method of the self-propagation sequence in database.It is right for SQLserver databases When needing to increase the table structure of unique data row, it is self-propagation type typically to pre-define unique row field, Ran Hou Data increase the value of self-propagation row automatically when inserting.For example it can be added after the field of int (data type name) type Identity (1,1) (parameter setting form), the field, from increasing in the way of+1, will realize self-propagation sequence since 1 Row.But for oracle database, it is necessary to reach the requirement of this self-propagation sequence, and its sequence using other sequences Row and table are separation, are unfavorable for the realization of self-propagation sequence.
Therefore, in face of realizing the difference problem of difference in functionality, it is unfavorable for the exploitation of developer, and phase is realized in difference Same function also needs to spend the great effort of developer, is unfavorable for improving the efficiency that hair is opened.Simultaneously can also make maintenance into This rising.
Therefore, how to solve to realize identical database function between disparate databases product, be those skilled in the art Important Problems of interest.
The content of the invention
The purpose of the application is to provide a kind of generation method of database sequence, generating means, computer-readable storage medium Matter and server, by establishing the generation that unified sequence table realizes sequence for all type of database, facilitate caller The process using sequence, the sequence ISN of sequence is only returned to simultaneously for caller, caller can be not concerned with sequence generation In process, it is only necessary to obtain sequence ISN be used for use, improve the efficiency and maintainability of program development.
In order to solve the above technical problems, the application provides a kind of generation method of database sequence, including:
The application request sent according to called side judges whether the sequence table that the called side needs;Wherein, it is described Application request includes traffic table name and application length;
If so, then increasing the length of the sequence table according to the current length of the sequence table and the application length, obtain Take and send the sequence ISN of increased portion sub-sequence table, so that the called side calls the increased portion according to the sequence ISN Sub-sequence table;
If it is not, then creating the sequence table according to the business table name and the application length, obtain and send the sequence The sequence ISN of list, so that the called side calls the sequence table according to the sequence ISN.
Optionally, the current length and the application length according to the sequence table increases the length of the sequence table Degree, obtains and sends the sequence ISN of increased portion sub-sequence table, so that the called side is according to calling the sequence ISN Increase partial sequence table, including:
The length of the sequence table is obtained as the current length;
The length of the sequence table is increased into the current length and the application length sum, obtains the increasing Add partial order list;
Obtain the sequence ISN of the increase partial sequence table;
The sequence ISN is sent, so that the called side calls the increase partial sequence according to the sequence ISN Table.
Optionally, the application request sent according to called side judges whether the sequence that the called side needs Table, including:
The called side is sent asks according to the business table name and the application length needed the transmission application;
The application request that recipient's parsing receives, obtains the business table name and the application length;
Judge whether and sequence table described in the business table name title identical.
Optionally, it is described according to the business table name and the application length creates the sequence table, including:
Corresponding sequence table is selected to create mode according to the type of database information of acquisition;
Mode is created using the sequence table, and the sequence table is created according to the business table name and the application length.
The application also provides a kind of generating means of database sequence, including:
Judge module, the application request for being sent according to called side judge whether the sequence that the called side needs Table;Wherein, the application request includes:Business table name and application length;
Sequence increases module, increases the sequence table for the current length according to the sequence table and the application length Length, obtain and send the sequence ISN of increased portion sub-sequence table, so that the called side is called according to the sequence ISN The increase partial sequence table;
Sequence creation module, for creating the sequence table according to the business table name and the application length, obtain simultaneously The sequence ISN of the sequence table is sent, so that the called side calls the sequence table according to the sequence ISN.
Optionally, the sequence increase module includes:
Length acquiring unit, for obtaining the length of the sequence table as the current length;
Sequence length adding unit, for the length of the sequence table to be increased into the current length and the Shen Please length sum, obtain it is described increase partial sequence table;
Sequence ISN acquiring unit, for obtaining the sequence ISN of the increase partial sequence table;
Sequence ISN transmitting element, for sending the sequence ISN, so that the called side is according to the sequence ISN Call the increase partial sequence table.
Optionally, the judge module includes:
Request transmitting unit, send for the called side and sent out according to the business table name and the application length needed Send the application request;
Request analysis unit, the application request received for recipient's parsing, obtains the business table name and institute State application length;
Table name judging unit, for judging whether and sequence table described in the business table name title identical.
Optionally, the sequence creation module includes:
Establishment mode acquiring unit, for selecting corresponding sequence table establishment side according to the type of database information of acquisition Formula;
Sequence creating unit, create mode using the sequence table and created according to the business table name and the application length The sequence table.
The application also provides a kind of computer-readable recording medium, it is characterised in that the computer-readable recording medium On be stored with computer program, when the computer program is executed by processor, realize the steps:
The application request sent according to called side judges whether the sequence table that the called side needs;Wherein, it is described Application request includes traffic table name and application length;
If so, then increasing the length of the sequence table according to the current length of the sequence table and the application length, obtain Take and send the sequence ISN of increased portion sub-sequence table, so that the called side calls the increased portion according to the sequence ISN Sub-sequence table;
If it is not, then creating the sequence table according to the business table name and the application length, obtain and send the sequence The sequence ISN of list, so that the called side calls the sequence table according to the sequence ISN.
The application also provides a kind of server, including:
Memory, for storing computer program;
Processor, during for performing the computer program, realize the steps:
The application request sent according to called side judges whether the sequence table that the called side needs;Wherein, it is described Application request includes traffic table name and application length;
If so, then increasing the length of the sequence table according to the current length of the sequence table and the application length, obtain Take and send the sequence ISN of increased portion sub-sequence table, so that the called side calls the increased portion according to the sequence ISN Sub-sequence table;
If it is not, then creating the sequence table according to the business table name and the application length, obtain and send the sequence The sequence ISN of list, so that the called side calls the sequence table according to the sequence ISN.
A kind of generation method of database sequence provided herein, including:The application sent according to called side is asked Judge whether the sequence table that the called side needs;Wherein, the application request includes traffic table name and application length;If It is then to increase the length of the sequence table according to the current length of the sequence table and the application length, obtain and send increasing Add the sequence ISN of partial order list, so that the called side calls the increase partial sequence table according to the sequence ISN; If it is not, then creating the sequence table according to the business table name and the application length, obtain and send the institute of the sequence table Sequence ISN is stated, so that the called side calls the sequence table according to the sequence ISN.
By establishing the generation that unified sequence table realizes sequence for all type of database, making for caller is facilitated With the process of sequence, the sequence ISN of sequence is only returned to simultaneously for caller, caller can be not concerned with sequence generation Process, it is only necessary to obtain sequence ISN and be used for using, improve the efficiency and maintainability of program development.
The application also provides a kind of generating means of database sequence, computer-readable recording medium and server, has Above-mentioned beneficial effect, will not be repeated here.
Brief description of the drawings
, below will be to embodiment or existing in order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of application, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
A kind of flow chart of the generation method for database sequence that Fig. 1 is provided by the embodiment of the present application;
A kind of sequence of the generation method for database sequence that Fig. 2 is provided by the embodiment of the present application increases the flow of operation Figure;
A kind of flow chart of the judgement operation of the generation method for database sequence that Fig. 3 is provided by the embodiment of the present application;
A kind of structural representation of the generating means for database sequence that Fig. 4 is provided by the embodiment of the present application;
A kind of another structural representation of the generating means for database sequence that Fig. 5 is provided by the embodiment of the present invention.
Embodiment
The core of the application is to provide a kind of generation method of database sequence, generating means, computer-readable storage medium Matter and server, by establishing the generation that unified sequence table realizes sequence for all type of database, facilitate caller The process using sequence, the sequence ISN of sequence is only returned to simultaneously for caller, caller can be not concerned with sequence generation In process, it is only necessary to obtain sequence ISN be used for use, improve the efficiency and maintainability of program development.
To make the purpose, technical scheme and advantage of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application In accompanying drawing, the technical scheme in the embodiment of the present application is clearly and completely described, it is clear that described embodiment is Some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art The every other embodiment obtained under the premise of creative work is not made, belong to the scope of the application protection.
It refer to Fig. 1, a kind of flow chart of the generation method for database sequence that Fig. 1 is provided by the embodiment of the present application.
The embodiment of the present application provides a kind of generation method of database sequence, can include:
S101, the application request sent according to called side judge whether the sequence table that called side needs;Wherein, apply Request includes traffic table name and application length;
This step is intended to, and the sequence table called according to required by judging the application request that called side is sent whether there is.Its In, the sequence that called side is asked has two kinds of situations, and the first is that sequence has been present, it is necessary to increase sequence according to the requirement of request The length of row is for second that sequence is not present, it is necessary to according to the new sequence table of the data creation asked to meet service condition, For using.Different presence situations is tackled, has different operation measures, therefore, it is necessary to root when called side Shen uses sequence Sequence is judged according to the content of application, to continue follow-up operation content.
Wherein, called side can be the instruction in the terminal or program of user's operation, as long as getting correct The sender of application instruction can serve as called side in this step, do not limit herein specifically.
It should be noted that can include business table name and application length in the application request being previously mentioned in the application, its In, business table name is to judge title that sequence whether there is in described above, and required for applying for that length refers to called side Sequence length quantity, needed when being modified to sequence table apply length as change foundation.It is contemplated that , where it is possible to also needing to other supplemental characteristics to supplement establishment sequence table, specific application environment should be regarded and selected Parameter in different application requests, is no longer repeated herein.
S102, if so, then obtaining and sending according to the current length of sequence table and the length of application length increase sequence table Increase the sequence ISN of partial sequence table, so that called side calls increase partial sequence table according to sequence ISN;
On the basis of step S101, this step is intended to, and increases sequence according to the current length of sequence and application length Length, and called side is used increased Sequence by sequence ISN.
Wherein, the current length of sequence table is the maximum length current as sequence table, and current length is grown by applying Degree, which is added, just obtains the sequence table length to be changed, that is, the length after changing adds the length of application length for current length.
Wherein, increased length is passed through, it is possible to obtain the increased part of sequence table.By the increase partial sequence table Sequence ISN is sent to called side, and it is business that called side can calls the sequence of the increase part to make table by the sequence ISN Table, in this process, called side have finally had to the ISN of sequence table, can for the intercurrent operation of process It is not concerned with, simplifies the step of developing program, improve development efficiency.
Wherein, the sequence ISN of sequence table is the mark of sequence table, and caller can directly use according to the sequence ISN To apllied sequence, the development process of developer is very easy to, improves development efficiency.
S103, if it is not, then creating sequence table according to business table name and application length, obtain and send in the sequence of sequence table Code, so that called side is according to sequence ISN calling sequence table.
On the basis of step S101, this step mainly creates new sequence table according to business table name and application length.
Due to step S101 judgement, and sequence table corresponding with business table name is not present, therefore just needs according to application The content of request, new sequence table is created, and obtain the sequence ISN of the sequence table so that caller uses.
Wherein, the sequence ISN of this step is substantially the same with above-mentioned sequence ISN, may in specific implementation ISN tool Holding in vivo may be not quite similar according to the needs of applicable cases, specifically will not be repeated here.
In this step, if obtain application request in the entitled demo of traffic table, application length be 1000, then just with Demo is the sequence table that title creates that length is 1000, then obtains the sequence ISN of sequence table for the use of caller.
The two kinds of situations handled in the present embodiment, are required for operating for sequence table.And for different sequences The all identical and different database of its basic series of operations of table is very fast for the service speed of basic sequence table, possesses Preferable performance.
In the present embodiment, called side gets sequence ISN can by the method for the present embodiment and directly uses the sequence Sequence table corresponding to row ISN greatly facilitates the process for using of caller as traffic table.
To sum up, the method that the present embodiment is provided realizes sequence by establishing unified sequence table for all type of database The generation of row, the process using sequence of caller is facilitated, the sequence ISN of sequence is only returned simultaneously for caller, called Person can be not concerned with the process in sequence generation, it is only necessary to obtain sequence ISN and be used for using, improve the efficiency of program development And maintainability.
Fig. 2 is refer to, a kind of sequence of the generation method for database sequence that Fig. 2 is provided by the embodiment of the present application increases The flow chart of operation.
With reference to a upper embodiment, the present embodiment is done primarily directed to the sequence growth operation that how to carry out in a upper embodiment One explanation, other parts are substantially identical with a upper embodiment, and same section may be referred to an embodiment, and the present embodiment is herein Do not repeat.
The present embodiment can include:
S201, the length of sequence table is obtained as current length;
This step is intended to, and the length of the sequence table after passing through is judged, as current length.In the above-described embodiments, root Judged according to business table name, it is possible to obtain the sequence table of correlation, be exactly the length for obtaining the sequence table in step therefore Degree, so that follow-up increase operates.
Wherein, length refers to the length when sequence table is not changed also, that is, the length before operating on it.
S202, the length of sequence table is increased into current length and application length sum, obtains increasing partial sequence table;
On the basis of step S201, this step be intended to by the length of sequence table increase to current length with application length it With.That is the sequence table of application length, the length of the sequence table finally obtained are being increased sequence table in existing length Add the sum of application length for above-mentioned current length.
Wherein, the length after this step operation be current length with application length and.It is, for example, in this reality The length for applying sequence table before example performs is 8000, and by step S201, it is 8000 to obtain current length, now not to sequence Table is operated, therefore current length and the equal length of sequence table.Application length in now application request is 1000,. After step S202 is performed, the increase of the length of sequence table for 8000 and 1000 and, the length of now sequence table is 9000.Complete The length increase operation of sequence table.
S203, obtain the sequence ISN of increase partial sequence table;
On the basis of step S202, this step is intended to obtain the sequence ISN of increase partial sequence table.
The corresponding operation with previous step, the sequence ISN that this step obtains is in the sequence of increased 1000 part Code.
S204, sequence ISN is sent, so that called side calls increase partial sequence table according to sequence ISN.
On the basis of step S203, the sequence ISN is sent.After caller receives sequence ISN, it is possible to according to sequence Row ISN calls the sequence table of the increase part as traffic table.
Fig. 3 is refer to, Fig. 3 is operated by a kind of judgement of the generation method for database sequence that the embodiment of the present application provides Flow chart.
With reference to a upper embodiment, the present embodiment judges that operation does one primarily directed to how to carry out in a upper embodiment Explain, other parts are substantially identical with a upper embodiment, and same section may be referred to an embodiment, and the present embodiment is not done herein Repeat.
The present embodiment can include:
S301, called side is sent sends application request according to business table name and the application length needed;
S302, the application request that recipient's parsing receives, obtains business table name and application length;
S303, judge whether and business table name title identical sequence table.
The present embodiment is intended to, and called side sends corresponding application request according to the demand of required sequence table, wherein wrapping Business table name and application length are contained.This application is received to ask and parse to obtain business table name and application length, and according to it In business table name existing sequence table is judged.
Wherein, recipient is the relative concept with called side, for performing the correlation technique in above-described embodiment.Recipient Can be the generating means of following database sequences that will be introduced.
Optionally, can include in the present embodiment:
Step 1, corresponding sequence table is selected to create mode according to the type of database information of acquisition;
Step 2, create mode using the sequence table and the sequence is created according to the business table name and the application length List.
The present embodiment is mainly when creating sequence table, according to the information of the type of database of acquisition selection selection and the number According to the corresponding establishment mode in storehouse, the mode sequence related to business table name and application length establishment is created further according to corresponding Table.
In general, type of database include SQLserver, Oracle and MySQL, it is only necessary to are judged according to type information Some of whether above-mentioned three kinds of the database, create type further according to the distinctive sequence table of each database and carry out sequence table Create.
The embodiment of the present application provides a kind of generation method of database sequence, can be by for all type of database The generation that sequence is realized in unified sequence table is established, facilitates the process using sequence of caller, simultaneously for caller only The sequence ISN of sequence is returned to, caller can be not concerned with the process in sequence generation, it is only necessary to obtain sequence ISN and be used for making With improving the efficiency and maintainability of program development.
A kind of generating means of the database sequence provided below the embodiment of the present application are introduced, and described below one The generating means of kind database sequence can be mutually to should refer to a kind of above-described generation method of database sequence.
It refer to Fig. 4, a kind of structural representation of the generating means for database sequence that Fig. 4 is provided by the embodiment of the present application Figure.
The present embodiment can include:
Judge module 100, the application request for being sent according to called side judge whether the sequence that called side needs Table;Wherein, application request includes:Business table name and application length;
Sequence increases module 200, for the current length according to sequence table and the length of application length increase sequence table, obtains Take and send the sequence ISN of increased portion sub-sequence table, so that called side calls increase partial sequence table according to sequence ISN;
Sequence creation module 300, for creating sequence table according to business table name and application length, obtain and send sequence table Sequence ISN so that called side is according to sequence ISN calling sequence table.
Sequence increases module 200, can include:
Length acquiring unit, for obtaining the length of sequence table as current length;
Sequence length adding unit, for the length of sequence table to be increased into current length and application length sum, obtain Increase partial sequence table;
Sequence ISN acquiring unit, for obtaining the sequence ISN of increase partial sequence table;
Sequence ISN transmitting element, for sending sequence ISN, so that called side calls increase part according to sequence ISN Sequence table.
Judge module 100, it can include:
Request transmitting unit, sent for called side and application request is sent according to business table name and the application length needed;
Request analysis unit, the application request received for recipient's parsing, obtains business table name and application length;
Table name judging unit, for judging whether and business table name title identical sequence table.
Sequence creation module 300, it can include:
Establishment mode acquiring unit, for selecting corresponding sequence table establishment side according to the type of database information of acquisition Formula;
Sequence creating unit, create mode using the sequence table and created according to the business table name and the application length The sequence table.
It refer to Fig. 5, a kind of another knot of the generating means for database sequence that Fig. 5 is provided by the embodiment of the present invention Structure schematic diagram, the computing device can produce bigger difference because configuration or performance are different, can include one or one with Upper processor (central processing units, CPU) 422 (for example, one or more processors) and memory 442, one or more storage application programs 442 or data 444 storage medium 440 (such as one or more sea Measure storage device).Wherein, memory 442 and storage medium 440 can be of short duration storage or persistently storage.Storage is stored in be situated between The program of matter 440 can include one or more modules (diagram does not mark), and each module can include to generating means In series of instructions operation.Further, central processing unit 422 could be arranged to communicate with storage medium 440, calculate The series of instructions operation in storage medium 440 is performed on device 400.
Generating means 400 can also include one or more power supplys 426, one or more wired or wireless nets Network interface 450, one or more input/output interfaces 458, and/or, one or more operating systems 441, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
Step in a kind of above-mentioned Fig. 1 to the generation method of database sequence described by Fig. 3 is by a kind of database sequence Generating means based on shown in the Fig. 5 structure realize.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and module, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the division of module, Only a kind of division of logic function, can there is an other dividing mode when actually realizing, such as multiple module or components can be with With reference to or be desirably integrated into another system, or some features can be ignored, or not perform.It is another, it is shown or discussed Mutual coupling or direct-coupling or communication connection can be by some interfaces, the INDIRECT COUPLING of device or module or Communication connection, can be electrical, mechanical or other forms.
The module illustrated as separating component can be or may not be physically separate, be shown as module Part can be or may not be physical module, you can with positioned at a place, or can also be distributed to multiple networks In module.Some or all of module therein can be selected to realize the purpose of this embodiment scheme according to the actual needs.
In addition, each functional module in each embodiment of the application can be integrated in a processing module, can also That modules are individually physically present, can also two or more modules be integrated in a module.Above-mentioned integrated mould Block can both be realized in the form of hardware, can also be realized in the form of software function module.
If integrated module is realized in the form of software function module and is used as independent production marketing or in use, can To be stored in a computer read/write memory medium.Based on such understanding, the technical scheme of the application substantially or Saying all or part of the part to be contributed to prior art or the technical scheme can be embodied in the form of software product Out, the computer software product is stored in a storage medium, including some instructions are causing a computer equipment (can be personal computer, funcall device, or network equipment etc.) performs the whole of each embodiment method of the application Or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. are various can be with storage program The medium of code.
Above to the generation method, generating means, computer-readable storage of a kind of database sequence provided herein Medium and server are described in detail.Specific case used herein is carried out to the principle and embodiment of the application Illustrate, the explanation of above example is only intended to help and understands the present processes and its core concept.It should be pointed out that for this For the those of ordinary skill of technical field, on the premise of the application principle is not departed from, the application can also be carried out some Improve and modification, these improvement and modification are also fallen into the application scope of the claims.

Claims (10)

  1. A kind of 1. generation method of database sequence, it is characterised in that including:
    The application request sent according to called side judges whether the sequence table that the called side needs;Wherein, the application Request includes traffic table name and application length;
    If so, then increasing the length of the sequence table according to the current length of the sequence table and the application length, obtain simultaneously The sequence ISN of increase partial sequence table is sent, so that the called side calls the increase partial order according to the sequence ISN List;
    If it is not, then creating the sequence table according to the business table name and the application length, obtain and send the sequence table The sequence ISN so that the called side calls the sequence table according to the sequence ISN.
  2. 2. generation method according to claim 1, it is characterised in that the current length and institute according to the sequence table Stating application length increases the length of the sequence table, obtains and sends the sequence ISN of increased portion sub-sequence table, so that the tune The increase partial sequence table is called according to the sequence ISN with root, including:
    The length of the sequence table is obtained as the current length;
    The length of the sequence table is increased into the current length and the application length sum, obtains the increased portion Sub-sequence table;
    Obtain the sequence ISN of the increase partial sequence table;
    The sequence ISN is sent, so that the called side calls the increase partial sequence table according to the sequence ISN.
  3. 3. generation method according to claim 2, it is characterised in that the application sent according to called side asks to judge The sequence table needed with the presence or absence of the called side, including:
    The called side is sent asks according to the business table name and the application length needed the transmission application;
    The application request that recipient's parsing receives, obtains the business table name and the application length;
    Judge whether and sequence table described in the business table name title identical.
  4. 4. generation method according to claim 1, it is characterised in that described to be grown according to the business table name with the application Degree creates the sequence table, including:
    Corresponding sequence table is selected to create mode according to the type of database information of acquisition;
    Mode is created using the sequence table, and the sequence table is created according to the business table name and the application length.
  5. A kind of 5. generating means of database sequence, it is characterised in that including:
    Judge module, the application request for being sent according to called side judge whether the sequence table that the called side needs; Wherein, the application request includes:Business table name and application length;
    Sequence increases module, increases the length of the sequence table for the current length according to the sequence table and the application length Degree, obtains and sends the sequence ISN of increased portion sub-sequence table, so that the called side is according to calling the sequence ISN Increase partial sequence table;
    Sequence creation module, for creating the sequence table according to the business table name and the application length, obtain and send The sequence ISN of the sequence table, so that the called side calls the sequence table according to the sequence ISN.
  6. 6. generating means according to claim 5, it is characterised in that the sequence increase module includes:
    Length acquiring unit, for obtaining the length of the sequence table as the current length;
    Sequence length adding unit, grown for the length of the sequence table to be increased into the current length with the application Sum is spent, obtains the increase partial sequence table;
    Sequence ISN acquiring unit, for obtaining the sequence ISN of the increase partial sequence table;
    Sequence ISN transmitting element, for sending the sequence ISN, so that the called side is called according to the sequence ISN The increase partial sequence table.
  7. 7. generating means according to claim 6, it is characterised in that the judge module includes:
    Request transmitting unit, sent for the called side and institute is sent according to the business table name and the application length needed State application request;
    Request analysis unit, the application request received for recipient's parsing, obtains the business table name and the Shen Please length;
    Table name judging unit, for judging whether and sequence table described in the business table name title identical.
  8. 8. generating means according to claim 5, it is characterised in that the sequence creation module includes:
    Establishment mode acquiring unit, for selecting corresponding sequence table to create mode according to the type of database information of acquisition;
    Sequence creating unit, mode is created according to creating the business table name and the application length using the sequence table Sequence table.
  9. 9. a kind of computer-readable recording medium, it is characterised in that be stored with computer on the computer-readable recording medium Program, the step of the generation method as described in any one of Claims 1-4 is realized when the computer program is executed by processor Suddenly.
  10. A kind of 10. server, it is characterised in that including:
    Memory, for storing computer program;
    Processor, the step of the generation method as described in any one of Claims 1-4 is realized during for performing the computer program Suddenly.
CN201711072984.4A 2017-11-03 2017-11-03 The generation method and relevant apparatus of a kind of database sequence Pending CN107766557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711072984.4A CN107766557A (en) 2017-11-03 2017-11-03 The generation method and relevant apparatus of a kind of database sequence

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711072984.4A CN107766557A (en) 2017-11-03 2017-11-03 The generation method and relevant apparatus of a kind of database sequence

Publications (1)

Publication Number Publication Date
CN107766557A true CN107766557A (en) 2018-03-06

Family

ID=61273089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711072984.4A Pending CN107766557A (en) 2017-11-03 2017-11-03 The generation method and relevant apparatus of a kind of database sequence

Country Status (1)

Country Link
CN (1) CN107766557A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020268A (en) * 2012-12-26 2013-04-03 大唐软件技术股份有限公司 Serial number applying method and system of relational database
CN103116622A (en) * 2013-01-30 2013-05-22 深圳联友科技有限公司 Sequential value generating method and device for Ibatis scheme
CN104462206A (en) * 2014-10-31 2015-03-25 国云科技股份有限公司 General database sequence generating method
US20160162524A1 (en) * 2014-12-05 2016-06-09 Business Partners Limited Real Time Indexing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103020268A (en) * 2012-12-26 2013-04-03 大唐软件技术股份有限公司 Serial number applying method and system of relational database
CN103116622A (en) * 2013-01-30 2013-05-22 深圳联友科技有限公司 Sequential value generating method and device for Ibatis scheme
CN104462206A (en) * 2014-10-31 2015-03-25 国云科技股份有限公司 General database sequence generating method
US20160162524A1 (en) * 2014-12-05 2016-06-09 Business Partners Limited Real Time Indexing

Similar Documents

Publication Publication Date Title
TWI622933B (en) Client update method and device
EP3731161A1 (en) Model application method and system, and model management method and server
CN107908680A (en) Management method, electronic device and the computer-readable recording medium of wechat public platform
CN107729139A (en) A kind of method and apparatus for concurrently obtaining resource
CN109754072B (en) Processing method of network offline model, artificial intelligence processing device and related products
WO2017084450A1 (en) Method and system for cloud management
CN107689982A (en) Multi-data source method of data synchronization, application server and computer-readable recording medium
CN105580407A (en) Network resource deployment method and device
CN106886434A (en) A kind of Distributed Application installation method and device
CN111552838A (en) Data processing method and device, computer equipment and storage medium
CN111435354A (en) Data export method and device, storage medium and electronic equipment
CN105022619A (en) Code processing method and device
CN111949324A (en) Distributed serial number generation method and device
CN107708217A (en) A kind of resource regulating method and base station
CN113536081A (en) Data center data management method and system based on artificial intelligence
CN112422450A (en) Computer equipment, and flow control method and device for service request
CN107678863A (en) The page assembly means of communication and device
CN109191078A (en) A kind of traffic flow modeling method, device and equipment
CN112286623B (en) Information processing method and device and storage medium
CN110868330B (en) Evaluation method, device and evaluation system for CPU resources which can be divided by cloud platform
CN111444074A (en) Data monitoring method and device, electronic equipment and readable storage medium
CN107766557A (en) The generation method and relevant apparatus of a kind of database sequence
CN116126719A (en) Interface testing method and device, electronic equipment and storage medium
CN108681448A (en) Network request method, storage medium, electronic equipment and the system of IOS systems
CN115935909A (en) File generation method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180306

RJ01 Rejection of invention patent application after publication