Introduction
Introduction to Modal Creation
A modal represents the schema or interface of a table in the database. It defines the structure of data that will be stored, including the fields (columns) and their corresponding data types. Modals are essential for maintaining data integrity and ensuring that the database structure follows a clear and organized model.
In this interface, you can visually create, edit, and manage modals. The modal creation tool allows you to design the structure of your tables by adding columns, specifying their data types, and configuring their properties.
Simplified Modal Creation
To simplify the process of modal creation, we offer two options: TableModal and Modal.
-
TableModal:
- This option lets you create a modal by selecting an existing table from the connected database.
- After selecting TableModal, the interface will show the tables from your selected connection (e.g.,
EmployeDetailsdbDevelopment
in the image). You can choose one of these tables to quickly generate a modal, which already contains the fields and structure of the selected table. - This makes it easy to create modals without manually defining fields from scratch, speeding up the process for existing databases.
-
Modal:
- This option allows you to create a modal from scratch. You can define the fields, data types, and properties manually.
- This is useful when creating new tables or when you need full control over the schema definition.
Key Features of Modal Creation:
-
Field Definitions:
- You can add fields (columns) to the modal, specifying the field name and its data type (e.g., String, Number).
- Example: In the image, the modal
newmodal
contains the fieldsid
,pk
, andname
.
-
Data Types:
- Each field has a defined data type, such as
String
,Number
,Boolean
, etc. - This ensures that the data stored in the database adheres to the specified format.
- Each field has a defined data type, such as
-
Connection to Database:
- You can select the connection to the database from the interface. In the example, the modal is connected to the
EmployeDetailsdbDevelopment
MySQL database.
- You can select the connection to the database from the interface. In the example, the modal is connected to the
-
Table Representation:
- The modal visually represents the schema of the table, providing an easy-to-understand layout for managing database tables.
- Columns can be added, modified, or deleted from the modal interface.
-
Actions:
- Edit Modal: Modify the schema by editing field names or data types.
- Delete Modal: Remove the modal entirely if it is no longer needed.
- Save Modal: Save your changes to apply them to the actual database.
Advantages of TableModal:
- Quick Setup: If the table already exists in the connected database, you can quickly generate a modal by selecting it from the list. This is ideal when working with an existing database structure.
- Consistency: Ensures that the modal aligns perfectly with the table schema, reducing the risk of human errors during manual modal creation.
- Efficiency: Saves time by eliminating the need to manually input fields and their data types.
This visual interface simplifies the process of table schema creation, ensuring that database structures are consistent and easy to manage. You have the flexibility to either select an existing table using TableModal or create a new modal from scratch with Modal.