Database creation method and device, equipment, storage medium and program product

By obtaining the logical model and type of the target database, and using logical entities and attribute conversion tables to automatically create a database, it solves the problem of high complexity in creating multiple types of databases in the existing technology, and realizes efficient database development.

CN119088787APending Publication Date: 2024-12-06CHINA ELECTRONICS CLOUD DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411232819.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In the prior art, when creating multiple types of databases, developers need to spend a lot of time manually writing adaptation code and scripts, resulting in a significant increase in development costs and time cycles and high operational complexity.

Method used

By obtaining the logical model and database type of the target database, using logical entities and logical attribute types to convert tables, automatically create target databases, including physical tables and field indexes, reducing manual writing and database creation time.

Benefits of technology

It realizes automatic database creation based on logical models and database types, reducing operational complexity and development costs, improving development efficiency, and saving time especially when creating multiple types of databases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119088787A_ABST
    Figure CN119088787A_ABST
Patent Text Reader

Abstract

The invention relates to a database creation method and device, equipment, a storage medium and a program product, and the method comprises the steps: obtaining a target logic model corresponding to a to-be-created target database and a target database type of the target database, the target logic model comprises at least one logic entity, a logic attribute corresponding to the at least one logic entity and a logic attribute type conversion table; and creating a target database based on the target database type and the target logic model, wherein the target database comprises a physical table corresponding to the logic entity and a field and an index corresponding to the logic attribute. According to the method, the logic model and the database type of the to-be-created database are obtained, the target database of the corresponding type is automatically created, manual code writing and database creation work is not needed, the operation complexity is reduced, and the development efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of database technology, and in particular to a database creation method, device, equipment, storage medium and program product. Background Art

[0002] As business scenarios continue to grow and become more complex, data platforms need to seamlessly integrate multiple types of databases to meet the diverse needs of data storage, processing, and analysis. However, this process not only requires developers to have a deep foundation in database technology and master the specific syntax and performance characteristics of various databases, but also requires a lot of time to manually write targeted adaptation codes and scripts, which significantly increases development costs and time cycles. Therefore, how to effectively reduce the complexity of creating multiple types of databases and improve development efficiency is a technical problem that needs to be solved urgently. Summary of the invention

[0003] In order to solve the above technical problems, the present disclosure provides a database creation method, device, equipment, storage medium and program product.

[0004] A first aspect of an embodiment of the present disclosure provides a database creation method, the method comprising:

[0005] Acquire a target logical model corresponding to a target database to be created and a target database type of the target database, wherein the target logical model includes at least one logical entity, at least one logical attribute corresponding to the logical entity, and a logical attribute type conversion table, wherein the logical entity is used to represent an abstract description of a physical table, the logical attribute is used to represent an abstract description of a field and an index, and the logical attribute type conversion table is used to represent a conversion relationship between a first field type of a field in the target logical model and a second field type in a database of at least one database type;

[0006] The target database is created based on the target database type and the target logical model. The target database includes physical tables corresponding to the logical entities and fields and indexes corresponding to the logical attributes.

[0007] A second aspect of an embodiment of the present disclosure provides a database creation device, the device comprising:

[0008] an acquisition module, configured to acquire a target logical model corresponding to a target database to be created and a target database type of the target database, wherein the target logical model includes at least one logical entity, at least one logical attribute corresponding to the logical entity, and a logical attribute type conversion table, wherein the logical entity is used to represent an abstract description of a physical table, the logical attribute is used to represent an abstract description of a field and an index, and the logical attribute type conversion table is used to represent a conversion relationship between a first field type of a field in the target logical model and a second field type in a database of at least one database type;

[0009] A creation module is used to create the target database based on the target database type and the target logical model, wherein the target database includes a physical table corresponding to the logical entity and a field and index corresponding to the logical attribute.

[0010] A third aspect of an embodiment of the present disclosure provides a computer device, including a memory and a processor, and a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, the database creation method as described in the first aspect above is implemented.

[0011] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the database creation method as described in the first aspect above is implemented.

[0012] A fifth aspect of an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the database creation method of the first aspect described above.

[0013] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:

