Database table optimization method and system for software system, electronic device and medium

By performing hierarchical analysis of the software system and configuring the functional attributes of database tables, the complex relationship between database tables is solved, and a clear database structure and a simplified maintenance process is achieved.

CN115203168BActive Publication Date: 2025-08-29天元大数据信用管理有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210721872.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2025-08-29
Estimated Expiration
2042-06-24

AI Technical Summary

Technical Problem

During the software development process, the complex associations and iterative maintenance between database tables are difficult to manage, resulting in too large differences in design and implementation and difficult to maintain.

Method used

By conducting hierarchical analysis of the software system, determine the main center body and its secondary and extended bodies, configure the corresponding database tables, and build management tables through clear functional attributes and association relationships to reduce the complexity between tables.

Benefits of technology

It realizes the clear structure and independence of database tables, simplifies the expansion and maintenance of databases, and improves the stability and maintainability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115203168B_ABST
    Figure CN115203168B_ABST
Patent Text Reader

Abstract

The present invention discloses a software system database table optimization method and system, as well as an electronic device and medium. These methods belong to the field of database technology and address the technical problem of reducing the complex management of database tables within a software system and enabling iterative maintenance of the database tables. The method includes the following steps: performing a hierarchical analysis of the software system's requirements, determining the system's primary central entity, and the secondary central entities and extended entities surrounding the primary central entity based on the software system's requirements; configuring corresponding database tables for the primary central entity, secondary central entities, and extended entities; and constructing the database tables as management tables, with the corresponding management tables recording the operations of the corresponding functions of each extended entity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular to a database table optimization method and system, an electronic device and a medium for a software system. Background Art

[0002] Over the past few decades, software systems have been used in a wide range of workplace environments. Numerous industries, including manufacturing, finance, information services, healthcare, and construction, use software systems in their daily operations.

[0003] For developers, software development often involves version iteration. However, during these iterations, modifications made during development are often not synchronized with the design documents. Upon completion, the finished software often differs significantly from the prototype design. This is particularly true for data tables. During the prototyping process, incomplete considerations often lead to constant modifications to the database during development, whether adding tables, data fields, or other modifications. Over time, the differences between the prototype tables and the database tables grow larger, leading to increasingly confusing relationships between database tables. This makes it difficult to clearly understand the relationships between database tables during later development and maintenance. To avoid this, it is necessary to minimize the complex relationships between tables.

[0004] For the database tables of the software system, how to reduce the complex management between the various database tables and realize iterative maintenance of the database tables are technical problems that need to be solved. Summary of the Invention

[0005] The technical task of the present invention is to address the above shortcomings and provide a database table optimization method and system, electronic device and medium for a software system to solve the technical problem of how to reduce the complex management between each database table and realize iterative maintenance of the database table for the software system.

[0006] In a first aspect, the present invention provides a method for optimizing a database table of a software system, comprising the following steps:

[0007] Conduct a hierarchical analysis of the software system's requirements, and determine the main central subject of the software system and the secondary central subjects and extended subjects surrounding the main central subject based on the software system's requirements. The extended subjects are directly associated with the central subject or are associated with the central subject through the secondary central subjects.

[0008] For the main center body, configure the corresponding database table as the main center table, and the main center table is used to record basic information related to the center body;

[0009] For the secondary center body, a corresponding database table is configured as a secondary center table, wherein the secondary center table is used to record basic information related to the secondary center body, and the secondary center table is associated with the main center table through at least one field;

[0010] For each extension center, a corresponding database table is configured as a corresponding extension table. The extension table is used to record basic information related to the extension subject. The extension table is associated with the main center table through at least one field, or a mapping relationship is established with the corresponding secondary center table through at least one field and an association relationship is established between the secondary center table and the main center table;

[0011] Based on the correlation between the various extension entities, a database table is constructed as a management table, and the operations of the corresponding functions of the various extension entities are recorded through the corresponding management table.

[0012] Preferably, the main center table, the secondary center table and the extended table all have clear functional attributes, and the database tables are named based on the functions or attributes of the main center table, the secondary center table and the extended table.

