Method and device for accessing database

A database and data technology, applied in the field of accessing databases, can solve problems such as difficulty in achieving interface consistency, hidden dangers in database upgrades and replacements, difficulty in unifying code norms, etc., to facilitate expansion and maintenance, reduce memory overhead, and ensure specifications sexual effect

Active Publication Date: 2015-12-30
BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF5 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Here, the current common practice still has the problem that the code standardization is not easy to unify
Specifically, although th...

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
  • Method and device for accessing database
  • Method and device for accessing database
  • Method and device for accessing database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0033]Exemplary implementations of the present invention are described below in conjunction with the accompanying drawings, which include various details of the implementations of the present invention to facilitate understanding, and they should be regarded as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.

[0034] In the embodiment of the present invention, PO and VO are encapsulated in the form of Map to improve system performance. Hibernate is a table that maps entity classes to data. In the embodiment of the present invention, a parent class BaseObject is defined. Objects that inherit this class must correspond to tables in the database. Conversely, each table in th...

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 provides a method and a device for accessing a database. According to the method and the device, the system performance and the development efficiency are beneficially improved, and besides, the standardization problem of interfaces is beneficially solved. The method comprises the following steps: receiving a class object and a value mapping table of a public interface class of a persistent layer, wherein the class object is obtained by abstracting the persistent layer as the public interface class; acquiring a value object according to the class object, and carrying out father entity filling on the value object according to the value mapping table and the class object; converting the filled value object into a persistent object; and storing data in the persistent object into the database.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and device for accessing a database. Background technique [0002] JDBC (JavaDataBaseConnectivity, java database connection) is a Java API for executing SQL statements, which can provide unified access to various relational databases. It consists of a set of classes and interfaces written in the Java language. JDBC provides a baseline from which higher-level tools and interfaces can be built to enable database developers to write database applications. At present, very few J2EE applications will directly access the database in the form of JDBC. After all, using an object-oriented programming language to access a relational database requires a lot of work in the development process. Most of the time, J2EE applications use the ORM framework for data access. The ORM (ObjectRelationalMapping) framework uses metadata to describe the details of object-relational mapping. M...

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 BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products