CN101004683A - Method and device for accessing database - Google Patents

Method and device for accessing database Download PDF

Info

Publication number
CN101004683A
CN101004683A CN 200710003123 CN200710003123A CN101004683A CN 101004683 A CN101004683 A CN 101004683A CN 200710003123 CN200710003123 CN 200710003123 CN 200710003123 A CN200710003123 A CN 200710003123A CN 101004683 A CN101004683 A CN 101004683A
Authority
CN
China
Prior art keywords
database
dbapi
encapsulated layer
name
sql statement
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
Application number
CN 200710003123
Other languages
Chinese (zh)
Other versions
CN100456237C (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2007100031230A priority Critical patent/CN100456237C/en
Publication of CN101004683A publication Critical patent/CN101004683A/en
Application granted granted Critical
Publication of CN100456237C publication Critical patent/CN100456237C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

A method for calling on databank includes receiving databank operation information by package layer of databank application program interface then generating structure query language and calling on databank by said package layer of databank application program interface according said databank operation information.

Description

Data bank access method and device
Technical field
The present invention relates to database technology, particularly a kind of data bank access method and device.
Background technology
Current, fields such as telecommunications are when carrying out separately related service, the capital produces lot of data to be needed to handle, require very high for this to the data handling property, the system that a large amount of on-site customization development tasks are arranged again simultaneously, use a kind of convenience and efficiently visiting mechanism be very necessary.At present industry has had much the solutions about encapsulation of data storehouse access mechanism, shines upon (iBATIS SQL Maps) mechanism and dormancy (hibernate) mechanism etc. as O-R (object-relation) mapping mechanism, the iBATIS Structured Query Language (SQL) of the Container Management persistence of enterprise-level Java Beans (EJB).
But every kind of solution all has its limitation:
The O-R mapping mechanism of the Container Management persistence of EJB does not allow to use the distinctive character of database, thereby can't reach requirement at foregoing performance requirement than higher occasion.
IBATIS SQL Maps solution uses the sql like language of configuration to realize the O-R mapping, supports dynamic queries condition ability to a certain extent simultaneously, writes personnel for business, the just java object of facing; For concrete data manipulation, then require the developer to write concrete SQL statement, be the example of iBATIS configuration file below:
<select?id=“getUsers”parameterClass=“user”resultMap=“get-user-result”>
select?id,name,sex?from?t_user
<dynamic?prepend=“WHERE”>
<isNotEmpty?prepend=“AND”property=“name”>
(name?like#name#)
</isNotEmpty>
<isNotEmpty?prepend=“AND”property=“address”>
(address?like#address#)
</isNotEmpty>
</dynamic>
</select>
IBATIS SQL Maps only supports to use SQL to dispose and carries out the O-R mapping, so, for a lot of simple logics, can increase a lot of configuration informations, causes the increase of workload; Simultaneously, the employed SQL configuration format of this scheme is more weak for the tenability of dynamic sql, and is limited to the tenability of complicated dynamic condition.
The solution of Hibernate tends to use the mode of full configuration to carry out the O-R mapping, by the whole relational model of XML (extensible Markup Language) (XML) file configuration, and is generated the SQL statement of accessing database automatically by hibernate; And, increased hibernate query language (HQL) among the hibernate, can handle the inquiry of more complicated by configuration HQL.The automaticity of this mode is than higher, but because will produce SQL statement automatically, the configuration of hibernate is tended to complicated, that is to say that the configuration that need do a lot of complexity just can finish intended function, especially when will manage business statistics and multilist correlation inquiry etc. are professional, configuration is a lot, limits also a lot; And for large scale system, the performance of SQL is very crucial, and the SQL statement that produces automatically also is difficult to intelligence to the degree that can realize fine optimization, so also need the final SQL statement of human intervention at present; Also have, the restriction ratio of HQL is more, and HQL is also simple unlike SQL in study, therefore causes accordingly and uses HQL also directly not use SQL effective.
Current, the exploitation in similar telecommunication service operation support system fields such as (BOSS), not only need to operate lot of data, and field demand is changeable, need on-site customization exploitation repeatedly, and this process often needs the up to a hundred people to last the several months just can to finish so long-time high-intensity on-site customization development, not only need to expend a large amount of resource of a company, and be difficult to guarantee work quality and project process.And existing visiting mechanism is also all developed for the purpose that satisfies versatility because of them except possessing above-mentioned many disadvantages, so if think to set up very difficulty of a business development platform thereon.Therefore, seek a kind of Database Accessing Methods, make this method both support the on-site customization exploitation, support to use simply and easily the various proprietary characteristic of database to realize that specific purpose is necessary again from technological layer.
Summary of the invention
In view of this, the fundamental purpose of the embodiment of the invention is to provide a kind of data bank access method, so that a kind of visiting mechanism simply and easily to be provided.
Another purpose of the embodiment of the invention is to provide a kind of database access device, so that a kind of device of database access simply and easily to be provided.
For achieving the above object, the technical scheme of the embodiment of the invention is achieved in that
A kind of data bank access method, this method may further comprise the steps:
Database api DBAPI encapsulated layer receives database manipulation message; The DBAPI encapsulated layer is according to described database manipulation message generating structure query language SQL statement accesses database.
A kind of database access device, this device comprise contact bed module, DBAPI encapsulated layer module and database storing module;
Described contact bed module is used for sending database manipulation message to DBAPI encapsulated layer module, and receives the database manipulation result that DBAPI encapsulated layer module is returned;
Described DBAPI encapsulated layer module is used to receive the database manipulation message from the contact bed module, generates SQL statement according to described database manipulation message, and by described SQL statement accessing database memory module;
Described database storing module is used to receive the SQL statement from DBAPI encapsulated layer module, carries out database manipulation according to described SQL statement, and to DBAPI encapsulated layer module return data storehouse operating result.
As seen, adopted the technical scheme of the embodiment of the invention, the DBAPI encapsulated layer receives database manipulation message, automatically generate corresponding SQL statement accessing database according to the database manipulation message that receives, and export the database manipulation result who returns, like this, for the database access operation, all become simple function call, make database access become simple and make things convenient for, improved database access efficient.
Description of drawings
Fig. 1 is a data bank access method preferred embodiment process flow diagram of the present invention;
Fig. 2 is a database access device preferred embodiment structural representation of the present invention.
Embodiment
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in further detail.
For the technical scheme of the clearer explanation embodiment of the invention, at first introduce two notions:
Simple object: can be described as basic object or fundamental type again, show as character string, integer, floating-point decimal, fractional fixed point or date etc.
Value object: object a kind of, refering in particular to its important attribute is to be combined by simple object, and the object of its implication emphasis on data.
The basic thought of this better embodiment is: for the database access operation, can be regarded as a single function call, the parameter of calling is a value object, and rreturn value is a common object.According to the difference of mode of operation, the object that returns has three kinds of different types: the state variable whether representative operation is successful, the object of being made up of simple object and value object container of representing the value object array of return results collection and representing many rreturn values.Wherein, each database manipulation correspondence and only corresponding linear function call, whole invoked procedure is transparent to operation layer, but can influence and customization and the mutual center section of database by configuration item, and do not having under the situation of configuration item, supporting to carry out alternately according to name constraints automatically with database.Embodiment of the invention scheme is to realize under the Java platform.
According to above-mentioned basic thought, Fig. 1 is a data bank access method preferred embodiment process flow diagram of the present invention, as shown in Figure 1, may further comprise the steps:
Step 101: database application interface routine (DBAPI) encapsulated layer receives database manipulation message.
Database manipulation message comprises information such as function name, value object and environmental variance.Wherein, function name is used for the identification service configuration ID; Value object is used to identify the corresponding database operation information; Environmental variance mainly preserve current login user information, current accessed person the IP address information and with some relevant information such as daily record, security audit.
Environmental variance is provided with at the border of system tangent plane, and for servlet, this position generally at overall filtrator place or inside the public base class of behavior (action), is write by the unification of common framework layer; For EJB or other establishment, as conventional information control system (cics) middleware, this value is imported into by interface layer by system architecture, when needing these information in the SQL statement, can obtain at any time.Environmental variance is to be made of one group of thread local variable in essence, and thread local variable realizes in standard database, and realization mechanism and the mapping of thread object composition rule can be followed the extinction of thread object and wither away.Owing to,, generally all in a thread, carry out, so application program and common framework layer can obtain these values in any position if do not cross over various borders for a call chain.
Step 102:DBAPI encapsulated layer generates the SQL statement accesses database according to database manipulation message.
Store business configuration, data source configuration and name constraints information in the DBAPI encapsulated layer in advance.The DBAPI encapsulated layer finds the corresponding service configuration according to function name that receives and value object, search the data source configuration by environmental variance and obtain data source information, and the generation SQL statement, the SQL statement that generates is resolved, by the SQL statement visit data source database after resolving.
Above-mentioned better embodiment support generates the mode of SQL statement and dynamic SQL statements automatically.Wherein, the generating mode of dynamic SQL statements is for directly using the dynamic sql sign in SQL statement, thereby accomplish that not only querying condition can dynamically produce as the case may be, and the each several part of whole SQL statement also can dynamically produce as the case may be, increase the scope of application of dynamic sql, and simplified configuration information.The syntactic definition mode of dynamic sql is as follows:
Dynamic sql :=<pretreatment condition〉[several dynamic sqls or several simple SQL];
Simple SQL:=has used the common SQL statement of attribute-name binding logo.
The definition mode of above-mentioned simple SQL is that common SQL statement adds the sign by the attribute-name binding, similar with the definition mode in the iBATIS SQL Maps scheme, different is that direct environment for use variable of embodiment of the invention support and attribute-name binding logo possess the arithmetic logic ability; Realizing that on the details, what the embodiment of the invention adopted is to come the representation attribute name with the mode that adds ": " before the variable name, rather than " # " in the iBATISSQL Maps scheme in addition; Above-mentioned arithmetic logic is in order to remedy the difference of object model and database model, makes operation layer be unlikely to carry out because wanting accessing database special processing, the transparency of augmentation data storehouse operation.
Illustrate the syntactic definition mode of dynamic SQL statements below:
At first introduce simple SQL statement form:
Select *from?cust?where?custtype=:custtype?and?managerid=:RunContext.userId
Here adding the Property Name that ": " representative needs are bound before using variable name, mainly is in order to meet the custom of SQL statement in the database; RunContext is the environmental variance sign, and RunContext.userId represents current login user; Custtype is the attribute-name of the value object that imports into.Wherein, environmental variance can be redefined when specifically using by the business framework layer.
The simple SQL statement form that comprises arithmetic logic:
Select *from?cust?where?managerid?in(:managerids[split?with,])and?custidlike:cust[+]%
Wherein, managerids and cust are the property values of value object, and managerids is that the customer manager tabulates, and cut apart different customer managers' id with ", "; Cust is preceding several characters of custid, and the SQL below the resolved one-tenth carried out in this statement:
Select *From vip where region=? And managerid in (?,? ...?) and custid like? in the In condition "? " number decide according to the result that managerids is broken.
The dynamic SQL statements form that does not comprise nested logic:
Select *from?task_his
$[:datatype?equals?BeginDate]{and?begindate>:databegin?and?enddate<:dateend}
$[:datatype?equals?CreatDate]{and?creatdate>:databegin?and?creatdate<:dateend}
$[:datatype?equals?Endate]{and?enddate>:databegin?and?enddate<:dateend}
$:taskname{and?taskname?like:taskname[+]%}
$:tasktype{and?tasktype=:tasktype}
$:objtypeid{and?objtypeid=:objtypeid}
Wherein belonging to pretreatment condition , $[:datatype equals BeginDate by " $ " leading part] meaning of representative is that the value of attribute datatype is BeginDate; $:taskname Shi $[:taskname is not null] shorthand because most of dynamic condition all is to adopt this form, so write a Chinese character in simplified form in this use.
The dynamic SQL statements form that comprises nested logic:
$[:costtype?equals?planactioncost]
{
Corresponding dynamic SQL statements
}
$[:costtype?equals?taskactioncost]
{
Corresponding dynamic SQL statements
}
$[:costtype?equals?workactioncost]
{
Corresponding dynamic SQL statements
}
In addition, the embodiment of the invention also provides consistent access mode for storing process, to support the transparent access to database, is the example of storing process access configuration below:
P_QUERY_CUST(:servNumberVARCHAR2,:RunContext.userld?VARCHAR2,:sendStateVARCHAR2,:remindsubject?VARCHAR2,:region?NUMBER,10?NUMBER,:countNumber?OUTNUMBER,:r_Cursor?OUT?Cursor)
Because the syntactic definition of above-mentioned dynamic SQL statements is fairly simple, therefore it is relatively easy to resolve, even do not need to do strict grammatical analysis, only need simply do a scanning, seek corresponding leading character and attribute-name identifier and do corresponding processing and get final product, so analysis feature is relatively good.The just actual at present effect that realizes, for typical dynamic SQL statements, embodiment of the invention resolution speed travels through the speed fast about 50% of this dynamic sql character string than the charAt function that uses String.
Search business configuration except above-mentioned according to function name and value object, and outside the mode of corresponding generation SQL statement, more common for some and service logic is also fairly simple single table handling, the support of embodiment of the invention technical scheme is not added any configuration and direct use value object and/or query object, carry out increase, modification, inquiry and deletion action by the mode of using name constraints at database, thereby reduce configuration, improve development efficiency.
The embodiment of the invention adopts the name constraints mode, predesignate the transformation rule of attribute-name and field name, this transformation rule is realized by object, can redefine this object and use configuration to redefine this transformation rule by the mode of similar control counter-rotating (Ioc) by writing service code; For operations such as increase, modification, inquiry and deletion at database, generate corresponding insert, update, query and delete SQL statement according to this transformation rule, concrete conversion regime is:
If in database, increase record, it is newly-built record, then with database table name and value object as parameter, the database table name is used to identify the database table position of newly-built record, the O-R mapping layer is tabulated according to all properties that value object obtains in the value object, and generate corresponding field name, and then generate corresponding insert statement according to attribute-name and field name transformation rule.As parameter, value object also can be used as query object, perhaps converts query object to database table name and query object for deletion and query manipulation, and Cha Xun result respectively classifies the query note collection that querying condition is done as with the correspondence in the value object in this case; Query object also is value object strictly speaking, be on the value object basis, to increase some to inquire about peculiar incidence relation, purpose is for relatively complicated but do not wish to use under the situation of configuration and use, the O-R mapping layer obtains the attribute-name that will delete or inquire about according to query object or value object, and generate corresponding field name, and then generate corresponding delete or query statement according to attribute-name and field name transformation rule.Retouching operation with database table name, query object and value object as parameter, wherein, the set (normally record) that the query object definition will be revised, the result that the value object definition is revised, the O-R mapping layer obtains the attribute-name that will revise and revise the result according to query object and value object, and generate corresponding field name, and then generate corresponding update statement according to attribute-name and field name transformation rule.
Step 103: database root is carried out database manipulation according to SQL statement, and to DBAPI encapsulated layer return data storehouse operating result.
In this step, how database receives the SQL operational order of DBAPI encapsulated layer, and also how the return result is prior art how to carry out corresponding operational processes, is not described herein.
Step 104:DBAPI encapsulated layer receives and the output database operating result.
The DBAPI encapsulated layer receives the result set that database returns/call the result, and carries out the O-R mapping, with result set/call and export to operation layer after the result is mapped as common object.According to the difference of mode of operation, described common object can have three kinds of different types: the state variable whether representative operation is successful, the object of being made up of simple object and value object container of representing the value object array of return results collection and representing many rreturn values.
Current, detailed record for the requirement of the safety and the various policies of its data, all can be done to the accessing operation of database by each enterprise in using each visiting mechanism accessing database process.All be to write down these daily records in the system in past, still, in a up to a hundred people's development teams, do a large amount of work by these informational needs operation layers of record one by one by operation layer, and not only time-consuming but also omit easily.In the technical scheme of the embodiment of the invention, operation layer is the operating database object directly, but the DBAPI encapsulated layer is understood all database manipulations, such as, the SQL statement of carrying out and the value of each binding variable etc., and, the DBAPI encapsulated layer can obtain information such as current operation user's all recorded informations and program execution path from environmental variance, therefore the DBAPI encapsulated layer can be noted each operation user at any time to any operation of database very easily according to above-mentioned information, even can with different tables access rights be set to different operation users.
Equally, for the data level authority, directly obtain current operation attribute of user in the statement owing to can dispose at SQL, so will realize that various controls of authority are very simple, operation layer need not to do extra processing, only needs directly to use in the SQL statement of configuration to get final product.
Fig. 2 is the apparatus structure synoptic diagram based on above-mentioned data bank access method, and as shown in Figure 2, this device comprises contact bed module 201, DBAPI encapsulated layer module 202 and database storing module 203;
Contact bed module 201 is used for sending database manipulation message to DBAPI encapsulated layer module 202, and receives the database manipulation result that DBAPI encapsulated layer module 202 is returned;
DBAPI encapsulated layer module 202 is used to receive the database manipulation message from contact bed module 201, generates SQL statement according to described database manipulation message, and by described SQL statement accessing database memory module 203;
Database storing module 203 is used to receive the SQL statement from DBAPI encapsulated layer module 202, carries out database manipulation according to SQL statement, and to DBAPI encapsulated layer module 202 return data storehouse operating results.
Wherein, contact bed module 201 further comprises interface layer module 2011 and operation layer module 2012; Interface layer module 2011 is used for transmitting environmental variance to DBAPI encapsulated layer module 202; Operation layer module 2012 is used for to DBAPI encapsulated layer module 202 sending function names, value object, database table name and query object, and receives the database access object information of DBAPI encapsulated layer module 202 outputs.
Store business configuration, data source configuration and name constraints information in the DBAPI encapsulated layer module 202 in advance.When the database manipulation more complicated that will carry out, DBAPI encapsulated layer module 202 is searched the corresponding service configuration according to function name and value object, and generates dynamic SQL statements; For fairly simple business, as single table handling more common in the database access, DBAPI encapsulated layer module 202 can not used business configuration, and directly according to attribute-name of predesignating in the name constraints and field name transformation rule, getattr from the value object that receives and/or query object, described property transformation is become corresponding field name, and further generate corresponding SQL statement.
The SQL statement of 202 pairs of generations of DBAPI encapsulated layer module is resolved, and by the SQL accessing database memory module 203 after resolving, how database itself is carried out is operating as prior art accordingly, is not described herein then; Behind the database complete operation, by database storing module 203 return results information, as result set or call the result; DBAPI encapsulated layer module 202 further is mapped as common object by the O-R mapping with described database manipulation result and sends to operation layer module 2012.In addition, DBAPI encapsulated layer module 202 can also be used for database of record access log and Operation Log and be used for the data level control of authority.
Therefore the technical scheme of the embodiment of the invention has been taken into account the difference of relational model and object model, and provides accordant interface to contact bed, has realized configurableization of contact bed and the summary of exploitation.For operation layer, all data base calls can simply be interpreted as API Calls, need not to consider the problems such as connection of database, and the configuration that needs simultaneously also greatly reduces, and has simplified service code greatly and has write work and development.For the DBAPI encapsulated layer, simple business can be carried out automatically according to naming rule, complicated service can realize by dynamic SQL statements, all characteristics of database had both been allowed to use, possesses bigger dirigibility again, can also shield simultaneously the difference of SQL statement or SQL statement sequence and storing process, in actual applications, this just means the accumulation that both can keep mass data storehouse developer, can realize higher performance requirement again, also can better support the Performance tuning in development later stage simultaneously.
Scheme than similar hibernate, embodiment of the invention permission developer fully controls the SQL statement to database access, can not increase new code again simultaneously because of the control SQL statement, bring into play the ability that database can be good at the deal with data logic, avoided the shortcoming of database again.Than iBATIS SQL Maps, the embodiment of the invention provides better configuration flexibility and simplicity, and because environmental variance etc. can be directly and the common logic on upper strata more powerful service supporting capacity is provided alternately.In addition, the embodiment of the invention has realized very strong customizable ability, because coupling is more open between the various piece, and exist consistent model to carry out alternately, when so change takes place in any one aspect, influence to other aspect is all smaller, even other aspect change also only need be done less change and get final product.
From practical application effect, use embodiment of the invention technical scheme, substantially can realize quick exploitation and full configuration property in conjunction with an other cover page frame frame system of Huawei Company exploitation at most of business logic, even do not use full configuration exploitation, the customization personnel also can just finish within several hrs a function development and test job, have improved the efficient of on-site customization development greatly.
In sum, more than be preferred embodiment of the present invention only, be not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (17)

1, a kind of data bank access method is characterized in that, this method may further comprise the steps:
Database api DBAPI encapsulated layer receives database manipulation message; The DBAPI encapsulated layer is according to described database manipulation message generating structure query language SQL statement accesses database.
2, data bank access method according to claim 1 is characterized in that, this method further comprises: carry out database manipulation according to described SQL statement, and to DBAPI encapsulated layer return data storehouse operating result; Described DBAPI encapsulated layer receives and exports described database manipulation result.
3, according to claim 1 or 2 described data bank access methods, it is characterized in that described database manipulation message comprises function name, value object and environmental variance.
4, data bank access method according to claim 3 is characterized in that, stores business configuration and data source configuration information in the described DBAPI encapsulated layer in advance;
Described DBAPI encapsulated layer according to the method that described database manipulation message generates the SQL statement accesses database is:
Described DBAPI encapsulated layer finds the corresponding service configuration according to function name and value object, and generates dynamic SQL statements;
Described DBAPI encapsulated layer is searched the data source configuration according to environmental variance and is obtained the data source data library information;
Described DBAPI encapsulated layer is resolved the dynamic SQL statements that generates, and visits described data source data storehouse by the SQL after resolving.
5, data bank access method according to claim 4 is characterized in that, the generating mode of described dynamic SQL statements is: use the dynamic sql sign in SQL statement; Syntax format is: pretreatment condition adds at least one simple SQL statement and/or dynamic SQL statements.
6, data bank access method according to claim 5 is characterized in that, described simple SQL statement form is: common SQL statement adds the sign by the attribute-name binding.
According to claim 5 or 6 described data bank access methods, it is characterized in that 7, direct environment for use variable of described simple SQL statement support and described attribute-name binding logo possess arithmetic logic.
8, data bank access method according to claim 3 is characterized in that,
Described database manipulation message further comprises database table name and/or query object; Store name constraints information in advance in the described DBAPI encapsulated layer;
Described DBAPI encapsulated layer according to the method that described database manipulation message generates the SQL statement accesses database is:
Described DBAPI encapsulated layer is the getattr name from the value object that receives and/or query object, and employing name constraints mode, according to attribute-name of predesignating and field name transformation rule, convert described attribute-name to corresponding field name, and further generate corresponding SQL statement;
Described DBAPI encapsulated layer obtains the database table information that will operate according to the database table name;
Described DBAPI encapsulated layer is resolved the SQL statement that generates, and by the corresponding database table of SQL visit after resolving.
9, data bank access method according to claim 2 is characterized in that, described DBAPI encapsulated layer receives and the mode of output database operating result is:
Described DBAPI encapsulated layer receives the result set that database returned or calls the result, and by object-relationship map with described result set or call the result and be mapped as common object.
10, data bank access method according to claim 9, it is characterized in that, difference according to mode of operation, whether successful the described common object that is mapped to comprises at least three kinds of different types, be respectively representative operation state variable, represent the value object array of return results tuple or represent the object of being made up of simple object and value object container of many rreturn values.
11, data bank access method according to claim 3 is characterized in that, this method further comprises: described DBAPI encapsulated layer database of record access log and Operation Log are also realized the data level control of authority.
12, data bank access method according to claim 11, it is characterized in that, the method of described DBAPI encapsulated layer database of record access log and Operation Log is: described DBAPI encapsulated layer database of record operation information automatically in the process that generates the SQL statement accesses database, and according to the user profile of environmental variance record access database.
13, a kind of database access device is characterized in that, this device comprises contact bed module, DBAPI encapsulated layer module and database storing module;
Described contact bed module is used for sending database manipulation message to DBAPI encapsulated layer module, and receives the database manipulation result that DBAPI encapsulated layer module is returned;
Described DBAPI encapsulated layer module is used to receive the database manipulation message from the contact bed module, generates SQL statement according to described database manipulation message, and visits described database storing module by described SQL statement;
Described database storing module is used to receive the SQL statement from DBAPI encapsulated layer module, carries out database manipulation according to described SQL statement, and to DBAPI encapsulated layer module return data storehouse operating result.
14, database access device according to claim 13 is characterized in that, described contact bed module further comprises interface layer module and operation layer module;
Described interface layer module is used for transmitting environmental variance to DBAPI encapsulated layer module;
Described operation layer module is used for to DBAPI encapsulated layer module sending function name, value object, database table name and query object, and receives the database manipulation result of DBAPI encapsulated layer module output.
15, database access device according to claim 14 is characterized in that, stores business configuration, data source configuration and name constraints information in the described DBAPI encapsulated layer module in advance;
Described DBAPI encapsulated layer module is further used for, and searches the corresponding service configuration according to function name and value object, and generates dynamic SQL statements; Perhaps, getattr name from the value object that receives and/or query object according to attribute-name of predesignating in the name constraints and field name transformation rule, converts described attribute-name to corresponding field name, and further generates corresponding SQL statement.
16, database access device according to claim 13 is characterized in that, described DBAPI encapsulated layer module is further used for, and by object-relationship map described database manipulation result is mapped as common object.
17, database access device according to claim 13 is characterized in that, described DBAPI encapsulated layer is further used for, database of record access log and Operation Log and the control of authority of realization data level.
CNB2007100031230A 2007-01-31 2007-01-31 Method and device for accessing database Expired - Fee Related CN100456237C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100031230A CN100456237C (en) 2007-01-31 2007-01-31 Method and device for accessing database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100031230A CN100456237C (en) 2007-01-31 2007-01-31 Method and device for accessing database

Publications (2)

Publication Number Publication Date
CN101004683A true CN101004683A (en) 2007-07-25
CN100456237C CN100456237C (en) 2009-01-28

Family

ID=38703856

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100031230A Expired - Fee Related CN100456237C (en) 2007-01-31 2007-01-31 Method and device for accessing database

Country Status (1)

Country Link
CN (1) CN100456237C (en)

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141663B (en) * 2007-10-11 2010-06-09 中兴通讯股份有限公司 Method and system for improving intelligent network access database efficiency
CN102027486A (en) * 2008-05-13 2011-04-20 微软公司 Cell-based security representation for data access
CN102073742A (en) * 2011-01-31 2011-05-25 清华大学 Mass object storage system and running method thereof
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database
CN102346774A (en) * 2011-09-26 2012-02-08 深圳市信游天下网络科技有限公司 Database operation method and device
CN102682038A (en) * 2011-03-18 2012-09-19 阿里巴巴集团控股有限公司 Database change method and device
CN102831123A (en) * 2011-06-16 2012-12-19 航天信息股份有限公司 Method and system for querying authority control of data
CN102890712A (en) * 2012-09-07 2013-01-23 佳都新太科技股份有限公司 Method for converting data protocols of database query interface based on multi-stage protocol stack structure
CN102999610A (en) * 2012-11-22 2013-03-27 用友软件股份有限公司 Data access system and data access method
CN103020301A (en) * 2012-12-31 2013-04-03 中国科学院自动化研究所 Multidimensional data query and storage method and system
CN103116622A (en) * 2013-01-30 2013-05-22 深圳联友科技有限公司 Sequential value generating method and device for Ibatis scheme
CN103235835A (en) * 2013-05-22 2013-08-07 曙光信息产业(北京)有限公司 Inquiry implementation method for database cluster and device
CN103294966A (en) * 2013-03-12 2013-09-11 中国工商银行股份有限公司 Security access control method and system of database
CN103514185A (en) * 2012-06-20 2014-01-15 北京四维图新科技股份有限公司 Method and device for managing access to database files in multiple updated areas of navigation map
CN104239508A (en) * 2014-09-12 2014-12-24 中国工商银行股份有限公司 Data query method and data query device
CN104395845A (en) * 2012-06-22 2015-03-04 欧姆龙株式会社 Control device
CN104536963A (en) * 2014-11-13 2015-04-22 中国建设银行股份有限公司 A dispatching method and system during storing process
CN105468717A (en) * 2015-11-20 2016-04-06 北京百度网讯科技有限公司 Database operation method and device
CN105550261A (en) * 2015-12-09 2016-05-04 国云科技股份有限公司 IBATIS-based quick search method
CN105786932A (en) * 2014-12-26 2016-07-20 北大医疗信息技术有限公司 Query method and query apparatus for clinical business in medical system
CN106020847A (en) * 2016-06-06 2016-10-12 北京京东尚科信息技术有限公司 Method and device for configuring SQL for persistent layer development framework
CN106354605A (en) * 2016-09-05 2017-01-25 上海爱数信息技术股份有限公司 Database access method and system and server provided with system
CN107247811A (en) * 2017-07-21 2017-10-13 中国联合网络通信集团有限公司 SQL statement performance optimization method and device based on oracle database
CN107665216A (en) * 2016-07-29 2018-02-06 银联数据服务有限公司 A kind of data bank access method and middleware
CN107944288A (en) * 2016-10-12 2018-04-20 北京京东尚科信息技术有限公司 A kind of data access control method and device
CN108431766A (en) * 2015-12-02 2018-08-21 速度公司 Method and system for object-oriented/functional language to be mapped to database language
CN108984567A (en) * 2017-06-02 2018-12-11 华为技术有限公司 A kind of Service Data Management system and method
CN109542925A (en) * 2018-10-26 2019-03-29 广州朗尊软件科技有限公司 Data base access system, method, equipment and multi-user mall system
CN109885780A (en) * 2019-02-14 2019-06-14 珠海天燕科技有限公司 Data processing method and device
CN110597783A (en) * 2019-08-14 2019-12-20 平安普惠企业管理有限公司 Database management method, device, equipment and storage medium
CN111506303A (en) * 2019-01-30 2020-08-07 北大方正信息产业集团有限公司 Data interaction method and device
CN112860725A (en) * 2021-02-02 2021-05-28 浙江大华技术股份有限公司 SQL automatic generation method and device, storage medium and electronic equipment
WO2022048676A1 (en) * 2020-09-07 2022-03-10 华为云计算技术有限公司 Api generation method and apparatus
CN116955366A (en) * 2023-09-21 2023-10-27 宝略科技(浙江)有限公司 Data import processing method, system, device and storage medium
WO2024098858A1 (en) * 2022-11-08 2024-05-16 杭州趣链科技有限公司 Database access system and method, computer device, and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7644120B2 (en) * 2000-09-15 2010-01-05 Invensys Systems, Inc. Industrial process control data access server supporting multiple client data exchange protocols
CN100464329C (en) * 2005-06-14 2009-02-25 联想(北京)有限公司 Construction method for dynamic structured query language statement

Cited By (50)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101141663B (en) * 2007-10-11 2010-06-09 中兴通讯股份有限公司 Method and system for improving intelligent network access database efficiency
CN102027486A (en) * 2008-05-13 2011-04-20 微软公司 Cell-based security representation for data access
CN102193922A (en) * 2010-03-04 2011-09-21 杭州华三通信技术有限公司 Method and device for accessing database
CN102193922B (en) * 2010-03-04 2013-07-24 杭州华三通信技术有限公司 Method and device for accessing database
CN102073742A (en) * 2011-01-31 2011-05-25 清华大学 Mass object storage system and running method thereof
CN102682038A (en) * 2011-03-18 2012-09-19 阿里巴巴集团控股有限公司 Database change method and device
CN102831123A (en) * 2011-06-16 2012-12-19 航天信息股份有限公司 Method and system for querying authority control of data
CN102831123B (en) * 2011-06-16 2015-04-08 航天信息股份有限公司 Method and system for querying authority control of data
CN102346774B (en) * 2011-09-26 2013-09-18 深圳市信游天下网络科技有限公司 Database operation method
CN102346774A (en) * 2011-09-26 2012-02-08 深圳市信游天下网络科技有限公司 Database operation method and device
CN103514185B (en) * 2012-06-20 2017-09-29 北京四维图新科技股份有限公司 The database file access management method and device of the multiple update area of navigation map
CN103514185A (en) * 2012-06-20 2014-01-15 北京四维图新科技股份有限公司 Method and device for managing access to database files in multiple updated areas of navigation map
CN104395845A (en) * 2012-06-22 2015-03-04 欧姆龙株式会社 Control device
CN102890712A (en) * 2012-09-07 2013-01-23 佳都新太科技股份有限公司 Method for converting data protocols of database query interface based on multi-stage protocol stack structure
CN102999610A (en) * 2012-11-22 2013-03-27 用友软件股份有限公司 Data access system and data access method
CN103020301B (en) * 2012-12-31 2015-08-19 中国科学院自动化研究所 A kind of multidimensional data query and storage means and system
CN103020301A (en) * 2012-12-31 2013-04-03 中国科学院自动化研究所 Multidimensional data query and storage method and system
CN103116622A (en) * 2013-01-30 2013-05-22 深圳联友科技有限公司 Sequential value generating method and device for Ibatis scheme
CN103116622B (en) * 2013-01-30 2016-03-09 深圳联友科技有限公司 A kind of sequence value generation method for Ibatis scheme and device
CN103294966A (en) * 2013-03-12 2013-09-11 中国工商银行股份有限公司 Security access control method and system of database
CN103294966B (en) * 2013-03-12 2016-02-24 中国工商银行股份有限公司 A kind of safety access control method of database and system
CN103235835A (en) * 2013-05-22 2013-08-07 曙光信息产业(北京)有限公司 Inquiry implementation method for database cluster and device
CN103235835B (en) * 2013-05-22 2017-03-29 曙光信息产业(北京)有限公司 For the inquiry implementation method and device of data-base cluster
CN104239508B (en) * 2014-09-12 2017-05-10 中国工商银行股份有限公司 Data query method and data query device
CN104239508A (en) * 2014-09-12 2014-12-24 中国工商银行股份有限公司 Data query method and data query device
CN104536963A (en) * 2014-11-13 2015-04-22 中国建设银行股份有限公司 A dispatching method and system during storing process
CN104536963B (en) * 2014-11-13 2019-01-25 中国建设银行股份有限公司 A kind of dispatching method and system of storing process
CN105786932A (en) * 2014-12-26 2016-07-20 北大医疗信息技术有限公司 Query method and query apparatus for clinical business in medical system
CN105786932B (en) * 2014-12-26 2020-03-27 北大医疗信息技术有限公司 Query method and query device for clinical business in medical system
CN105468717A (en) * 2015-11-20 2016-04-06 北京百度网讯科技有限公司 Database operation method and device
CN108431766A (en) * 2015-12-02 2018-08-21 速度公司 Method and system for object-oriented/functional language to be mapped to database language
CN105550261A (en) * 2015-12-09 2016-05-04 国云科技股份有限公司 IBATIS-based quick search method
CN106020847A (en) * 2016-06-06 2016-10-12 北京京东尚科信息技术有限公司 Method and device for configuring SQL for persistent layer development framework
CN107665216A (en) * 2016-07-29 2018-02-06 银联数据服务有限公司 A kind of data bank access method and middleware
CN107665216B (en) * 2016-07-29 2021-04-27 银联数据服务有限公司 Database access method and middleware
CN106354605B (en) * 2016-09-05 2019-06-21 上海爱数信息技术股份有限公司 A kind of access method of database, system and the server with the system
CN106354605A (en) * 2016-09-05 2017-01-25 上海爱数信息技术股份有限公司 Database access method and system and server provided with system
CN107944288A (en) * 2016-10-12 2018-04-20 北京京东尚科信息技术有限公司 A kind of data access control method and device
CN108984567A (en) * 2017-06-02 2018-12-11 华为技术有限公司 A kind of Service Data Management system and method
CN107247811A (en) * 2017-07-21 2017-10-13 中国联合网络通信集团有限公司 SQL statement performance optimization method and device based on oracle database
CN109542925A (en) * 2018-10-26 2019-03-29 广州朗尊软件科技有限公司 Data base access system, method, equipment and multi-user mall system
CN111506303A (en) * 2019-01-30 2020-08-07 北大方正信息产业集团有限公司 Data interaction method and device
CN109885780A (en) * 2019-02-14 2019-06-14 珠海天燕科技有限公司 Data processing method and device
CN110597783A (en) * 2019-08-14 2019-12-20 平安普惠企业管理有限公司 Database management method, device, equipment and storage medium
CN110597783B (en) * 2019-08-14 2024-01-05 北京爱车无限网络科技有限公司 Database management method, device, equipment and storage medium
WO2022048676A1 (en) * 2020-09-07 2022-03-10 华为云计算技术有限公司 Api generation method and apparatus
CN112860725A (en) * 2021-02-02 2021-05-28 浙江大华技术股份有限公司 SQL automatic generation method and device, storage medium and electronic equipment
WO2024098858A1 (en) * 2022-11-08 2024-05-16 杭州趣链科技有限公司 Database access system and method, computer device, and storage medium
CN116955366A (en) * 2023-09-21 2023-10-27 宝略科技(浙江)有限公司 Data import processing method, system, device and storage medium
CN116955366B (en) * 2023-09-21 2023-12-22 宝略科技(浙江)有限公司 Data import processing method, system, device and storage medium

Also Published As

Publication number Publication date
CN100456237C (en) 2009-01-28

Similar Documents

Publication Publication Date Title
CN100456237C (en) Method and device for accessing database
US7599948B2 (en) Object relational mapping layer
US7908125B2 (en) Architecture for automating analytical view of business applications
US10515094B2 (en) System and method for analyzing and reporting extensible data from multiple sources in multiple formats
US8352478B2 (en) Master data framework
US6954748B2 (en) Remote data access and integration of distributed data sources through data schema and query abstraction
US7275024B2 (en) Automatic generation of a dimensional model for business analytics from an object model for online transaction processing
US7953734B2 (en) System and method for providing SPI extensions for content management system
US20140172827A1 (en) In-memory, columnar database multidimensional analytical view integration
US20070073663A1 (en) System and method for providing full-text searching of managed content
US9229971B2 (en) Matching data based on numeric difference
US20080091491A1 (en) Method and/or system for flexible data handling
KR20060045622A (en) Extraction, transformation and loading designer module of a computerized financial system
JP2007531157A (en) Adapter framework for integration of mission critical applications
US20040181502A1 (en) Generation of business intelligence entities from a dimensional model
US20070073674A1 (en) System and method for providing federated events for content management systems
US7099727B2 (en) Knowledge repository system for computing devices
US10614062B2 (en) Data model extension generation
US9594805B2 (en) System and method for aggregating and integrating structured content
US20060224556A1 (en) SQL interface for services
Zhao The database construction of intangible cultural heritage based on artificial intelligence
Farooq The data warehouse virtualization framework for operational business intelligence
CN114661270A (en) Low-code design system and development method based on front-end and back-end separation
CA2498541A1 (en) System and method for presentation of wireless application data using repetitive ui layouts
US11204908B2 (en) Augmentation playback

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090128

Termination date: 20160131

EXPY Termination of patent right or utility model