[0013] Preferably, there are no identical fields between unrelated extension tables, between an extension table and a secondary central table, and between a secondary central table and a central table.

[0014] In a second aspect, the present invention provides a database table optimization system for a software system, configured to configure a database for the software system using the database table optimization method for a software system as described in any one of the first aspects, the system comprising:

[0015] A design analysis module, the design analysis module is used to perform a hierarchical analysis of the requirements of the software system, and determine the main central subject of the software system and the secondary central subjects and extended subjects surrounding the main central subject based on the requirements of the software system, wherein the extended subjects are directly associated with the central subject or are associated with the central subject through the secondary central subjects;

[0016] A database table design module, for the main center body, the database table design module is used to configure the corresponding database table as the main center table, the main center table is used to record basic information related to the center body; for the secondary center body, the database table design module is used to configure the corresponding database table as the secondary center table, the secondary center table is used to record basic information related to the secondary center body, and the secondary center table establishes an association relationship with the main center table through at least one field; for each extension center, the database table design module is used to configure the corresponding database table as the corresponding extension table, the extension table is used to record basic information related to the extension body, and the extension table is associated with the main center table through at least one field, or establishes a mapping relationship with the corresponding secondary center table through at least one field and establishes an association relationship with the main center table through the secondary center table;

[0017] The database table design module is used to configure a corresponding database table based on the central body as a central table, the central table being used to record basic information related to the central body; and to configure a corresponding database table based on each extension center as a corresponding extension table, the extension table being used to record basic information related to the extension body, and to establish a mapping relationship between the extension table and the central table;

[0018] The management table design module is used to construct a database table as a management table based on the correlation between various extension entities. The operation of the corresponding function of each extension entity is recorded through the corresponding management table.

[0019] Preferably, the main center table, secondary center table and extended table all have clear functional attributes, and the database table design module is used to name the database tables based on the functions or attributes of the main center table, secondary center table and extended table.

[0020] Preferably, there are no identical fields between unrelated extension tables, between an extension table and a secondary central table, and between a secondary central table and a central table.

[0021] In a third aspect, an electronic device of the present invention includes: at least one memory and at least one processor;

[0022] The at least one memory is configured to store a machine-readable program;

[0023] The at least one processor is configured to call the machine-readable program and execute any one of the methods described in the first aspect.

[0024] In a fourth aspect, a medium of the present invention is a computer-readable medium, on which computer instructions are stored. When the computer instructions are executed by a processor, the processor executes any one of the methods described in the first aspect.

[0025] The database table optimization method and system, electronic device, and medium of the software system of the present invention have the following advantages:

[0026] 1. All database tables or contents are centered around a central point or an expanded secondary central point, which is very conducive to database expansion. As long as you know which branch to go under, you can directly carry out related expansion, which is conducive to database expansion;

[0027] 2. Database tables designed around the central point have clear functions or attributes, and can be clearly distinguished in their names or other operable places, which is conducive to database maintenance;

[0028] 3. Each database table is independent of each other. If an error occurs in one branch, it will only affect this branch and will not have any impact on others, which is conducive to the stability of the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0030] The present invention will be further described below with reference to the accompanying drawings.

[0031] Figure 1 This is a flowchart of the database table optimization method of the software system in Example 1;

[0032] Figure 2 This is the basic ER diagram of the specific example of the educational management system in the database table optimization method of the software system in Example 1;

[0033] Figure 3 This is a relationship diagram of the specific example of the educational management system in the database table optimization method of the software system in Example 1;

[0034] Figure 4 This is a database table relationship diagram of the educational management system, a specific example in the database table optimization method of the software system in Example 1. DETAILED DESCRIPTION

[0035] The present invention will be further described below with reference to the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it. However, the embodiments given are not intended to limit the present invention. Unless there is a conflict, the embodiments of the present invention and the technical features in the embodiments may be combined with each other.

[0036] Embodiments of the present invention provide a database table optimization method and system, an electronic device, and a medium for a software system, which are used to solve the technical problem of how to reduce the complex management between database tables and implement iterative maintenance of database tables for a software system. Example