[0014] In the database creation method, apparatus, device, storage medium and program product provided in the embodiments of the present disclosure, by obtaining a target logical model corresponding to a target database to be created and a target database type of the target database, the target logical model includes at least one logical entity, a logical attribute corresponding to at least one logical entity and a logical attribute type conversion table, the logical entity is used to represent an abstract description of a physical table, the logical attribute is used to represent an abstract description of a field and an index, the logical attribute type conversion table is used to represent the conversion relationship between a first field type in the target logical model and a second field type in a database of at least one database type, and a target database is created based on the target database type and the target logical model, the target database includes a physical table corresponding to the logical entity and a field and an index corresponding to the logical attribute, and the target database can be automatically created according to the logical model and database type of the database to be created, especially when multiple types of databases need to be created for the same database content, the time for manual code writing and database creation is saved, the operation complexity is reduced, and the development efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] Figure 1 is a flowchart of a database creation method provided by an embodiment of the present disclosure;

[0018] Figure 2 is a flow chart of a method for creating a target database provided by an embodiment of the present disclosure;

[0019] Figure 3 is a flow chart of a method for generating a data definition language provided by an embodiment of the present disclosure;

[0020] Figure 4 It is a structural schematic diagram of a database creation device provided by an embodiment of the present disclosure;

[0021] Figure 5 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0022] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0024] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0025] Figure 1 1 is a flowchart of a database creation method provided by an embodiment of the present disclosure, and the method can be executed by a database creation device. Figure 1 As shown, the database creation method provided in this embodiment includes the following steps:

[0026] S101. Obtain a target logical model and a target database type corresponding to a target database to be created. The target logical model includes at least one logical entity, a logical attribute corresponding to at least one logical entity, and a logical attribute type conversion table. The logical entity is used to represent an abstract description of a physical table. The logical attribute is used to represent an abstract description of a field and an index. The logical attribute type conversion table is used to represent a conversion relationship between a first field type in the target logical model and a second field type in a database of at least one database type.

[0027] In the disclosed embodiment, the database includes at least one physical table, each physical table includes at least one field and index, the logical model can be understood as an abstract description of the database, the logical entity can be understood as an abstract description of the physical table, the logical attribute can be understood as an abstract description of the field and the index, the logical model includes at least one logical entity and the logical attribute corresponding to the logical entity, and the logical attribute type conversion table is used to record the conversion relationship between the first field type abstracted in the logical model and the second field type concrete in the database of at least one database type, and the logical model also includes a logical attribute type conversion table. Among them, a logical entity can correspond to one or more logical attributes, and a logical attribute corresponds to a record in the logical attribute type conversion table.

[0028] Specifically, the logical entity includes at least one of the name, comment, and code of the physical table; the logical attribute includes at least one of the name, type, length, comment, code, grouping of the field, and the index type of the index; and may also include whether it is empty, etc., which are not limited here.

[0029] In the disclosed embodiment, the logical entity provides an overall description of the physical table. Through the logical entity, the user can easily create, manage and identify different physical tables. The logical attribute provides a detailed description of the fields and indexes. The user can understand the properties and uses of the fields and indexes through the logical attributes. The logical attribute type conversion table provides a conversion relationship between the first field type in the logical attribute and the second field type in the physical table, realizing an abstract description of the physical table or an entity projection of the logical model. The user can restore the abstract definition in the management system to the fields under different database designs through the logical attribute type conversion table.

[0030] The database type in the embodiments of the present disclosure may be some commonly used specific database types, such as MySQL, PostgreSQL, Oracle, SQL Server, Redis, MongoDB, etc., which are not limited here.

[0031] In the embodiment of the present disclosure, the database creation device may obtain a target logical model corresponding to the target database to be created and a target database type of the target database.

[0032] In an exemplary implementation of the embodiment of the present disclosure, the database creation device may obtain the target logical model and the target database type uploaded by the user through a preset information upload interface.

[0033] S102: Create a target database based on the target database type and the target logical model. The target database includes physical tables corresponding to logical entities and fields and indexes corresponding to logical attributes.

[0034] In the embodiment of the present disclosure, after acquiring the target database type and the target logical model, the database creation device can create a target database of the target database type according to the information contained in the target logical model. The target database type may include one database type or multiple database types. When the target database type includes multiple database types, the database creation device may create one target database for each database type, thereby creating multiple databases of different database types with the same data content at one time.

