(OLTP. IBM has long-term plans for both INFORMIX and DB2. The two database products draw on each other's technical advantages. The latest version is Informix 11.7, which will continue to provide strength to IBM Informix over the next decade. Its engine effectively addresses OLTP, this makes it possible to better support the decision-making support applications of enterprises and partners of all sizes.
2. Brief Introduction to Linux/Unix shell
Linux/Unix shell is also called the command line int
A very light PHP database toolkit, born in two days (enough to prove very light).Two classes, one Connection management PDO connection (multi-database support), one quickquery for fast database operation (no back-and-forth between PDO and Pdostatement)You can read it online without downloading it.
Use persistence\dbaccess;
Add connection information where the framework is initialized
Client| Data | When the database uses ado.net, each database operation must set connection properties, establish connection, use command, transaction processing, etc., more cumbersome, there are a lot of duplication of work. Can you put these tedious, commonly used operations again encapsulation, in order to more convenient and safe to use. The following class is an attempt:
Using System;
Using System.Data.SqlClient;
Using System.Text;
Using System.Data;
Using System.Collections;
Using System.Co
client| Access | data | Database using Ado.net, each database operation to set the connection attribute, establish connection, use command, transaction processing, etc., more cumbersome, there are a lot of duplication of work. Can you put these tedious, commonly used operations again encapsulation, in order to more convenient and safe to use. The following class is an attempt:
Using System;
Using System.Data.SqlClient;
Using System.Text;
Using System.Data;
Using System.Collections;
Using System
PHP database Toolkit
A very lightweight PHP database toolkit was born for two days (enough to prove very lightweight ).Two classes: one Connection to manage the PDO Connection (supporting multiple databases) and one QuickQuery to quickly perform database operations (no need to go back and forth between PDO and PDOStatement)You don't need to download it. you can view it online.
Use Persistence \ DbAccess;
// Add the connec
.*;Import java.lang.*;
/** * @author Li Chunlei * * TODO To change the template for this generated type annotation, go to the * Database Access class */ public class DbAccess { String strdbdriver = constants.dbdriver; String strdburl = Constants.dburl; String username = constants.username; String password = constants.password; private Connection conn = null; private Statement stmt = null; ResultSet Rs=null; //Register database driver pu
Oraclefactory ();
Ifactory Factory2 = new Sqlserverfactory ();
Idepartment Department = factory.createdepartment ();
Idepartment Department2 = Factory2.createdepartment ();
Department.insertdept (dept);
Department.finddeptbyid (1);
Department2.insertdept (dept);
Department2.finddeptbyid (2); }
first modification (based on simple Factory mode)
According to the abstract factory pattern structure diagram and requirements, modify the c
students, can Baidu yo );
Attachment: mysql-connector-java-5.1.6-bin.jar, Baidu cloud download link: http://pan.baidu.com/s/1i5psdDF password: meyg
(3) create the following JavaBean file and JSP file in the Demo_JSP Project (PS: the JSP file code here is only part of the code, for other JSP file code, please refer to my previous blog Oh (link address: http://www.cnblogs.com/liuzhen1995/p/5700409.html )):
1) create a Java class DBAccess with the packa
encapsulation of a function can be very good at reducing coupling, so if you write a generic class to perform the function of accessing the database and getting the data, the code will be more flexible and intuitive. So we need to create a class to interact with the database, provide an initialization database, close the database, and get the data and return it as a collection of product model objects. To use SQLite in iOS, you first need to add the SQLite module to the project. Add methods suc
2000. Here is a stored procedure to solve this annoying problem:Create PROCEDURE dbo. p_am_procInfo(@ ProcName t_str64 -- Name of the stored procedure)ASBeginSet nocount on
If @ procName = ''beginSelect name as procNameFrom sysobjectsWhere substring (sysobjects. name, 1, 5) = 'P _ am _'EndElse beginSelectSyscolumns. name as paramNameFrom sysobjects, syscolumnsWhere sysobjects. id = syscolumns. idAnd sysobjects. name = @ procNameOrder by colidEndEnd
This stored procedure has two functions. When
The development of multi-database connection classes in the factory mode is the best application method in the factory mode, and is also involved by many programmers who use the design mode at the beginning. The following is the specific code:
A. Create a class library with the following classes:
1. design an abstract class
Using system;
Using system. Collections. Generic;
Using system. text;
Using system. Data;
Using system. configuration;
// Connect to the database in factory ModeNamespace
: corresponding to the table in the database, and then is to create and database workers of the same name as the field of the property, so it is not prone to errors. Conversion is not so troublesome. (Attributes 3, create a connection to the database of the underlying class, and create the data, modify the data, and so on, here need to call the database SQLite interface method. Disclaimer: The following code refers to someone else's: Code: Run the result diagram: The following is the main code
use crontab to work on the schedule, crontab is to manipulate each user's daemon and the execution schedule.
crontab文件的格式:M H D m d cmd。 M: 分钟(0-59)。 H:小时(0-23)。 D:天(1-31)。 m: 月(1-12)。 d: 一星期内的天(0~6,0为星期天)。
CMD to run the program, the program was sent to SH execution, this shell only user,home,shell these three environment variables.
The root user edits the crontab file using the CRONTAB-E command, in this case the contents of the file are as follows:
#backup zhdata start; 24 15 * * * su -l
procedure DBO. p_am_procinfo(@ Procname t_str64 -- Name of the stored procedure)AsBeginSet nocount on
If @ procname = ''beginSelect name as procnameFrom sysobjectsWhere substring (sysobjects. Name, 1, 5) = 'P _ am _'EndElse beginSelectSyscolumns. Name as paramnameFrom sysobjects, syscolumnsWhere sysobjects. ID = syscolumns. IDAnd sysobjects. Name = @ procnameOrder by colidEndEnd
This stored procedure has two functions. When the name of a stored procedure is not passed, the stored procedure r
1. Building Java Classespublic class Studentmanage {int pageSize = 3;//number of records per pageGet Total Recordsprivate int Gettotalnum (String strwhere) throws SQLException {DbAccess DbAccess = new DbAccess ();int total = 0;String sql = "SELECT COUNT (*) from student where 1=1 and" + strwhere;Dbaccess.excutequery (SQL);ResultSet rs = Dbaccess.getrs ();if (Rs.n
class used by the Web app, which provides a database connection, two methods for testing the connection properties, and related properties. When the web app starts, the class will be instantiated, and we'll call this instance a resource instance.
Package Com.myapp.db;import Java.sql.connection;import Java.sql.sqlexception;public class DBAccess { private String driver; Private String username; private String password; Private String Dburl;
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.