[0037] The present invention provides a method for optimizing a database table of a software system, such as Figure 1 The following steps are shown:

[0038] S100. Perform a hierarchical analysis of the requirements of the software system, and determine the main central subject of the software system and secondary central subjects and extended subjects surrounding the main central subject based on the requirements of the software system, wherein the extended subjects are directly associated with the central subject or are associated with the central subject through the secondary central subjects;

[0039] S200: For the main center body, configure a corresponding database table as a main center table, wherein the main center table is used to record basic information related to the main center body;

[0040] For the secondary center body, a corresponding database table is configured as a secondary center table, wherein the secondary center table is used to record basic information related to the secondary center body, and the secondary center table is associated with the main center table through at least one field;

[0041] For each extension center, a corresponding database table is configured as a corresponding extension table. The extension table is used to record basic information related to the extension subject. The extension table is associated with the main center table through at least one field, or a mapping relationship is established with the corresponding secondary center table through at least one field and an association relationship is established between the secondary center table and the main center table;

[0042] S300: Based on the correlation between the extension entities, a database table is constructed as a management table, and the operation of the corresponding function of each extension entity is recorded through the corresponding management table.

[0043] The database optimization in this embodiment follows a database design method centered around one basic point and multiple expansion points, and is generally divided into database design, database use, and management table use.

[0044] Current database design is typically based on requirements, analyzed, and implemented in a top-down or bottom-up approach. All databases are designed around these requirements, without a clear central theme. However, a central design concept clarifies the purpose of the design and revolves around this central theme. Multiple extensions are independent chains of functions or attributes generated around this central theme.

[0045] In terms of database usage, in addition to the main center point, there are multiple secondary center points and expansion points. All of them revolve around the center point and converge at the center point, so the hierarchy should not be too deep. When using it, the various tables can be used jointly.

[0046] Based on the above-mentioned database design and database usage design principles, in this embodiment, a hierarchical analysis of the software system requirements is performed through step S100 to obtain a main central subject and multiple secondary central subjects and extended subjects surrounding the central subject, and a database table is configured for the main central subject to store basic information related to the central subject. At the same time, for each secondary central subject and extended subject, a corresponding database table is configured to store basic information related to the secondary central subject and the extended subject.

[0047] The above-mentioned main center table, secondary center table and extended table are all database tables designed around the main center point. They all have clear functions or attributes and can be clearly distinguished in their naming or other operable places, which is conducive to database maintenance.

[0048] In terms of the use of management tables, a common management table can be used in various branches, and the main operations in the functions can be directly implemented through the management table. Therefore, when configuring the management table, a common management table can be used in various branches, and many operations or maintenance in the functions can be directly implemented through the management table.

[0049] This method can be used to optimize the design of database tables based on the Java platform, taking the educational management system as a specific example. Figure 2 The figure shows the departments, teachers, students, and courses involved in the educational management system. For students, the relevant information includes their student ID, name, gender, and age. For teachers, the information includes their teacher ID, name, gender, and title, as well as the courses they teach. For departments, the information includes the department name and phone number, and each student and teacher belongs to a corresponding department. For courses, the information includes the course number and name, which students need to take and teachers need to teach.

[0050] For the above software system, students are the central subject, and departments, teachers and courses are the main bodies. Figure 3As shown, the information recorded in the database table corresponding to students involves student number, name, gender, age and department name, the information recorded in the database table corresponding to departments involves department name and telephone number, the information recorded in the database table corresponding to teachers involves name, gender, title and department name, the information recorded in the database table corresponding to courses involves course number and course name, the information recorded in the database table corresponding to electives involves student number, course number and grade, and the information recorded in the database table corresponding to lectures involves teacher number and course number. Students are associated with electives through student numbers, electives are associated with courses through course numbers, students are associated with departments through department names, departments and teachers are associated through department names, teachers are associated with lectures through teacher numbers, and lectures are associated with courses through course numbers.