[0035] In an exemplary implementation of the disclosed embodiment, a database creation device may create corresponding physical tables according to logical entities in a target logical model, and then determine the logical attributes and logical attribute type conversion tables corresponding to each physical table according to the correspondence between the logical entities and the logical attributes and the logical attribute type conversion tables, and then create fields and indexes for each physical table to obtain a target database of the target database type.

[0036] Optionally, the logical attribute also includes an association relationship between fields of different physical tables in the target database, and the association relationship is used to define a foreign key in the target database. For example, the logical attribute of the current field in the current physical table may include unique identification information of another field in the logical attribute corresponding to another physical table, and the database creation device may establish a foreign key constraint between the current field in the current physical table and another field in another physical table.

[0037] The disclosed embodiment obtains a target logical model and a target database type of a target database corresponding to a target database to be created, wherein the target logical model includes at least one logical entity, a logical attribute corresponding to at least one logical entity, and a logical attribute type conversion table, wherein the logical entity is used to represent an abstract description of a physical table, the logical attribute is used to represent an abstract description of a field and an index, and the logical attribute type conversion table is used to represent a conversion relationship between a first field type in the target logical model and a second field type in a database of at least one database type. The target database is created based on the target database type and the target logical model, wherein the target database includes physical tables corresponding to the logical entities and fields and indexes corresponding to the logical attributes. The target database of the corresponding type can be automatically created according to the logical model and database type of the database to be created, and especially when multiple types of databases need to be created for the same database content, the time for manual code writing and database creation can be saved, the operation complexity can be reduced, and the development efficiency can be improved.

[0038] Figure 2 is a flow chart of a method for creating a target database provided by an embodiment of the present disclosure, such as Figure 2 As shown, based on the above embodiment, the target database can be created by the following method.

[0039] S201 . Generate a data definition language corresponding to a target database based on a target database type and a target logical model.

[0040] The data definition language (DDL) in the disclosed embodiment can be understood as a language that is centrally responsible for data structure definition and database object definition in the SQL language, allowing database administrators, developers and other users to create, modify and delete database objects such as physical tables and indexes.

[0041] In the disclosed embodiment, after acquiring the target logical model, the database creation device can establish a data definition language of the target database type according to the logical entities, logical attributes and logical attribute type conversion table included in the target logical model.

[0042] In an exemplary implementation of the disclosed embodiment, the database creation device may first traverse each logical entity in the target logical model, and for each logical entity, further parse all its logical attributes, including the logical attributes of the field, index information, foreign key relationships, etc., and then determine the second field type of each field in the physical table in combination with the logical attribute type conversion table. After the information is extracted, according to the target database type, a DDL template of the target database type is selected from the pre-acquired DDL templates, and the extracted information is filled into the DDL template to obtain the data definition language corresponding to the target database.

[0043] S202: Execute the data definition language to obtain a created target database.

[0044] In the embodiment of the present disclosure, the database creation device can execute the data definition language after the data definition language is generated, and obtain the created target database according to the execution result.

[0045] In an exemplary implementation of the present disclosure, the database creation device can execute the data definition language through a database management tool (such as SQL Server Management Studio, MySQL Workbench, etc.) or a command line tool (such as mysql command line client, psql, etc.), and after the execution is completed, check whether the target database has been created from a preset storage location.

[0046] The disclosed embodiment generates a data definition language corresponding to a target database based on a target database type and a target logical model, executes the data definition language, and obtains a created target database. The data definition language can be automatically generated and executed, thereby reducing the workload of manually writing and checking database scripts and improving development efficiency.

[0047] Figure 3 is a flow chart of a method for generating a data definition language provided by an embodiment of the present disclosure, such as Figure 3 As shown, based on the above embodiment, the data definition language can be generated by the following method.

[0048] S301. Determine a second field type of at least one field corresponding to a logical attribute in a target database based on a logical attribute type conversion table and a target database type.

[0049] In the disclosed embodiment, the logical attribute type conversion table includes description information of the data type of the field in the logical model (i.e., the first field type), and also includes the data type of the field in the database of each database type (i.e., the second field type). For example, when the first field type is a Boolean value, the second field type of the SQL Server database type is BIT, and the second field type of the MySQL database type is TINYINT.

