Hibernate helper class (officially recommended)
Public class HibernateUtil {
Private static final SessionFactorySessionFactory=BuildSessionFactory();
Private static SessionFactory buildSessionFactory (){
Try {
// Create the SessionFactory from
1. What is bson?
BSON is a type of json Binary storage format, Binary JSON for short. It is the same as JSON and supports embedded document objects and array objects, however, BSON has some data types not available in JSON, such as Date and BinData.
I. in Oracle databases, we usually use the following methods to copy or migrate records between tables in different databases:
1. The records in Table A are exported to insert statements separated by semicolons and then inserted into Table B.
2.
Connect to MySQL:
Format: mysql-h host address-u user name-p User Password
1. Example 1: connect to MYSQL on the local machine
Find the installation directory of mysql. Generally, you can directly enter the mysql-uroot-p command and press enter
1. create two new log groupsAlter database add logfile group 4 ('d:/Oracle/ORADATA/ORADB/REDO04_1.LOG ') size 1024 k;Alter database add logfile group 5 ('d:/ORACLE/ORADATA/ORADB/REDO05_1.LOG ') size 1024 k; 2. Switch the current log to a new log
1. there is a data export tool under the bin directory of the mongodb installation directory: Export export.exe. We can open a command window, switch to this directory, and execute export, you can see many parameter descriptions for using this tool.
Sometimes the sameDBIDThere is a problem, for example: logic on the same machineDG.
The modification method is as follows:
Close Database
SHUTDOWN IMMEDIATE
Start the databaseMountStatus
STARTUP MOUNT
UseNidCommand, as shown
1. The following two types can be used in Oracle:
01:Create table newtable as select * from oldtable; // this parameter is used when no new table is created before replication.02:Insert into newtable select * from oldtable; // when a new table
I. Pre-compiled SQL statement Processing
Precompilation interface PreparedStatement is an interface in java. SQL, which is a self-interface of Statement. Statement sends the complete SQL Statement to the database after being compiled. The
UTL_FILE.FOPEN in the UTL_FILE package provided by Oracle is responsible for opening a file.UTL_FILE.FOPEN (location in varchar2, filename in varchar2, open_mode in varchar2) return FILE_TYPE;Location is the path parameter,FILENAME is the file
When we used to display the database query results on the page, we always had to judge the null field. If it was null, it would display "". Suddenly we found this method stupid, in addition, "null" appears on the page ".
When using the Oracle
First, only the InnoDB Engine allows the use of foreign keys in MySQL versions available in the product environment (4.0.x and 4.1.x). Therefore, our data tables must use the InnoDB engine.
Next, we will first create the following database tables
1. DESCRIBE command
The usage is as follows:
SQL> describe nchar_tst (nchar_tst indicates the table name)
The result is as follows:
Is the name empty? Type-----------------------------------------------------------------------------Name nchar
What is a function?
Generally speaking, as long as it can receive input, process input and generate output, it can be called a function.
For example, a cow is a function, and it eats grass (input) and milk (output)
A function is a program design
1. access the Internet through Linux:
After Red Hat 9 is installed on the Virtual Machine VMware, the network connection problem occurs.
Determining IP information for eth0. .. failed; no link present. Check cable?
This problem has been fixed for
The concept of schema in PostgreSQL is to divide the scope in the database, that is, tables with the same name can exist in different modes. It can be simply understood as a file system.
The common default mode is public.
SHOW search_path; shows
During Oracle 11g installation, the following two problems are frequently encountered:
Oracle 11gORA-00845: MEMORY_TARGET not supported on this system description
[INS-35172] Target database memory (XXMB) exceeds the systems available shared memory (
Lock scheduling of MyISAM
The read and write locks of the MyISAM storage engine are mutually exclusive, and read/write operations are sequential. So, one process requests the read lock of a MyISAM table, and the other process also requests the write
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service