Front-end code-free database table generation method
By dividing the database table generation process into front-end and back-end code categories, modular no-code database tables are formed, solving the problems of front-end code redundancy and poor reusability, and achieving efficient database table content management and updates.
Patent Information
- Application Number
- CN202310714510.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-15
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-06-15
AI Technical Summary
Existing methods for generating database tables suffer from redundant front-end code, poor code reusability, high communication costs, inconvenience in retrieving and updating database table content, and the need to frequently write front-end code for data addition and deletion operations.
The data is divided into two parts: front-end code and back-end code. Free tables are formed according to the type of back-end code, and database tables are automatically generated by the database system. The front-end code is removed, and the modular back-end code relationships are retained to achieve on-demand loading and updating.
The generated database tables have no front-end code, which facilitates content retrieval and updates, reduces communication costs, improves code reusability and callability, and reduces front-end code redundancy.
Smart Images

Figure CN116701399B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, specifically to a method for generating database tables without front-end code. Background Technology
[0002] In Access, a table is an object used to store data in the database. It is a structured collection of data, the foundation of the entire database system, and a tool used to store data in an SQL database. A table is a database object containing all the data in the database. Currently, there are three ways to generate database tables: first, code generation; second, package manager console migration; and third, command-line migration. In object-oriented programming, programmers typically generate databases through code generation. This method requires writing database tables tailored to different database configurations, and the generated tables are used to store the data within the database. As the scale of data storage and the concurrency of access increase, database tables become increasingly important to the database, directly affecting the response speed of the data within the database.
[0003] However, current methods for generating database tables still have the following shortcomings:
[0004] Existing database table generation methods generate database tables with front-end code containing all the data. However, there is overlap between these front-end codes, resulting in redundancy, poor code reusability, and poor interoperability. This leads to high communication costs and makes it difficult to retrieve and update database table content. If data needs to be added or deleted later, the front-end code needs to be rewritten, making the data addition and deletion process cumbersome.
[0005] Therefore, there is an urgent need to improve this shortcoming. This invention studies and improves the existing structure and its deficiencies, and provides a method for generating database tables without front-end code. Summary of the Invention
[0006] The purpose of this invention is to provide a method for generating database tables without front-end code, so as to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides the following technical solution: a method for generating database tables without front-end code, comprising the following specific steps:
[0008] S1. Data Compilation:
[0009] The data content to be written is divided into two parts: front-end code and back-end code. First, the format of the front-end program code is determined according to the database configuration, and the front-end code is written accordingly. Then, a suitable computer language is selected to write the back-end code.
[0010] S2. Generate database tables:
[0011] The data is categorized according to the data field types in the backend code, and then the categorized data is integrated to form free tables, which are then added to the database. Database tables are created in the database, and database table rules are set. The database system will automatically merge the free tables and database tables, converting the free tables in the database into database tables.
[0012] S3. Front-end code processing:
[0013] The front-end code that extracts data from the database tables is processed sequentially, and then the front-end code is modularized. The modularized code is then combined and used to construct a data subset P.
[0014] S4. Establish code association:
[0015] The module code of the original front-end code is associated with the module code in the data subset P to establish the relationship between the two. The front-end code of all data in the database table is removed, and only the back-end code of the data and the module code relationship are retained, thereby forming a database table with no front-end code.
[0016] S5. Database table updates and maintenance:
[0017] According to the rules for adding and deleting data in database tables, new data is added to the database tables or useless data is deleted from the database tables. The database tables are maintained through update operations.
[0018] Furthermore, the formula for the data content in step S1 is S. a ={x a |a1、a2、...、a n}, where S a Let x be the content of data A. a This is the front-end code for data A, a1, a2, ..., a n This is the backend code for data A.
[0019] Furthermore, the front-end code in step S1 is a lightweight script that can be directly run by the browser, while the back-end code refers to the uncompiled back-end code running in a programming environment, including but not limited to C# and Java, and the back-end code cannot be recognized by the browser before it is compiled and interpreted.
[0020] Furthermore, the format of the data front-end program code written in step S1 according to different database configurations is relatively fixed.
[0021] Furthermore, the field types in the database table in step S2 include binary data types, character data types, Unicode data types, date and time data types, numeric data types, currency data types, and special data types. Among them, binary data types include Binary, Varbinary, and Image; character data types include Char, Varchar, and Text; Unicode data types include Nchar, Nvarchar, and Ntex; date and time data types include Datetime, Smalldatetime, Date, and Timestamp; numeric data types include positive and negative numbers, decimals, and integers; currency data types include numbers representing positive or negative currencies; and special data types include Timestamp, Bit, and Uniqueidentifier.
[0022] Furthermore, the classification operation in step S2 uses the functional characteristics of the backend code as the classification basis, and the data classification follows four principles: legality and compliance, multi-dimensional classification, clear hierarchical classification, and strict adherence to the highest level. The dataset is classified according to the highest level of the data item, and the boundaries of each level of data classification should be clear. Different protection measures should be taken for data of different levels.
[0023] Furthermore, the free table in step S2 is independent of any database and can be added to a database as needed, but a free table cannot be added to multiple databases at the same time.
[0024] Furthermore, the modular processing in step S3 refers to breaking down the front-end code that follows fixed rules into several independent and interdependent small modules. These modules can be replaced, decomposed, and combined to improve code reusability and achieve on-demand loading.
[0025] Furthermore, the purpose of the union processing in step S3 is to remove duplicate module code, ensure that the module code does not repeat itself, and avoid module code redundancy.
[0026] Furthermore, the database table update operation in step S5 includes adding and deleting data, adding and deleting module code associations, and updating the module code of the data subset P.
[0027] This invention provides a method for generating database tables without front-end code, which has the following advantages: This invention involves writing front-end and back-end code separately, classifying the data according to the data field types of the back-end code, and then integrating the classified data to form free tables, which are added to the database. The database system automatically merges the free tables with the database tables, transforming them into database tables. The front-end code within the database tables is then modularized and combined to construct a data subset P. By associating the original front-end code modules with the module code within data subset P, all front-end code in the database tables is removed, resulting in a database table without front-end code. Compared to traditional methods, this improved database table generation method generates database tables without front-end code, facilitating the retrieval and updating of database table content. Even if data needs to be added or deleted later, no front-end code writing is required. Furthermore, the modularization and combination of the front-end code avoids redundancy in the database front-end code, improves code reusability, enables on-demand loading, and reduces communication costs by enhancing the interoperability of the modules. Attached Figure Description
[0028] Figure 1 This is a schematic diagram of the overall operation flow of a front-end no-code database table generation method according to the present invention;
[0029] Figure 2 This is a schematic diagram illustrating the field type classification of a front-end no-code database table generation method according to the present invention;
[0030] Figure 3 This is a schematic diagram of step S3 of the method for generating database tables without front-end code according to the present invention. Detailed Implementation
[0031] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and should not be construed as limiting the scope of the invention.
[0032] like Figures 1-3 As shown, a method for generating database tables without front-end code includes the following specific steps:
[0033] S1. Data Compilation:
[0034] The data content to be written is divided into two parts: front-end code and back-end code. First, the format of the front-end program code is determined according to the database configuration, and the front-end code is written accordingly. Then, a suitable computer language is selected to write the back-end code.
[0035] S2. Generate database tables:
[0036] The data is categorized according to the data field types in the backend code, and then the categorized data is integrated to form free tables, which are then added to the database. Database tables are created in the database, and database table rules are set. The database system will automatically merge the free tables and database tables, converting the free tables in the database into database tables.
[0037] S3. Front-end code processing:
[0038] The front-end code that extracts data from the database tables is processed sequentially, and then the front-end code is modularized. The modularized code is then combined and used to construct a data subset P.
[0039] S4. Establish code association:
[0040] The module code of the original front-end code is associated with the module code in the data subset P to establish the relationship between the two. The front-end code of all data in the database table is removed, and only the back-end code of the data and the module code relationship are retained, thereby forming a database table with no front-end code.
[0041] S5. Database table updates and maintenance:
[0042] According to the rules for adding and deleting data in database tables, new data is added to the database tables or useless data is deleted from the database tables. The database tables are maintained through update operations.
[0043] The formula for the data content in step S1 is S. a ={x a |a1、a2、...、a n}, where S a Let x be the content of data A. a This is the front-end code for data A, a1, a2, ..., a n This is the backend code for data A.
[0044] The front-end code in step S1 is a lightweight script that can be run directly by the browser. The back-end code refers to the uncompiled code that runs in a programming environment, including but not limited to C# and Java. The back-end code cannot be recognized by the browser before it is compiled and interpreted.
[0045] The format of the data front-end program code written in step S1 according to different database configurations is relatively fixed.
[0046] The field types in the database table in step S2 include binary data types, character data types, Unicode data types, date and time data types, numeric data types, currency data types, and special data types. Among them, binary data types include Binary, Varbinary, and Image; character data types include Char, Varchar, and Text; Unicode data types include Nchar, Nvarchar, and Ntex; date and time data types include Datetime, Smalldatetime, Date, and Timestamp; numeric data types include positive and negative numbers, decimals, and integers; currency data types include numbers representing positive or negative currencies; and special data types include Timestamp, Bit, and Uniqueidentifier.
[0047] The classification operation in step S2 uses the functional characteristics of the backend code as the classification basis, and the data classification follows four principles: legality and compliance, multi-dimensional classification, clear hierarchical classification, and strict adherence to the highest level. The dataset is classified according to the highest level of the data item, and the boundaries of each level of data classification should be clear. Different protection measures should be taken for data of different levels.
[0048] The free table in step S2 is independent of any database and can be added to a database as needed, but a free table cannot be added to multiple databases at the same time.
[0049] The modular processing in step S3 refers to breaking down the front-end code that follows fixed rules into several independent and interdependent small modules. These modules can be replaced, decomposed, and combined to improve code reusability and achieve on-demand loading.
[0050] The purpose of the union processing in step S3 is to remove duplicate module code, ensure that the module code does not repeat itself, and avoid module code redundancy.
[0051] The database table update operations in step S5 include adding and deleting data, adding and deleting module code relationships, and updating the module code of data subset P.
[0052] In summary, combining Figures 1-3 As shown, this method for generating database tables without code on the front end has the following specific steps when used:
[0053] S1. Data Writing: Divide the data to be written into two parts: front-end code and back-end code. The formula for the data content is S. a ={x a |a1、a2、...、a n}, where S aLet x be the content of data A. a This is the front-end code for data A, a1, a2, ..., a n The backend code is for data A. The frontend code is a lightweight script that can be run directly by the browser. The backend code refers to the uncompiled code that runs in the programming environment, including but not limited to C# and Java. The backend code cannot be recognized by the browser before it is compiled and interpreted. First, determine the format of the frontend code based on the database configuration. The format of the frontend code is relatively fixed for different database configurations. Write the frontend code based on this, and then choose an appropriate computer language to write the backend code.
[0054] S2. Generate Database Tables: Classify the written data according to the data field types in the backend code. Classification is based on the functional characteristics of the backend code, adhering to four principles: legality and compliance, multi-dimensional classification, clear hierarchical structure, and strict adherence to the highest level. The dataset is classified according to the highest level of each data item, with clear boundaries between levels. Different levels of data should be protected using different measures. The classified data is then integrated to form free tables. These free tables are independent of any database and can be added to databases as needed, but a single free table cannot be added to multiple databases simultaneously. Database tables are then created within the database, and database table rules are set. The database system will automatically merge the free tables with the database tables, converting the free tables into database tables. The field types in the database tables include... It includes binary data types, character data types, Unicode data types, date and time data types, numeric data types, currency data types, and special data types. Among them, binary data types include Binary, Varbinary, and Image; character data types include Char, Varchar, and Text; Unicode data types include Nchar, Nvarchar, and Ntex; date and time data types include Datetime, Smalldatetime, Date, and Timestamp; numeric data types include positive and negative numbers, decimals, and integers; currency data types include numbers representing positive or negative currencies; and special data types include Timestamp, Bit, and Uniqueidentifier.
[0055] S3. Front-end code processing: Extract the front-end code from the database tables in sequence, and perform modular processing on the front-end code. Modular processing means breaking down the front-end code that follows fixed rules into several independent and interdependent small modules. The modules can be replaced, decomposed and combined to improve code reusability and achieve on-demand loading. Then, perform union processing on the modularized code and construct a data subset P. The purpose of union processing is to remove duplicate module code, ensure that the module code does not repeat each other, and avoid module code redundancy.
[0056] S4. Establish code association: Associate the module code of the original front-end code with the module code in the data subset P, establish the association relationship between the two, and remove the front-end code of all data in the database table, only keeping the back-end code of the data and the module code association relationship, thereby forming a database table without front-end code.
[0057] S5. Database table update and maintenance: Add new data to the database table or delete useless data in the database table according to the database table addition and deletion rules. Maintain the database table through update operations, including adding and deleting data, adding and deleting module code relationships, and updating the module code of data subset P.
[0058] This invention involves writing separate front-end and back-end code, classifying the data based on the data field types in the back-end code, and then integrating the classified data to form free tables, which are added to a database. The database system automatically merges the free tables with the database tables, transforming them into database tables. The front-end code within the database tables is then modularized and combined to construct a data subset P. By associating the original front-end code modules with the modules within data subset P, all front-end code within the database tables is removed, resulting in a database table without front-end code. Compared to traditional methods, this improved database table generation method generates database tables without front-end code, facilitating the retrieval and updating of database table content. Even if data needs to be added or deleted later, no front-end code writing is required. Furthermore, the modularization and combination of front-end code avoids redundancy within the database, improves code reusability, enables on-demand loading, and reduces communication costs by enhancing the interoperability of the modules.
[0059] The embodiments of the present invention are given for illustrative and descriptive purposes only, and are not intended to be exhaustive or to limit the invention to the forms disclosed. Many modifications and variations will be apparent to those skilled in the art. The embodiments were chosen and described in order to better illustrate the principles and practical application of the invention, and to enable those skilled in the art to understand the invention and to design various embodiments with various modifications suitable for a particular purpose.
Claims
1. A front-end codeless database table method, characterized by, The method comprises the following specific steps: S1, data writing: The data content to be written is divided into front-end code and back-end code, the writing format of the data front-end program code is determined according to the configuration of the database, the front-end code of the data is written, a suitable computer language is selected, and the back-end code of the data is written; S2, generating a database table: The data after writing is classified according to the data field type of the back-end code, the classified data is integrated respectively, a free table is formed, and is added to the database, the database table is established in the database, and the database table rule is set, the database system automatically fuses the free table and the database table, and converts the free table in the database into the database table; S3, front-end code processing: The front-end code of the data in the database table is extracted in sequence, the front-end code is modularized, the modularized code is processed by set union, and a data subset P is constructed; S4, establishing code association: The module code of the original front-end code and the module code in the data subset P are associated, the association relationship therebetween is established, the front-end code of all data in the database table is removed, only the back-end code of the data and the module code association relationship are retained, and accordingly the front-end code-free database table is formed; S5, database table updating and maintenance: According to the increase and decrease rule of the database table, new data content is added into the database table or useless data in the database table is deleted, and the database table is maintained through updating operation.
2. The method of claim 1, wherein, The data content formula in the step S1 is wherein, is the content of the data A, is the front-end code of the data A, is the back-end code of the data A.
3. The method of claim 1, wherein, The front-end code in the step S1 is a lightweight script that can be directly run by a browser, and the back-end code refers to a back-end uncompiled code running in a programming environment, including but not limited to C# and java, and the back-end code cannot be recognized by the browser before being compiled and interpreted.
4. The method of claim 1, wherein, The field types in the database table in the step S2 include binary data type, character data type, Unicode data type, date and time data type, numerical data type, currency data type and special data type, wherein the binary data type includes Binary, Varbinary and Image, the character data type includes Char, Varchar and Text, the Unicode data type includes Nchar, Nvarchar and Ntex, the date and time data type includes Datetime, Smalldatetime, Date and TimeStamp, the numerical data type includes positive and negative numbers, decimals and integers, the currency data type includes positive or negative currency numbers, and the special data type includes Timestamp, Bit and Uniqueidentifier.
5. The method of claim 1, wherein, The classification operation in the step S2 takes the functional characteristics of the back-end code as the classification basis, and the data classification follows three principles of legality and compliance, multi-dimensional classification and clear classification levels, the data set is graded according to the highest level of the data item, the levels of the data classification should be clear, and different levels of data should take different protection measures.
6. The method of claim 1, wherein, The free table in step S2 is independent of any database, and can be added to the database according to the use requirement, but one free table cannot be added to multiple databases at the same time.
7. The method of claim 1, wherein, The modular processing in step S3 refers to splitting the front-end code complying with fixed rules into several small modules which are independent and interdependent, and the modules can be replaced, decomposed and combined.
8. The method of claim 1, wherein, The purpose of the union processing in step S3 is to remove the repeated module code, ensure that the module codes are not repeated, and avoid the redundancy of the module codes.
9. The method of claim 1, wherein, The database table updating operation in step S5 includes the increase and decrease of data, the increase and decrease of the module code association relationship, and the module code updating of the data subset P.
Citation Information
Patent Citations
Data structure supporting design of flexible forms and conversion method and system thereof
CN105912517A
Application building method and device, apparatus and computer readable storage medium
CN113434133A