As the question. The team size is 10 members. The programming environment is PHP + Python. I personally think that when you are familiar with SQL and master some SQL skills, using SQL statements in a unified manner can be more intuitive in future performance tuning. I don't know what a high opinion you have on people. In addition,
. You can choose an ORM (not necessarily hibernate). In the database design, you can avoid large tables, more table associations, and perform operations in an object-oriented manner through the Orm. When the user volume and access volume are high, in addition to the Optimization on the Database End, you also have the object cache path. How does object cache impro
Recently in the research of ORM, what kind of framework is what we wantThe significance of the development framework is
Develop more standard, more unified, not because different people write code is not the same
More
In the previous article we introduced more or less about
Pythonof knowledge, and to be in combat, we will use
Python Development page, in fact, with
Framework Development Page, is the simplest and the most relaxed. In this chapter, we will introduce
Python page DevelopmentIn the use of
ORM Framework
Development page.
What i
I. No ORM
Process-oriented programming was the mainstream, and object-oriented programming has become the mainstream. Process-oriented and relational databases are naturally compatible, or relational databases are originally prepared for process-oriented programming.
Fig 1.1
Figure 1.1 shows the relationship between process-oriented programming and data. In fact, the relationship between object-oriented programming and data
complain about is that loading with excessive latency and loading with select n + 1, these features cause the ORM to delay loading all the data in a complex model, rather than reading data on demand. The problem is that it may lead to many database calls, for example, when one attribute is read at a time or a loop
I also came to join me when I was talking about ORM recently in the garden. I have used ORM tools such as SPL, nbear, and subsonic. SPL is very nice when I use it for the first time. When I add records, I no longer need to write them to database fields one by one. Writing database access is also very easy. You don't ne
Welcome to Excelbatis!github Address: Advantages of Https://github.com/log4leo/ExcelbatisExcelbatis
Natural combination with spring for easy access
XSD support, which makes the configuration more concise and does not need to be configured according to the bean verbose syntax
Follow the "convention greater than configuration" principle and automatically infer the field type (the functionality provided by the ORM Framework) if not confi
Tags: Easy to configure simplifies programming bean error by using relational databaseORM is an object and relational database mapping, which is to map JavaBean objects and database tables in Java, so that the records in the database tables correspond to the JavaBean object one by one, which greatly simplifies the inconvenience of manually spelling SQL when using JDBC directly.ORM through the configuration
method in the parent class must be executed before executing our defined method, so we can do something about it. Think of the "adorner" and see the Code:classHome (View):defDispatch (self,request,*args,**kwargs):Print('befor') Result= Super (home,self). Dispatch (request,*args,**Kwargs)Print(' after') returnresult#here is the use of class mapping to operate, you can look at the parent view there is
Hibernate batch processing:
Hibernate batch processing actually from the performance considerations, it is very undesirable, wasting a lot of memory. From its mechanism, hibernate first detects the qualifying data, puts it in memory, and then operates. Actual use down performance
long, look at the basic definition first.) The project is on GitHub and there are links underneath. )Internal implementation of what I do not say, interested students go to GitHub to see the sixants.xmlfile Project, the comments should be very detailed (for crooked nuts I also wrote an English note ...) )。
go to the chase, how to fly: 1. Creating an XML file Results 2. Read the XML file Resul
and development.Ibatis IntroductionCompared with "one-stop" ORM solutions such as Hibernate and Apache OJB, ibatis is a "semi-automated" ORM implementation. The so-called "semi-automated" may be a little cool to understand. Throughout the mainstream ORM, both
();//Commit a transaction8. Close session9. Close SesstionfactoryWhy hibernate:1. The code for JDBC access to the database is encapsulated, which greatly simplifies the tedious repetitive code of the data access layer.2. Hibernate is a JDBC-based, mainstream persistence framework that
Generally, during project development, tables are created first and then generated using hibernate reverse engineering *. HBM. XML files and pojo classes, I personally think that because the databases currently used are relational databases, and hibernate, as an Orm, objectify database operations, we should proceed from an object, generate related tables in the d
session or session was closedThis exception solution please check my blog (http://hi.baidu.com/kekemao1) hibernate exception in the "failed to lazily initialize a collection of role exception"?Solution: add the following content to Web. xml:Org. springframework. Orm. hibernate3.support. opensessioninviewfilterYou can;See:Hibernate and delayed loading:Hibernate object relationship ing provides delayed and n
This is an exception encountered when a transaction is committed.
An assertion failure occured (this may indicate a bug in hibernate, but is more likely due to unsafe use of the session)
Net. SF. hibernate. assertionfailure: Possible nonthreadsafe ACCESS TO SESSION
Note: Non
maintains the data in the level two cache to ensure consistency between the data in the cache and the real data in the database! Whenever you invoke the Save (), update (), or Saveorupdate () method to pass an object, or use the load (), get (), list (), iterate (), or scroll () method to obtain an object, the The object will be added to the internal cache of the session. When the flush () method is subsequently called, the state of the object
When Mysql database hibernate saves data, the Mysql primary key must be set to auto-increment; otherwise, an error is returned! (Field Hibernate
The reason for the bitsCN.com problem is very simple. sometimes it may be hard to remember. MARK.
The error message is as follow
Hibernate cache and what operations will read and hold data to the cache
Hibernate Cache
Hibernate has a level two cache, one level cache and one level two cache, respectively. The first-level cache is also called session-level caching, which
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.