[0050] In the disclosed embodiment, the database creation device may determine, for each field, a first field type corresponding to the logical attribute of the field, and then determine, in a logical attribute type conversion table, a second field type corresponding to the first field type according to the target database type.

[0051] In an exemplary implementation of the disclosed embodiment, the database creation device can determine, for each field, the row and column where the second field type corresponding to the field in the logical attribute type conversion table is located according to the first field type in the logical attribute and the target database type, and then determine the second field type corresponding to the field.

[0052] S302: Generate a data definition language corresponding to the target database based on the logical entity, the logical attribute, and the second field type of at least one field corresponding to the logical attribute in the target database.

[0053] In the disclosed embodiment, after determining the second field type of each field in the target database, the database creation device can generate a data definition language corresponding to the target database based on the logical entity, logical attribute and the second field type corresponding to each field.

[0054] The disclosed embodiment determines the second field type of at least one field corresponding to the logical attribute in the target database based on the logical attribute type conversion table and the target database type, and generates the data definition language corresponding to the target database based on the logical entity, the logical attribute and the second field type of at least one field corresponding to the logical attribute in the target database, thereby ensuring that all fields meet the requirements of the target database system and avoiding errors when creating or running the target database.

[0055] In some embodiments of the present disclosure, the database creation device can extract the logical model corresponding to the original database from the created original database, and determine the logical model corresponding to the original database as the target logical model, and the database type of the original database is different from the target database type.

[0056] Specifically, the database creation device can respond to the user's instruction to convert the database type of the created original database, extract the logical model corresponding to the original database from the original database to be converted, and determine the logical model corresponding to the original database as the target logical model, and then create the target database based on the target database type of the converted target database input by the user, thereby realizing automatic conversion of the database type.

[0057] In other embodiments of the present disclosure, when there are multiple databases with the same logical model but different database types, the database creation device can modify the logical model in response to the user's modification instruction, and after the modification is completed, create a new database for each original database type based on the modified logical model, thereby achieving unified management of multiple databases of different types and reducing the number of databases that the administrator needs to manage. The database creation device can also access multiple databases through a unified access interface in response to the user's access instruction, reducing the number of different database types that the administrator needs to learn and manage, and improving the administrator's overall visibility of the database.

[0058] Figure 4 Schematic diagram of a database creation device provided by an embodiment of the present disclosure. Figure 4 As shown, the database creation device 400 includes: an acquisition module 410 and a creation module 420, wherein the acquisition module 410 is used to acquire a target logical model corresponding to a target database to be created and a target database type of the target database, wherein the target logical model includes at least one logical entity, at least one logical attribute corresponding to the logical entity, and a logical attribute type conversion table, wherein the logical entity is used to represent an abstract description of a physical table, the logical attribute is used to represent an abstract description of a field and an index, and the logical attribute type conversion table is used to represent a conversion relationship between a first field type of a field in the target logical model and a second field type in a database of at least one database type; and the creation module 420 is used to create the target database based on the target database type and the target logical model, wherein the target database includes a physical table corresponding to the logical entity and a field and index corresponding to the logical attribute.

[0059] Optionally, the creation module 420 includes: a generation unit, used to generate a data definition language corresponding to the target database based on the target database type and the target logical model; and an execution unit, used to execute the data definition language to obtain the created target database.

[0060] Optionally, the generating unit comprises: a determining subunit for determining, based on the logical attribute type conversion table and the target database type, a second field type of at least one field corresponding to the logical attribute in the target database; and a generating subunit for generating a data definition language corresponding to the target database based on the logical entity, the logical attribute and the second field type of at least one field corresponding to the logical attribute in the target database.

[0061] Optionally, the logical entity includes at least one of a name, comment, and code of a physical table, and the logical attribute includes at least one of a name, type, length, comment, code, grouping of a field, and an index type of an index.

[0062] Optionally, the logical attribute further includes an association relationship between fields of different physical tables in the target database, and the association relationship is used to define a foreign key in the target database.

[0063] Optionally, the acquisition module 410 is specifically used to extract the logical model corresponding to the original database from the created original database, and determine the logical model corresponding to the original database as the target logical model, and the database type of the original database is different from the target database type.

[0064] The database creation device provided in this embodiment can execute the method described in any of the above embodiments. Its execution method and beneficial effects are similar and will not be described in detail here.

