0107 three shelves of spring operation database

background Database development is one of the core contents of java, and the foundation is jdbc; However, using jdbc directly requires a lot of try catch finally template code; Using hibernate as orm framework is more convenient for management system, which follows jpa standard; In the Internet era, Mybatis is used because of its flexibility a ...

Posted on Tue, 07 Jan 2020 04:20:44 -0800 by Copernicus

Simple operation and maintenance of network equipment python plus powershell (2)

Improvement 1. The former code is more suitable for the situation of less switches. One switch writes one code. Now there are more than 70 switches. Import the information of the switch into the sql database, and then write it with a piece of code. (the database is really easy to use. It's very convenient to import and modify. ...

Posted on Mon, 06 Jan 2020 13:58:04 -0800 by SamLiu

MySQL stress test tool use

1, Mysqlslap: MySQL's own stress testing tool mysql slap is a benchmark tool of mysql. It can query data with simple syntax and is flexible and easy to use. It can simulate multiple clients sending query updates to the server at the same time. It provides performance test data and performance ratio of multiple engines. mysql slap provides intu ...

Posted on Mon, 06 Jan 2020 08:01:44 -0800 by mingo

Redis and Pytnon interact

Install mysql module sudo pip install redis Install using source code unzip redis-py-master.zip cd redis-py-master sudo python setup.py install Import module import redis Connect try: r=redis.StrictRedis(host='localhost',port=6379) except Exception,e: print e.message Method 1: according to different data ...

Posted on Mon, 06 Jan 2020 05:17:18 -0800 by dtasman7

The way of learning jdbc (3)

There are several problems 1) The existence of hard coding (username and password, url and classnameDriver) will be changed at any time 2) Just load the class file once, and load the file every time 3) The connection object needs to be created every time it queries, which is a waste of resources 4) Close resource code is lo ...

Posted on Sun, 05 Jan 2020 21:41:27 -0800 by badboy1245

Oracle EBS R12 consolidation ADF

Environmental Science: ADF version: 11.1.1.6.0 Oracle EBS version: R12.2.3 The purpose of the program is to obtain information about users when EBS logs in. The whole program architecture is as follows: ADF program surface:Step 01: create Java Class: ConnectionProvider, EBizUtil, EBSWrapperFilter, and ConnectionProvider.java ...

Posted on Sun, 05 Jan 2020 12:51:17 -0800 by Daniel.Conaghan1

Mysql Concurrency Ensures Data Consistency - Example

1. Background A problem occurred in a recent project and the update failed when a document was updated concurrently.For example: @Transactional(rollbackFor = Exception.class) public void update(Integer id){ //1. Query by id //2. Update the value of a field } The generated SQL would look like this: UPDATE table SET field = #{field,jdb ...

Posted on Sun, 05 Jan 2020 06:36:13 -0800 by riffy

Simplify CRUD with metadata

DataBaseMetaData object Connection.getDatabaseMetaData() getURL(): returns a String class object representing the URL of the database. getUserName(): returns the user name that connects to the current database management system. getDatabaseProductName(): returns the product name of the database. getDatabaseProductVersion(): ...

Posted on Sun, 05 Jan 2020 02:57:11 -0800 by Lauj

Three scheduling problems in Mysql programming practice

Three scheduling problems in Mysql programming practice 1. demand Use SQL statements to sort the data in the table. There are two sorting rules, one is global increasing order, the other is global increasing order with the same rank and order. 2. table data The table creation statement is as follows: CREATE TABLE `t` ( ...

Posted on Sat, 04 Jan 2020 23:05:59 -0800 by dan231

SQL Server2008 dynamic crosstab + string aggregation

Scenario Description: due to the work requirements, a dynamic cross table needs to be made, which is relatively simple. Baidu has many cases. I am referring to this article An example of dynamic crosstab Achieved. But there is a problem. This dynamic cross table uses the aggregate function sum()+group by to aggregate. The aggre ...

Posted on Sat, 04 Jan 2020 22:38:17 -0800 by brandtj