In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Summarize some experiences:
The first point: unification.
In the recent projects, the common modules (unit table, personnel information table, etc.) all use the proxy primary key, while the integrated data model uses the logical primary key. In order to maximize the use of written stored procedures, functions and other objects, the data of the common module must be mapped into the integrated module according to certain rules, which increases the workload and difficulty of database maintenance. The persistence layer used by java programs is hibernate, which should also be taken into account when designing javabean. Java programmers have to build 2 javabean when dealing with unit information, and it is very time-consuming to convert them manually in java programs.
In view of this phenomenon, whether using a proxy primary key or a logical primary key, the design of the data model must be unified. Chaotic primary key strategies can cause confusion for database developers and application developers.
The second point: deal with changes to the data model-the proxy primary key.
From the practical application, any entity attribute is possible to change. For example: the customer information table uses 8-digit customer number as the primary key, but the user business expansion, 8 for coding is no longer enough, it is necessary to adjust the primary key. Imagine that if you are using a proxy primary key, then business adjustments do not need to adjust the primary key.
From this perspective, the proxy primary key is superior to the logical primary key.
The third point: habit.
In the actual process of writing SQL statements, I still like the logical primary key, because it can help me filter the data as soon as possible.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.