Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Attribute tag based database access method

An access method and attribute label technology, which is applied in the direction of electrical digital data processing, special data processing applications, instruments, etc., can solve problems such as not being concise enough, and achieve the effects of improving development efficiency, improving execution efficiency, and saving IO and memory resources

Inactive Publication Date: 2015-12-16
CASCO SIGNAL
View PDF6 Cites 12 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

But the two methods are not concise enough. The object mapping method needs to map the relationship between the code entity class and the database table through the xml configuration file. When performing the persistence operation, it is necessary to find the corresponding relationship to determine the object to be operated in the database.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Attribute tag based database access method
  • Attribute tag based database access method
  • Attribute tag based database access method

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0026] Such as figure 1 This method mainly implements the mapping between business entity 1 and database 2 entities through custom attribute tags, and performs database 2 access operations through data persistence layer 3.

[0027] figure 2 The class name of the custom attribute label 4 in the database 2 is mapped to the table or view name, and the class attribute is mapped to the field name. Therefore, the custom attribute label 4 includes the label of the custom class and the label of the custom field. The label of the custom class Only the corresponding table or view name is included. The label of the custom field includes the field name and field type in the database. The field type should be consistent with the specific field type in the database.

[0028] image 3 It is a flowchart of the database access method of the present invention, and each step in the figure is described in detail below:

[0029] In step 301, a custom attribute label is created, including the label Tabl...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention relates to an attribute tag based database access method, comprising the following steps of: (1) creating user-defined attribute tags; (2) constructing all business classes and adding the user-defined attribute tags in one-to-one correspondence with database content separately; (3) constructing an ADO class of each business class and performing persistent operation; (4) obtaining a database table or a view name and a field name corresponding to the business class through a reflection mechanism; (5) according to the obtained information, creating an SQL statement of CRUD operation; and (6) according to the data information of the specific business class, constructing an SQL parameter object and calling an ADO execution function to realize access to a database. Compared to the prior art, the method has the characteristics that the corresponding user-defined attribute tags are added to the business classes, so that persistent storage of business data is realized and development efficiency is improved; and at the same time, an extra mapping file or mapping relation table is not required to maintain a mapping relation, thereby saving IO and memory resources and improving execution efficiency.

Description

Technical field [0001] The invention relates to a database access method, in particular to a database access method based on attribute tags. Background technique [0002] Database is a data management program used by many management programs today. Whether it is a BS or CS architecture application, it can be divided into two parts: data processing and data access. Database operation is the main part of data access. And how to efficiently and easily access the database in the application is what many developers are exploring. The two more commonly used methods are the object mapping method and the reflection API to obtain the relevant information of the business entity class, and then splicing the SQL statement the way. But the two methods are not concise enough. The object mapping method needs to map the relationship between the code entity class and the database table through the xml configuration file. When performing the persistence operation, it is necessary to find the corr...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
CPCG06F16/2433
Inventor 王许超田绪俊张怡袁松朱爱鹏刘俊
Owner CASCO SIGNAL
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products