[0051] By using the method of this embodiment, the database table corresponding to the above-mentioned educational system is optimized and designed, and the following is obtained: Figure 4 The database relationship diagram shown in the figure shows the student performance table as the primary table, the student basic information table and the department basic information table as extension tables, which are directly linked to the primary table. The teacher course management table is a secondary table, and the teacher's daybook information table and course schedule are extension tables, which are linked to the primary table, the student performance table, through the secondary table, the teacher course management table. The software system considers that students may change departments, so a department change table is configured as an extension table. This department change table records the type (student, teacher, or other), student or teacher ID, old department number, new department number, and change time. This department change table is linked to the department basic information table through the department number. Example

[0052] The present invention provides a database table optimization system for a software system, comprising a design analysis module, a database table design module, and a management table design module.

[0053] The design analysis module is used to perform hierarchical analysis on the requirements of the software system, and determine the main central subject of the software system and the secondary central subject and extended subject surrounding the main central subject based on the requirements of the software system. The extended subject is directly associated with the central subject or is associated with the central subject through the secondary central subject.

[0054] For the main center body, the database table design module is used to configure the corresponding database table as the main center table, and the main center table is used to record basic information related to the center body; for the secondary center body, the database table design module is used to configure the corresponding database table as the secondary center table, and the secondary center table is used to record basic information related to the secondary center body, and the secondary center table establishes an association relationship with the main center table through at least one field; for each extended center, the database table design module is used to configure the corresponding database table as the corresponding extended table, and the extended table is used to record basic information related to the extended body, and the extended table establishes an association with the main center table through at least one field, or establishes a mapping relationship with the corresponding secondary center table through at least one field and establishes an association relationship with the main center table through the secondary center table.

[0055] As a specific implementation, each database table has clear functional attributes, and the database table design module is used to name the database table based on the function or attribute.

[0056] The management table design module is used to construct a database table as a management table based on the correlation between various extension entities. The operations of the corresponding functions of each extension entity are recorded through the corresponding management table.

[0057] There are no identical fields between unrelated extension tables, between extension tables and secondary central tables, and between secondary central tables and central tables.

[0058] This system is centered around a database design method with one basic point and multiple extension points, and is generally divided into database design, database use, and management table use.

[0059] Current database design is typically based on requirements, analyzed, and implemented in a top-down or bottom-up approach. All databases are designed around these requirements, without a clear central theme. However, a central design concept clarifies the purpose of the design and revolves around this central theme. Multiple extensions are independent chains of functions or attributes generated around this central theme.

[0060] In terms of database usage, in addition to the central point, there are multiple expansion points, all of which revolve around the central point and converge at the central point, so the hierarchy should not be too deep. When using it, the various tables can be used jointly.

[0061] In terms of the use of management tables, a common management table can be used in various branches, and the main operations in the functions can be directly implemented through the management table. Therefore, when configuring the management table, a common management table can be used in various branches, and many operations or maintenance in the functions can be directly implemented through the management table.

[0062] Based on the above concept, the system can configure a database for the software system by executing the method disclosed in Example 1. Example

[0063] The present invention provides an electronic device comprising: at least one memory and at least one processor; the at least one memory is used to store a machine-readable program; the at least one processor is used to call the machine-readable program and execute the method disclosed in Example 1. Example

[0064] One medium of the present invention is a computer-readable medium having computer instructions stored thereon. When executed by a processor, the computer instructions cause the processor to perform the method disclosed in Example 1. Specifically, a system or device may be provided that includes a storage medium, on which software program code for implementing the functions of any of the above-described embodiments is stored, and in which a computer (or CPU or MPU) of the system or device is caused to read and execute the program code stored in the storage medium.

[0065] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.

[0066] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (e.g., CD-ROMs, CD-Rs, CD-RWs, DVD-ROMs, DVD-RAMs, DVD-RWs, and DVD+RWs), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code may be downloaded from a server computer via a communications network.

[0067] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.

[0068] In addition, it can be understood that the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or into the memory provided in the expansion unit connected to the computer, and then based on the instructions of the program code, the CPU installed on the expansion board or expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.

