Understanding the Database Structure of the Batoi RAD Framework
When we embark on the journey of utilizing the Batoi RAD Framework for our application development, one of the first steps involves an understanding of the database structure it sets up. This article aims to provide a comprehensive walkthrough of the 19 key database tables (each table name starts with s_) that get created when we install the Batoi RAD Framework. These tables serve as the backbone for storing application-specific data and ensuring smooth operations.
Common Fields along with attributes for all the tables:
Each table comes pre-configured with certain common fields that provide crucial information:
id
: Stores a unique bigint(20) identifier.uid
: Uses a char(36) to universally identify records.livestatus
: An Enum field representing the active status of a record, with values like 0 (inactive), 1 (active), 2 (archive), and 3 (suspended).versioncode
: An int(11) that keeps track of record versions.wf_status
: Stores workflow state of the record.space_id
: If the table stores SaaS data, it’s used, else the value stored here is 0.createdby & updatedby
: Both bigint(20) fields that identify who created or last updated a record.createstamp & updatestamp
: Timestamps indicating when a record was created or last modified.
In-Depth Table Descriptions
Below are detailed explanations of each table, along with their fields and attributes.
Table Name | Description | Fields along with attributes and explanation |
---|---|---|
s_config |
Both systems and application parameters and their values are stored here. |
|
s_data_field |
The fields of the application data tables are stored here. |
|
s_data_field_group |
The group information, if any, of data fields are stored here. |
|
s_data_field_type |
The master table for type information for data fields |
|
s_data_method |
The methods of the microcontroller are stored here. |
|
s_data_wf |
The workflow state information is stored here. |
|
s_entity |
The information of entities User and API are stored here. |
|
s_entity_session |
The user and API sessions are stored here. |
|
s_external_notification |
The external notifications (like email and SMS logs) are stored here. |
|
s_ms |
The information of microservices are stored here. |
|
s_mscontroller |
Information about microservice controllers are stored here. |
|
s_msroute |
Information of microservice routes are stored here. |
|
s_notification |
The in-app notification logs are stored here. |
|
s_queue |
The job queues are stored here. |
|
s_role |
The information of user roles are stored here. |
|
s_sso_provider |
The information of allowed SSO providers is stored here. |
|
s_space |
Information of SaaS tenants are stored here. |
|
These tables are critical for both built-in and custom applications using the Batoi RAD Framework. Whether you're looking to build a scalable e-commerce platform, a high-utility app, or anything in between, having a solid grasp of these tables will serve as a strong foundation for your development journey.
Conclusion
Understanding the Batoi RAD Framework’s database architecture is key to effectively leveraging its capabilities for robust, scalable, and secure application development. As we continue to work on projects, the knowledge of these tables and their functions becomes invaluable for efficient development and debugging.