Database establishment method and device, equipment, storage medium and program product
By establishing a database containing administrator information, target object information, assessment agency information, assessment result information, and certificate information in financial institutions such as banks, and utilizing MySQL table creation and association commands, the problem of low information filtering efficiency was solved, and intelligent information management and efficient querying were achieved.
Patent Information
- Application Number
- CN202511098263.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-11-21
AI Technical Summary
When processing business, banks and other financial institutions need to manage multiple types of related information. Existing technologies rely too heavily on human labor and have a low level of intelligence, resulting in low efficiency in information filtering.
Establish a database that includes administrator information, target object information, assessment agency information, assessment result information, and certificate information. Based on the relational database MySQL, create corresponding tables and establish relationships between tables through table creation and association commands to achieve structured storage and associated management of information.
By automatically constructing information association networks, the intelligence level of data querying is improved, the need for manual screening is reduced, and the efficiency of information acquisition is increased.
Smart Images

Figure CN120994639A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and in particular to a method for creating a database, an electronic device, a storage medium, and a program product. Background Technology
[0002] As banks handle more business, the amount of related data is also increasing. Therefore, efficient data management is of great importance.
[0003] When banks and other financial institutions process target business, they typically need to acquire and manage multiple types of related information, including administrator information, target object information, appraisal agency information, appraisal result information, and certificate information. When an administrator wants to find other information related to a certain piece of information, they need to manually filter and search through numerous pieces of information to ultimately determine the relevant information.
[0004] However, the above methods rely too heavily on human labor and have a low level of intelligence. Summary of the Invention
[0005] This application provides a method, apparatus, device, storage medium, and product for establishing a database, in order to solve the technical problems of excessive reliance on human labor and low level of intelligence in related technologies.
[0006] Firstly, this application provides a method for establishing a database, comprising:
[0007] Obtain administrator information, target object information, evaluation agency information, evaluation result information, and the certificate information of the target object;
[0008] Based on the table creation commands in the relational database management system MySQL, an administrator information table, a target object information table, an evaluation agency information table, an evaluation result information table, and a target object's certificate information table are created according to the administrator information, the target object information, the evaluation agency information, the evaluation result information, and the target object's certificate information.
[0009] Based on the association commands in MySQL, establish the association relationships between the evaluation result information table, the certificate information table, and the target object information table; establish the association relationship between the administrator information table and the evaluation agency information table; and establish the association relationship between the administrator information table and the target object information table to obtain the database.
[0010] Secondly, this application provides a database creation apparatus, comprising:
[0011] The acquisition module is used to acquire administrator information, target object information, assessment agency information, assessment result information, and the certificate information of the target object;
[0012] A creation module is used to create an administrator information table, a target object information table, an assessment agency information table, an assessment result information table, and a target object's certificate information table based on the table creation instructions in the relational database management system MySQL, according to the administrator information, the target object information, the assessment agency information, the assessment result information, and the target object's certificate information.
[0013] The processing module is used to establish the association relationship between the evaluation result information table, the certificate information table and the target object information table based on the association command in MySQL, establish the association relationship between the administrator information table and the evaluation agency information table, and establish the association relationship between the administrator information table and the target object information table, so as to obtain the database.
[0014] Thirdly, this application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0015] The memory stores computer-executed instructions;
[0016] The processor executes computer execution instructions stored in the memory to implement the method as described in the first aspect.
[0017] Fourthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the first aspect.
[0018] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect.
[0019] The database creation method provided in this application obtains administrator information, target object information, appraisal agency information, appraisal result information, and target object certificate information. Based on table creation commands in the relational database management system MySQL, it creates corresponding tables for administrator information, target object information, appraisal agency information, appraisal result information, and target object certificate information. Then, based on MySQL join commands, it establishes join relationships between the appraisal result information table, the certificate information table, and the target object information table; between the administrator information table and the appraisal agency information table; and between the administrator information table and the target object information table, thus obtaining the database. This method eliminates the need for users to manually filter related data from massive amounts of information. It automatically constructs an information association network through the relationships between database tables. When it is necessary to obtain related data for a certain type of information, it can be directly obtained through database join queries, thereby improving the intelligence of data querying. Attached Figure Description
[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0021] Figure 1 This application provides an illustration of an application scenario.
[0022] Figure 2 A schematic flowchart illustrating a method for establishing a database as provided in an embodiment of this application;
[0023] Figure 3 A flowchart illustrating a method for establishing the association between an evaluation result information table, a certificate information table, and a target object information table, as provided in an embodiment of this application;
[0024] Figure 4 A flowchart illustrating a method for establishing an association between an administrator information table and an evaluation agency information table, provided in an embodiment of this application;
[0025] Figure 5 A flowchart illustrating a method for establishing an association between an administrator information table and a target object information table, provided in an embodiment of this application;
[0026] Figure 6 This is an exemplary application diagram provided for an embodiment of this application;
[0027] Figure 7 A schematic diagram of a database creation apparatus provided in an embodiment of this application;
[0028] Figure 8This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0029] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0030] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0031] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of the relevant data all comply with the relevant laws, regulations, and standards of the relevant countries and regions, have taken necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation access points for users to choose to authorize or refuse.
[0032] Furthermore, the technical solution involved in this application, which involves big data analysis of user information (including but not limited to personal biometrics, identity data, consumption data, asset data, electronic terminal operation data, etc.) and the use of artificial intelligence technology for automated decision-making, and makes decisions that have a significant impact on personal rights based on the results of automated decision-making, provides users with corresponding operation entry points for users to choose to agree to or reject the results of automated decision-making; if the user chooses to reject, the process will proceed to the expert decision-making process.
[0033] It should be noted that the database creation method, apparatus, equipment, storage medium and product provided in this application can be used in the field of financial technology, or in any field other than financial technology. The application field of the database creation method, apparatus, equipment, storage medium and product in this application is not limited.
[0034] When processing target business, such as loan business, the bank inspects the customer's collateral and then offline schedules an appointment with Institution A to register the mortgage. The bank can assess the collateral itself based on different dimensions of the customer's collateral, or use an external appraisal agency to obtain an appraisal result. This appraisal result can serve as the basis for the bank to provide credit services to the customer. After completing the mortgage registration, Institution A will keep the relevant registration documents online. When processing loan business, the bank can conduct a secondary verification to confirm whether Institution A's collateral has been registered. If the registration is successful, the bank will provide loan services to the user.
[0035] This demonstrates that banks utilize a significant amount of data when processing transactions. In related technologies, banks and other financial institutions typically need to acquire and manage multiple types of related information when handling target business, including administrator information, target object information, appraisal agency information, appraisal result information, and certificate information. However, these pieces of information are independent. When an administrator needs to search for related information of a certain type, they must manually search through a vast amount of data, filtering related information through keyword matching or experience.
[0036] However, the above operation method requires a lot of manpower and time and has a low level of intelligence.
[0037] Therefore, addressing the problems in related technologies, the research process revealed that establishing a database including administrator information, target object information, evaluation agency information, evaluation result information, and certificate information, and establishing the relationships between these multiple pieces of information, can effectively improve search efficiency and enhance the level of intelligence. Therefore, this application proposes a database establishment method. Specifically, it involves acquiring administrator information, target object information, evaluation agency information, evaluation result information, and target object certificate information. Then, based on the table creation commands of the relational database MySQL, it creates separate tables for administrator information, target object information, evaluation agency information, evaluation result information, and target object certificate information. Furthermore, it utilizes MySQL's association commands to establish associations between the evaluation result information table, certificate information table, and target object information table, as well as associations between the administrator information table and the evaluation agency information table and target object information table, thereby achieving structured storage and associated management of multiple types of information through MySQL.
[0038] To facilitate understanding of the method in this application, an exemplary scenario is provided below. Please refer to [link / reference]. Figure 1 , Figure 1 This application provides an application scenario diagram, including a first terminal 01, a second terminal 02, a third terminal 03, and a server 04. The first terminal 01, the second terminal 02, the third terminal 03, and the server 04 are connected via a wireless network.
[0039] Specifically, the basic information administrator role set on the first terminal 01 uploads administrator information, target object information, and assessment agency information to the server 04 according to the preset function permissions of the role. The assessment administrator role set on the second terminal 02 uploads assessment result information to the server 04 according to the preset function permissions of the role. The certificate information is uploaded to the server 04 according to the preset function permissions of the certificate holder role set on the third terminal 03.
[0040] After obtaining the above information, Server 04 creates the Administrator Information Table, Target Object Information Table, Appraisal Agency Information Table, Appraisal Result Information Table, and Target Object Certificate Information Table based on the table creation instructions of the relational database MySQL. Then, it uses MySQL's join instructions to establish the join relationship between the Appraisal Result Information Table and the Certificate Information Table and the Target Object Information Table, as well as the join relationship between the Administrator Information Table and the Appraisal Agency Information Table and the Target Object Information Table, respectively, and finally obtains a database containing the above join relationships.
[0041] It is understood that the above application scenarios are only for illustrative purposes. This application does not limit the type and quantity of the first terminal 01, the second terminal 02, the third terminal 03, and the server 04. The specific details can be determined according to the actual application situation.
[0042] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0043] Please see Figure 2 , Figure 2 This is a flowchart illustrating a database creation method provided in an embodiment of this application. The execution entity of this method can be a database creation device, which can be implemented through a computer program; it can also be implemented through a medium storing the relevant computer program, such as a USB flash drive and / or optical disc; or it can be implemented through a physical device integrating or installing the relevant computer program, such as a chip or electronic device. The electronic device can be a server, server cluster, smart terminal, etc. The method may include the following steps:
[0044] S201. Obtain administrator information, target object information, assessment agency information, assessment result information, and the target object's certificate information.
[0045] Optionally, the administrator information may include, but is not limited to: administrator ID, administrator name, administrator password, administrator permissions, administrator department, administrator phone number, administrator gender, administrator identity information, remarks, external appraisal agency identification information, and collateral identification information.
[0046] Optionally, the target information may include collateral information, including but not limited to: collateral identification information, collateral name, collateral category, mortgagor's name, mortgagor's phone number, collateral attribute information, and remarks.
[0047] Optionally, the assessment agency information includes, but is not limited to: external assessment agency identification information, external assessment agency name, assessment agency's professional field, assessment agency address, assessment agency contact number, assessment agency legal representative's name, assessment agency registration date, and assessment agency's postal code.
[0048] Optionally, the assessment result information may include external assessment result information, internal assessment result information, and direct assessment result information. The assessment result information includes, but is not limited to: collateral identification information, collateral number, collateral name, assessment date, validity period of assessment result, collateral value information, and remarks information. In addition to the above information, the external assessment result information may also include the identification information and name of the external assessment agency.
[0049] Optionally, the certificate information of the target object includes, but is not limited to: the certificate number of the collateral, the identification information of the collateral, the name of the collateral, the entry and exit status of the collateral, the entry and exit time of the collateral, the name of the mortgagor, the name of the borrower, and remarks.
[0050] In this embodiment, the executing entity uses a smart terminal as an example. Through the functional permissions of the basic information administrator role set on the smart terminal, it uploads administrator information, target object information, and assessment agency information. Through the functional permissions of the assessment administrator role set on the smart terminal, it uploads assessment result information. Through the functional permissions of the certificate administrator role set on the smart terminal, it uploads the certificate information of the target object. Thus, the smart terminal can obtain administrator information, target object information, assessment agency information, assessment result information, and the certificate information of the target object.
[0051] S202. Based on the table creation commands in the relational database management system MySQL, create the administrator information table, target object information table, assessment agency information table, assessment result information table, and target object certificate information table according to the administrator information, target object information, assessment agency information, assessment result information, and target object certificate information.
[0052] Based on the MySQL table creation command CREATE TABLE, an administrator information table is generated according to the information included in the administrator information. The administrator information table includes, but is not limited to, the following fields: administrator ID, administrator name, administrator password, administrator permissions, administrator department, administrator phone number, administrator gender, administrator identity information, and remarks information.
[0053] Accordingly, a target object information table is generated based on the information included in the target object information. The target object information table includes, but is not limited to, the following fields: collateral identification information field, collateral name field, collateral category field, mortgagor name field, mortgagor telephone number field, collateral value and remarks field, etc.
[0054] Accordingly, an appraisal agency information table is generated based on the information included in the appraisal agency information, an appraisal result information table is generated based on the information included in the appraisal result information, and a certificate information table for the target object is generated based on the information included in the certificate information of the target object.
[0055] S203. Based on the association commands in MySQL, establish the association between the evaluation result information table, the certificate information table, and the target object information table; establish the association between the administrator information table and the evaluation agency information table; and establish the association between the administrator information table and the target object information table to obtain the database.
[0056] In MySQL, table joins achieve data dependency and referential integrity based on foreign key constraints from relational algebra. By defining foreign key fields in child tables (e.g., evaluation results or certificate information tables) that point to the primary key of the parent table (e.g., the target object table), a "child-parent table" join is formed. This join mechanism forces child table records to reference the primary key present in the parent table, thereby improving data consistency.
[0057] The specific implementation process will be described in detail in the following embodiments. Please refer to the following embodiments.
[0058] In the above embodiments of this application, by obtaining administrator information, target object information, appraisal agency information, appraisal result information, and target object certificate information, and based on table creation instructions in the relational database management system MySQL, corresponding administrator information tables, target object information tables, appraisal agency information tables, appraisal result information tables, and target object certificate information tables are created according to the above information. Then, based on association instructions in MySQL, association relationships are established between the appraisal result information table and the certificate information table and the target object information table, between the administrator information table and the appraisal agency information table, and between the administrator information table and the target object information table, thus obtaining the database. The method of this application eliminates the need for users to manually filter related data from massive amounts of information. Through the association relationships between database tables, an information association network is automatically constructed. When it is necessary to obtain related data for a certain type of information, it can be directly obtained through database association queries, thereby improving the intelligence of data querying.
[0059] Furthermore, based on the above embodiments, the process of establishing the association relationship between the evaluation result information table and the certificate information table and the target object information table based on the association command in MySQL is described. Please refer to [link to documentation]. Figure 3 , Figure 3 A flowchart illustrating a method for establishing the association between an evaluation result information table, a certificate information table, and a target object information table, provided in this application embodiment, may include the following steps:
[0060] S301. Set the first foreign key field in the evaluation result information table.
[0061] Add a first foreign key field "collateral_id" to the assessment results information table. "collateral_id" is used to store the unique identifier of the associated target object, i.e., the collateral. The data type of this field must be exactly the same as the primary key field in the target object information table, and is usually an integer data type (INTEGER, INT).
[0062] S302. Associate the first foreign key field with the primary key field of the target object information table.
[0063] Optionally, the primary key field of the target object information table is the identification information of the target object in the target object information table.
[0064] In the target object information table, the primary key field is "collateral_id", which stores the unique identifier information of the collateral.
[0065] By using foreign key constraints, the "collateral_id" field of the evaluation results table is linked to the primary key field "collateral_id" of the target object table, thus establishing a data relationship between the evaluation results information table and the target object information table.
[0066] S303. Set a second foreign key field in the warrant information table.
[0067] Add a second foreign key field “collateral_id” to the warrant information table.
[0068] S304. Associate the second foreign key field with the primary key field of the target object information table.
[0069] By using foreign key constraints, the "collateral_id" field of the warrant information table is linked to the primary key field "collateral_id" of the target object table, thus establishing a data relationship between the warrant information table and the target object information table.
[0070] S305. Based on the join command in MySQL, configure foreign key constraints on the first foreign key field and the second foreign key field so that the first foreign key field and the second foreign key field form a join relationship with the primary key field of the target object information table.
[0071] Foreign key constraints include, but are not limited to: cascading update rule constraints, deletion restriction rule constraints, and deletion null rule constraints.
[0072] Optionally, based on MySQL join commands, configure cascading update rule constraints ON UPDATE CASCADE, delete restriction rule constraints ON DELETE RESTRICT, and delete null rule constraints ON DELETE SET NULL for the first and second foreign key fields.
[0073] Configure cascading update rules for the first and second foreign key fields. When the primary key field "collateral_id" in the target object information table is updated, the foreign key field "collateral_id" of all related records in the evaluation result information table will be automatically updated synchronously.
[0074] For example, when a bank needs to renumber collateral, if the unique identifier of the collateral recorded in the target object information table changes from 1001 to 1002, the unique identifier of the collateral recorded in the appraisal result information table will automatically update to 1002. This eliminates the tedious process of administrators having to manually update the appraisal result information table from a large amount of information.
[0075] By configuring cascading update rules, when the primary key "collateral_id" in the target object information table changes, the foreign key value of "collateral_id" in all related records in the evaluation result information table will be automatically updated synchronously, thereby improving data consistency.
[0076] Configure deletion restriction rules for the first and second foreign key fields. If the unique identifier of the collateral recorded in the foreign key field "collateral_id" of the evaluation result information table is 1001, then the unique identifier of the collateral recorded in the primary key field "collateral_id" of the target object information table cannot be directly deleted. In other words, records referenced by the evaluation result information table are prohibited from being directly deleted from the corresponding records in the target object information table.
[0077] By configuring deletion restriction rules, when the evaluation result information table contains foreign key association information that references records in the target object information table, the direct deletion of the corresponding foreign key association information in the target object information table will be prevented, thereby reducing the risk of accidentally deleting critical basic data.
[0078] Configure a delete null rule constraint for the first and second foreign key fields. When the unique identifier information 1001 of the collateral recorded in the primary key "collateral_id" of the target object information table is to be deleted, the record of "collateral_id" in the associated records of the valuation result information table and the certificate information table will become null, instead of deleting the valuation result information table and the certificate information table.
[0079] By configuring null rules for deletion, when deleting records corresponding to the primary key in the target object information table, records associated with foreign keys in the evaluation result information table and the certificate information table are still retained, which facilitates traceability in case of accidental deletion.
[0080] After configuring foreign key constraints on the first and second foreign key fields, you can create single-column indexes on them using MySQL's index creation commands. Creating single-column indexes can accelerate join queries, thereby improving query speed.
[0081] In the above embodiments of this application, by setting a first foreign key field in the evaluation result information table and associating it with the primary key field of the target object information table, and setting a second foreign key field in the warrant information table and associating it with the primary key field of the target object information table, foreign key constraints are configured on the first and second foreign key fields based on MySQL join instructions, so that the first and second foreign key fields form a relationship with the primary key field of the target object information table. The method of this embodiment, by setting foreign key fields in the evaluation result information table and the warrant information table and associating them with the primary key of the target object information table, and simultaneously configuring foreign key constraints, can effectively realize the association and management of multi-table data.
[0082] Furthermore, based on the above embodiments, the process of establishing a relationship between the administrator information table and the assessment agency information table using MySQL join commands is described below. Please refer to [link to relevant documentation]. Figure 4 , Figure 4 A flowchart illustrating a method for establishing a relationship between an administrator information table and an evaluation agency information table, provided in this application embodiment, includes the following steps:
[0083] S401. Set a third foreign key field in the administrator information table.
[0084] Add a third foreign key field "agency_id" to the administrator information table. "agency_id" is used to store the unique identifier information of the associated assessment agency. The data type of this field is exactly the same as the primary key field in the assessment agency information table, which is usually an integer data type (INTEGER, INT).
[0085] S402. Link the third foreign key field to the primary key field of the assessment agency information table.
[0086] Optionally, the primary key field of the assessment agency information table is the identification information of the assessment agency in the assessment agency information table.
[0087] In the assessment agency information table, the primary key field is "agency_idc", which stores the unique identification information of the assessment agency.
[0088] By using foreign key constraints, the "agency_id" field of the administrator information table is linked to the primary key field "agency_id" of the assessment agency information table, thus establishing a data relationship between the administrator information table and the assessment agency information table.
[0089] S403. Based on the join command in MySQL, configure a foreign key constraint on the third foreign key field. Add a foreign key constraint to the administrator information table so that the third foreign key field is associated with the primary key field of the evaluation agency information table.
[0090] The specific implementation process is similar to step S303 in the above embodiment, and will not be repeated to avoid redundancy.
[0091] After configuring foreign key constraints on the third foreign key field, you can also create a single-column index on the third foreign key field using MySQL's index creation command to speed up join queries.
[0092] In the above embodiments of this application, a third foreign key field is set in the administrator information table and associated with the primary key field of the assessment agency information table. Then, based on MySQL join instructions, a foreign key constraint is configured on the third foreign key field, and a foreign key constraint is added to the administrator information table, so that the third foreign key field and the primary key field of the assessment agency information table form a join relationship. This method, by setting a foreign key field in the administrator information table and associating it with the primary key of the assessment agency information table, and simultaneously configuring a foreign key constraint, can effectively realize the association and management of data from multiple tables.
[0093] Furthermore, based on the above embodiments, the process of establishing a relationship between the administrator information table and the target object information table based on MySQL join commands is described. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 A flowchart illustrating a method for establishing an association between an administrator information table and a target object information table, provided in this application embodiment, includes the following steps:
[0094] S501. Set a fourth foreign key field in the administrator information table.
[0095] Add a fourth foreign key field "collateral_id" to the administrator information table. "collateral_id" is used to store the unique identifier information of the associated target object, i.e., the collateral. The data type of this field must be exactly the same as the primary key field in the target object information table, and is usually an integer data type (INTEGER, INT).
[0096] S502. Associate the fourth foreign key field with the primary key field of the target object information table. The primary key field of the target object information table is the identification information of the target object information table.
[0097] In the target object information table, the primary key field is "collateral_id", which stores the unique identifier information of the collateral.
[0098] By using foreign key constraints, the "collateral_id" field of the administrator information table is linked to the primary key field "collateral_id" of the target object table, thus establishing a data relationship between the administrator information table and the target object information table.
[0099] S503. Based on the join command in MySQL, configure a foreign key constraint on the fourth foreign key field so that the fourth foreign key field forms a join relationship with the primary key field of the target object information table.
[0100] The specific implementation process is similar to step S303 in the above embodiment, and will not be repeated to avoid redundancy.
[0101] After configuring foreign key constraints on the fourth foreign key field, you can also create a single-column index on the fourth foreign key field using MySQL's index creation command to speed up join queries.
[0102] In the above embodiments of this application, a fourth foreign key field is set in the administrator information table and associated with the primary key field of the target object information table. Then, based on MySQL join instructions, a foreign key constraint is configured on the fourth foreign key field to establish a relationship between the fourth foreign key field and the primary key field of the target object information table. This method, by setting a foreign key field in the administrator information table and associating it with the primary key of the target object information table, and simultaneously configuring foreign key constraints, effectively achieves the association and management of data across multiple tables.
[0103] It is understood that the method in this application can also be used to establish relationships between any two or more tables. The specific implementation process is similar and will not be repeated here.
[0104] To facilitate understanding of the application of the method in this application, a brief explanation is provided below. Please refer to [link / reference]. Figure 6 , Figure 6 This is a schematic diagram illustrating an exemplary application provided in an embodiment of this application. Figure 6 As can be seen from this, assuming an administrator wants to query the evaluation results of a target object, they can determine the target object information table based on the administrator information and the relationship between the established administrator information table and the target object information table, by linking the foreign key field in the administrator information table to the primary key of the target object information table. Then, based on the relationship between the established evaluation result information table and the target object information table, by linking the primary key of the target object information table to the evaluation result information table, the evaluation result information table can be determined, thus enabling the administrator to query the evaluation results of the target object.
[0105] It is understood that the above examples are for illustrative purposes only and do not limit this application.
[0106] This application also provides a database creation apparatus; please refer to [link to relevant documentation]. Figure 7 , Figure 7 A schematic diagram of a database creation apparatus provided in this application embodiment includes:
[0107] The acquisition module 701 is used to acquire administrator information, target object information, assessment agency information, assessment result information, and the certificate information of the target object.
[0108] Module 702 is used to create tables based on the table creation commands in the relational database management system MySQL. It creates tables for administrator information, target object information, assessment agency information, assessment results, and the certificate information of the target object, according to administrator information, target object information, assessment agency information, assessment results, and the certificate information of the target object.
[0109] Processing module 703 is used to establish the association relationship between the evaluation result information table, the certificate information table and the target object information table based on the association command in MySQL, establish the association relationship between the administrator information table and the evaluation agency information table, and establish the association relationship between the administrator information table and the target object information table, so as to obtain the database.
[0110] One possible implementation is that the processing module 703 is specifically used for:
[0111] Set the first foreign key field in the evaluation results information table.
[0112] The first foreign key field is associated with the primary key field of the target object information table, where the primary key field is the identifier information of the target object.
[0113] Set a second foreign key field in the warrant information table.
[0114] Associate the second foreign key field with the primary key field of the target object information table.
[0115] Based on the join command in MySQL, foreign key constraints are configured on the first foreign key field and the second foreign key field to form a relationship between the first foreign key field and the second foreign key field and the primary key field of the target object information table.
[0116] One possible implementation is that the foreign key constraints include: cascading update rule constraints, deletion restriction rule constraints, and deletion null rule constraints. Processing module 703 is specifically used for:
[0117] Based on MySQL join commands, configure cascading update rule constraints, deletion restriction rule constraints, and deletion null rule constraints for the first foreign key field and the second foreign key field, respectively.
[0118] One possible implementation is that, based on MySQL join commands, after configuring foreign key constraints on the first and second foreign key fields, processing module 703 is further used for:
[0119] Create single-column indexes on the first and second foreign key fields using MySQL index creation commands.
[0120] One possible implementation is that the processing module 703 is specifically used for:
[0121] Set a third foreign key field in the administrator information table.
[0122] The third foreign key field is linked to the primary key field of the appraisal agency information table, where the primary key field is the identification information of the appraisal agency.
[0123] Based on the join command in MySQL, a foreign key constraint is configured on the third foreign key field. A foreign key constraint is added to the administrator information table so that the third foreign key field is associated with the primary key field of the evaluation agency information table.
[0124] One possible implementation is that the processing module 703 is specifically used for:
[0125] Set a fourth foreign key field in the administrator information table.
[0126] The fourth foreign key field is associated with the primary key field of the target object information table, where the primary key field is the identifier information of the target object.
[0127] Based on the join command in MySQL, configure a foreign key constraint on the fourth foreign key field so that the fourth foreign key field forms a relationship with the primary key field of the target object information table.
[0128] For a description of the features in the embodiment corresponding to the database creation device, please refer to the relevant description in the embodiment corresponding to the database creation method, which will not be repeated here.
[0129] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, such as... Figure 8 As shown, the electronic device provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the electronic device further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus 804.
[0130] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to execute the above-described database establishment method embodiment.
[0131] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0132] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0133] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0134] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0135] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described database creation method embodiments when running.
[0136] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0137] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described database creation method embodiments.
[0138] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described database creation method embodiments.
[0139] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily essential to this application.
[0140] It should be further noted that although the steps in the flowchart are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0141] It should be understood that the above-described device embodiments are merely illustrative, and the device of this application can also be implemented in other ways. For example, the division of units / modules in the above embodiments is only a logical functional division, and there may be other division methods in actual implementation. For example, multiple units, modules, or components may be combined, or integrated into another system, or some features may be ignored or not executed.
[0142] Furthermore, unless otherwise specified, the functional units / modules in the various embodiments of this application can be integrated into one unit / module, or each unit / module can exist physically separately, or two or more units / modules can be integrated together. The integrated units / modules described above can be implemented in hardware or as software program modules.
[0143] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0144] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.
[0145] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.
Claims
1. A method for establishing a database, characterized in that, include: Obtain administrator information, target object information, evaluation agency information, evaluation result information, and the certificate information of the target object; Based on the table creation commands in the relational database management system MySQL, an administrator information table, a target object information table, an evaluation agency information table, an evaluation result information table, and a target object's certificate information table are created according to the administrator information, the target object information, the evaluation agency information, the evaluation result information, and the target object's certificate information. Based on the association commands in MySQL, establish the association relationships between the evaluation result information table, the certificate information table, and the target object information table; establish the association relationship between the administrator information table and the evaluation agency information table; and establish the association relationship between the administrator information table and the target object information table to obtain the database.
2. The method according to claim 1, characterized in that, The process of establishing the association between the evaluation result information table, the certificate information table, and the target object information table based on MySQL join commands includes: Set a first foreign key field in the evaluation result information table; The first foreign key field is associated with the primary key field of the target object information table, where the primary key field of the target object information table is the identification information of the target object in the target object information table. Set a second foreign key field in the certificate information table; Associate the second foreign key field with the primary key field of the target object information table; Based on the join command in MySQL, foreign key constraints are configured on the first foreign key field and the second foreign key field to form a join relationship with the primary key field of the target object information table.
3. The method according to claim 2, characterized in that, The foreign key constraints include: cascading update rule constraints, deletion restriction rule constraints, and deletion null rule constraints. The configuration of foreign key constraints for the first and second foreign key fields based on MySQL join commands includes: Based on the join command in MySQL, configure the cascading update rule constraint, the deletion restriction rule constraint, and the deletion null rule constraint for the first foreign key field and the second foreign key field, respectively.
4. The method according to claim 2 or 3, characterized in that, After configuring foreign key constraints on the first and second foreign key fields based on MySQL join commands, the method further includes: Create single-column indexes on the first foreign key field and the second foreign key field using MySQL index creation commands.
5. The method according to claim 1, characterized in that, Based on MySQL join commands, establish the join between the administrator information table and the evaluation agency information table, including: Set a third foreign key field in the administrator information table; The third foreign key field is associated with the primary key field of the assessment agency information table, where the primary key field of the assessment agency information table is the identification information of the assessment agency in the assessment agency information table; Based on the join command in MySQL, a foreign key constraint is configured on the third foreign key field, and a foreign key constraint is added to the administrator information table so that the third foreign key field is associated with the primary key field of the evaluation agency information table.
6. The method according to claim 1, characterized in that, Based on MySQL join commands, establish a join between the administrator information table and the target object information table, including: Set a fourth foreign key field in the administrator information table; The fourth foreign key field is associated with the primary key field of the target object information table, where the primary key field of the target object information table is the identification information of the target object in the target object information table. Based on the join command in MySQL, a foreign key constraint is configured on the fourth foreign key field so that the fourth foreign key field forms a join relationship with the primary key field of the target object information table.
7. A database creation apparatus, characterized in that, include: The acquisition module is used to acquire administrator information, target object information, assessment agency information, assessment result information, and the certificate information of the target object; A creation module is used to create an administrator information table, a target object information table, an assessment agency information table, an assessment result information table, and a target object's certificate information table based on the table creation instructions in the relational database management system MySQL, according to the administrator information, the target object information, the assessment agency information, the assessment result information, and the target object's certificate information. The processing module is used to establish the association relationship between the evaluation result information table, the certificate information table and the target object information table based on the association command in MySQL, establish the association relationship between the administrator information table and the evaluation agency information table, and establish the association relationship between the administrator information table and the target object information table, so as to obtain the database.
8. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method of any one of claims 1 to 6.