Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What should be paid attention to in Hibernate project

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what should be paid attention to in the Hibernate project". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what to pay attention to in the Hibernate project".

1. Make friends with the database administrator

There is a trend that some Java developers ignore the importance of database administrators. This makes a big mistake, and it is essential to maintain a good working relationship with database administrators in order to achieve the success of any ORM (object Relational Mapping) technology. There are two reasons:

Individual database administrators cannot make Hibernate projects successful, but they can usually make them fail.

The database administrator has a good insight into the database itself and has good professional habits to tell you some mistakes and operational suggestions. I can remember many examples where the advice of a database administrator saves us a lot of time and provides us with a good solution.

In most cases, having good database administrators and maintaining a good relationship with them is critical to your ORM (object-relational mapping) work.

two。 Use a good naming standard (* mandatory) from the very beginning

We know that the discussion of naming standards will be controversial, but we must make it clear that our naming should make our data model meaningful, which makes it easy for developers to use so that they don't get confused. Therefore, how to name entities and attributes is very important. I have naming standards that I like and think they are *, but I don't want to impose them on you here. The most important thing is that you decide what naming standard to use and let everyone use it. In fact, not only naming standards need to be unified, but others are also needed (for example, Boolean types are denoted by "Yhand N" or "0 hand 1").

3. Don't try to map all the attributes

We always try to use tools such as Dali to map everything and form a table (some tables have hundreds of columns! ). This will be troublesome in the end. Why? Because we use a common, previous database, there are a lot of fields that we don't care about and never use. Mapping them can only cause performance problems and confusion.

Thank you for your reading, the above is the content of "what should be paid attention to in the Hibernate project". After the study of this article, I believe you have a deeper understanding of what the Hibernate project should pay attention to, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report