[0069] It should be noted that not all steps and modules in the above processes and system structure diagrams are required, and certain steps or modules can be omitted according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented by certain components in multiple independent devices.

[0070] The present invention has been shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the means in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the scope of protection of the present invention.

Claims

1. A method for optimizing a database table of a software system, characterized in that The steps include: Conduct a hierarchical analysis of the software system's requirements, and determine the main central subject of the software system and the secondary central subjects and extended subjects surrounding the main central subject based on the software system's requirements. The extended subjects are directly associated with the central subject or are associated with the central subject through the secondary central subjects. For the main center body, configure the corresponding database table as the main center table, and the main center table is used to record basic information related to the center body; For the secondary center body, a corresponding database table is configured as a secondary center table, wherein the secondary center table is used to record basic information related to the secondary center body, and the secondary center table is associated with the main center table through at least one field; For each extension center, a corresponding database table is configured as a corresponding extension table. The extension table is used to record basic information related to the extension subject. The extension table is associated with the main center table through at least one field, or a mapping relationship is established with the corresponding secondary center table through at least one field and an association relationship is established between the secondary center table and the main center table; Based on the correlation between the various extension entities, a database table is constructed as a management table, and the operations of the corresponding functions of the various extension entities are recorded through the corresponding management table.

2. The method for optimizing a database table of a software system according to claim 1, characterized in that The main center table, the secondary center table and the extended table all have clear functional attributes, and the database tables are named based on the functions or attributes of the main center table, the secondary center table and the extended table.

3. The method for optimizing a database table of a software system according to claim 1, characterized in that There are no identical fields between unrelated extension tables, between extension tables and secondary central tables, and between secondary central tables and central tables.

4. A database table optimization system for a software system, characterized in that A method for optimizing a database table for a software system according to any one of claims 1 to 3, wherein the system comprises: A design analysis module, which is used to perform a hierarchical analysis of the requirements of the software system and determine, based on the requirements of the software system, a main central subject of the software system and secondary central subjects and extended subjects surrounding the main central subject, wherein the extended subjects are directly associated with the central subject or are associated with the central subject through the secondary central subjects; A database table design module, for the main center body, the database table design module is used to configure the corresponding database table as the main center table, the main center table is used to record basic information related to the center body; for the secondary center body, the database table design module is used to configure the corresponding database table as the secondary center table, the secondary center table is used to record basic information related to the secondary center body, and the secondary center table establishes an association relationship with the main center table through at least one field; for each extension center, the database table design module is used to configure the corresponding database table as the corresponding extension table, the extension table is used to record basic information related to the extension body, and the extension table is associated with the main center table through at least one field, or establishes a mapping relationship with the corresponding secondary center table through at least one field and establishes an association relationship with the main center table through the secondary center table; The database table design module is used to configure a corresponding database table based on the central body as a central table, the central table being used to record basic information related to the central body; and to configure a corresponding database table based on each extension center as a corresponding extension table, the extension table being used to record basic information related to the extension body, and to establish a mapping relationship between the extension table and the central table; The management table design module is used to construct a database table as a management table based on the correlation between various extension entities. The operation of the corresponding function of each extension entity is recorded through the corresponding management table.

5. The database table optimization system of a software system according to claim 4, characterized in that The main center table, secondary center table and extended table all have clear functional attributes, and the database table design module is used to name the database tables based on the functions or attributes of the main center table, secondary center table and extended table.

6. The database table optimization system of a software system according to claim 4, characterized in that There are no identical fields between unrelated extension tables, between extension tables and secondary central tables, and between secondary central tables and central tables.

7. An electronic device, characterized in that: include: at least one memory and at least one processor; The at least one memory is configured to store a machine-readable program; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 3.

8. A medium, which is a computer-readable medium, characterized in that: The computer-readable medium stores computer instructions, which, when executed by a processor, enable the processor to perform the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Database field dynamic extension method and device, equipment and storage medium

    CN111984745A

  • Promoted properties in relational structured data

    US20170169090A1