Recently, some friends talked about system performance analysis. The best way to analyze why a Java-based system is slow is to use profiler.
The principle of profiler is to use some drivers and JVM bindings to read the JVM runtime and get the time from loading the class to the execution to the end of the entire process, so as to know the methods of those function
Label:The purpose of this blog: ① summary of their own learning process, equivalent to study notes ② to share their own experience to everyone, learn from each other, communication, not commercial content inevitably appear problems, welcome to correct, exchange, discussion, you can leave a message, can also be contacted by the following ways. I Internet technology enthusiasts, Internet technology enthusiasts Weibo: Ivan is in 0221 qq:951226918 ---------------------------------------------------
Java framework --- hibernate primary key generation policy, java --- hibernate
Hibernate Primary Key Generation Policy
1. Automatic growth of identity
Applicable to MySQL, DB2, and ms SQL Server. It uses the primary key generated by the database to generate unique identifier
Java interview-Hibernate summary, java interview-hibernate
1. Hibernate Retrieval Method
Ø navigation object graph retrieval (navigation to other objects based on the loaded objects .)
OID retrieval (the object is retrieved Based on the OID of the object .)
Ø HQL search (us
Three major Java frameworks-Hibernate and java three major hibernate
What is Hibernate?
Hibernate is a persistent layer framework based on ORM (O: object, R: relationship, M: ing) ing. It is a lightweight framework that encapsul
Java framework --- hibernate connection pool, java --- hibernate
Hibernate supports third-party connection pools. the officially recommended connection pools are C3P0, Proxool, and DBCP. Note the following three points when configuring the connection pool:1. Apche's DBCP is
JAVA beginners [20]-simple example of Hibernate, java-hibernate1. Introduction to Hibernate
In many scenarios, you do not need to use JdbcTemplate to directly operate SQL statements. At this time, you can use the ORM tool to save a lot of code and development time. The ORM tool can shift the focus from error-prone SQL
Java framework --- hibernate (one-to-one) ing, java --- hibernate
Object/Relation Mapping (ORM) is generated with the development of object-oriented software development methods, it is a technology that aims to solve the mismatch between objects and relational databases. In essence, it is to convert data from one form
Java framework --- hibernate (many-to-many) ing, java --- hibernate
Take students and teachers as examples to illustrate multi-to-Multi- ing.
Entity class:
Student
package cn.itcast.g_hbm_manyToMany;import java.util.HashSet;import java.util.Set;public class Student { private Long id; private String name; priva
is not the same (see the database part of the knowledge), so there will be code porting difficult factors.
the mismatch between two dimensional relational table and object remainders data structure
The data we take out of the database is the result set (a table), and we need to encapsulate the query's result set as
object, however, the data structure of the two-dimensional table in the database and the structure of the Java object in memory are not
Database operations are an indispensable part of today's traditional application software. Almost all application systems and interactive software used are inseparable from the support of databases. Therefore, database operations are also an essential task, in the world of Java, the traditional database access is JDBC database access. At the beginning of learning, we should be able to meet our needs. However, in actual application, it is complicated t
table. This configuration file is generally named: Class name. Hbm.xml, let's look at the class name by a specific code example. Hbm.xml Structure:
Let's take a look at the following tags:
1.hibernate-mappingThis element includes some optional attributes. Schema and Catalog properties that indicate the schema and/or catalog name of the table where the map is connected (refer). If this property is specified, the table name is extended to the full
This article has a lot of slots, in the hibernate4.x above with hibernate3.x writing to write. And there will be a lot of warnings in the program to eclipse, but that's a certain level of getting started with hibernate. After all, many of the books that introduce hibernate now are written in the hibernate3.x notation. The last time that "hibernate" is the simples
Catalog:(Follow-up update ...) )
Getting Started with Hibernate 01-Framework technology (Introduction to the development of the Hibernate framework)
Hibernate Introductory 02-hibernate Introduction and its environment construction
Getting Started with Hibernate
Java framework --- hibernate (one-to-many) ing, java --- hibernate
One-to-multiple relationships can be classified into one-way and two-way relationships.One-to-multiple relationship
One way is to find the other party only from one side, usually from the master class to find the class (table) with the foreign key ). Fo
I. hibernate-Java-SQL type ing table
Image version (easy to view ):
Table Version (easy to copy and paste ):
Basic hibernate type
Java type
Standard SQL Field Type
Size/Description
Big_decimal
Java. Math. bigdecimal
Numeric
Basic knowledge:
In Java, the types that represent time and date include: java. util. date and java. util. calendar. in addition, three java extensions are provided in the jdbc api. util. subclass of the Date class: java. SQL. date, java
hibernate.jdbc.batch_size: Sets the batch size for bulk delete , batch update and BULK INSERT, similar to the meaning of setting buffer size. The larger the batchsize, the lower the number of times a batch operation sends SQL to the database, the faster it becomes.
2 test result is that when batch size=0, using hibernate to delete 10,000 records for Oracle database takes 25 seconds, Batch Size = 50, delete only need 5 seconds! Oracle Database batchs
classes can also override the Equals (object O) method of the object class to achieve comparison by object values. For example, in the Customer class, add the following equals (Object O) method so that it compares the two customer objects for equality by the client's name:public Boolean equals (Object o) {if (this = = O) return true ; if (!o instanceof Customer) return false ; final Customer other = (customer) O; if (this . GetName (). Equals (Other.getname ()))
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.