[0065] Figure 5 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.

[0066] like Figure 5 As shown, the computer device may include a processor 510 and a memory 520 storing computer program instructions.

[0067] Specifically, the processor 510 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0068] The memory 520 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 520 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 520 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 520 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 520 is a non-volatile solid-state memory. In a particular embodiment, the memory 520 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM), or a flash memory, or a combination of two or more of these.

[0069] The processor 510 reads and executes the computer program instructions stored in the memory 520 to perform the steps of the database creation method provided in the embodiment of the present disclosure.

[0070] In one example, the computer device may further include a transceiver 530 and a bus 540. Figure 5 As shown, the processor 510, the memory 520 and the transceiver 530 are connected via a bus 540 and communicate with each other.

[0071] The bus 540 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a Memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 540 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.

[0072] The embodiment of the present disclosure further provides a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the database creation method provided by the embodiment of the present disclosure.

[0073] The above-mentioned storage medium may, for example, include a memory 520 of computer program instructions, and the above-mentioned instructions may be executed by the processor 510 of the database creation device to complete the database creation method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc. The above-mentioned computer program may be written in any combination of one or more programming languages ​​to perform the program code of the operation of the embodiment of the present disclosure, and the programming language includes an object-oriented programming language, such as Java, C++, etc., and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device, partially on the remote computing device, or completely on the remote computing device or server.

[0074] The embodiment of the present disclosure also provides a computer program product, including a computer program. When the computer program is executed by a processor, the processor implements the database creation method provided by the embodiment of the present disclosure.

[0075] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0076] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for creating a database, characterized in that: include: Acquire a target logical model corresponding to a target database to be created and a target database type of the target database, wherein the target logical model includes at least one logical entity, at least one logical attribute corresponding to the logical entity, and a logical attribute type conversion table, wherein the logical entity is used to represent an abstract description of a physical table, the logical attribute is used to represent an abstract description of a field and an index, and the logical attribute type conversion table is used to represent a conversion relationship between a first field type of a field in the target logical model and a second field type in a database of at least one database type; The target database is created based on the target database type and the target logical model. The target database includes physical tables corresponding to the logical entities and fields and indexes corresponding to the logical attributes.

2. The method according to claim 1, characterized in that The creating the target database based on the target database type and the target logical model includes: Generate a data definition language corresponding to the target database based on the target database type and the target logical model; The data definition language is executed to obtain the target database that has been created.

3. The method according to claim 2, characterized in that The step of generating a data definition language corresponding to the target database based on the target database type and the target logical model includes: Determine, based on the logical attribute type conversion table and the target database type, a second field type of at least one field corresponding to the logical attribute in the target database; A data definition language corresponding to the target database is generated based on the logical entity, the logical attribute, and a second field type in the target database of at least one field corresponding to the logical attribute.

4. The method according to claim 1, characterized in that The logical entity includes at least one of the name, comment, and code of the physical table, and the logical attribute includes at least one of the name, type, length, comment, code, grouping of the field, and index type of the index.

5. The method according to claim 4, characterized in that The logical attributes further include association relationships between fields of different physical tables in the target database, and the association relationships are used to define foreign keys in the target database.

6. The method according to claim 1, characterized in that The step of obtaining a target logical model corresponding to a target database to be created includes: A logical model corresponding to the original database is extracted from the created original database, and the logical model corresponding to the original database is determined as the target logical model, wherein the database type of the original database is different from the type of the target database.

7. A database creation device, characterized in that: include: an acquisition module, configured to acquire a target logical model corresponding to a target database to be created and a target database type of the target database, wherein the target logical model includes at least one logical entity, at least one logical attribute corresponding to the logical entity, and a logical attribute type conversion table, wherein the logical entity is used to represent an abstract description of a physical table, the logical attribute is used to represent an abstract description of a field and an index, and the logical attribute type conversion table is used to represent a conversion relationship between a first field type of a field in the target logical model and a second field type in a database of at least one database type; A creation module is used to create the target database based on the target database type and the target logical model, wherein the target database includes a physical table corresponding to the logical entity and a field and index corresponding to the logical attribute.

8. A computer device, characterized in that: include: Memory; processor; and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the database creation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the database creation method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the database creation method according to any one of claims 1 to 6 is implemented.