Q: How to modify the table structure to existingProgramMinimum impact
1. Table design is to reserve a field without any business significance, such as userfiled1, userfield2,... to facilitate future ing with specific business fields.
2. Design a special field to store the XML file, and store the custom structure in the XML file to facilitate system expansion. Access is the XML string to be parsed
3. Map the physical table structure like hibernate to the logical structure of the object. Modification occurs in the structure of the physical table and hibernate mapping.
4. In the Java class, table names and field names are defined with immutable strings. For example
Public const string customers_table = "customers ";
Public const string email_field = "email ";
Public const string name_field = "name"; in this way, the modification only happens in a few places. Q: How to improve performance 1. For special business requirements, such as reconciliation and settlement of the payment platform, create a shadow table (such as paymentshadow) and redundant fields in other related tables. This method reduces associated queries and improves efficiency. 2. There is no foreign key or even primary key. This method is a bit like no SQL, but it has been encountered in commercial application systems.