🗃 AppStruct Database
The AppStruct Backend works as a table-based database that offers essential data management functionality without the overhead of complex backend operations. This makes it perfect for apps with straightforward data requirements and for businesses that need a quick, reliable way to manage their data.
Introduction
- Simplicity at Its Core: The AppStruct Backend is designed as a simple table where data is stored in rows and columns. It is perfect for applications that do not require complex relational databases or heavy backend logic.
- Ideal for SMBs: Suitable for small and medium-sized businesses—such as e-commerce, restaurants, and delivery services—that need a straightforward backend for handling user data, orders, inventory, and more.
Main Aspects
- From your AppStruct dashboard, navigate to the Backend section marked with the AppStruct logo.
- Upon entering the backend, you will see a default table named “Users”. This table is created automatically for handling user authentication, so do not delete it.
- Click the “+ Create table” button.
- Give your new table a name (e.g., “cars”). A new table will then be generated.
Import & Export Data
- If you have an existing data source, click “+ Import”.
- From the dropdown menu, choose your data source type (e.g., CSV, Excel, or Google Sheet) and follow the prompts to import your data.
- To export your table data, click “Export CSV”. This will download the table data in CSV format.
- To delete a table, click “Delete”. (Be cautious—deleting a table is irreversible and may affect your app if it’s in use.)
Managing Table Relationships:
- Click on “Add relation” to open a modal screen.
- In this modal, select the target table with which you want to establish a relationship and choose the type of relation (e.g., one-to-many, many-to-many).
Creating and Customizing a Table
Adding Columns
- Click the “Add column” button within your table.
- A pop-up screen will appear where you can enter the column name and select the data type.
- The available data types include options such as text, number, date, boolean, image, and more. Choose the one that best fits the data you plan to store.
Adding Rows
- Add Row:
- Click the “Add row” button.
- A pop-up screen will appear allowing you to insert information for each column. For example, for a table named “cars”, you might have the following columns:
- ID: (Optional – if you don’t insert it, an ID will be generated automatically.)
- Name
- Price
- Horsepower
- Image
- Filling in Data:
- Enter the appropriate data for each column. This process allows you to build your dataset directly within AppStruct.
Corrections
Once you have a table with all necessary columns and rows, AppStruct provides easy-to-use tools to make corrections and manage your data.
Editing Rows
- Click on the pencil icon (✏️) next to a row to edit its data.
- A pop-up screen will appear, allowing you to change the information for all fields in that row.
- After making your edits, click Save to update the row.
Reordering and Deleting Columns
- Click on the chevron icon (▼ or ▲) next to a column name.
- A menu will open, enabling you to drag and drop columns into your desired order.
- Within the same menu accessed by clicking the chevron, you also have the option to delete the column if it is no longer needed.
- Caution: Deleting a column will remove all associated data.
Bulk Row Deletion
- Click on the checkbox at the beginning of each row to select it.
- You can select multiple rows at once.
- Once you have selected the rows you wish to delete, click on the Delete button to remove them in bulk.
- Confirm the deletion if prompted.
Best Practices
- Keep the “Users” Table Intact: The default “Users” table is critical for authentication. Avoid modifying it unless you are certain of the consequences.
- Plan Your Data Structure: Before adding columns and rows, plan out the data fields your app will require. This helps maintain consistency and scalability.
- Use Import When Possible: If you already have data in CSV, Excel, or Google Sheets, use the Import function to save time and reduce errors.
- Establish Clear Relationships: When using Add relation, clearly define how tables relate to one another to maintain data integrity.
- Regular Exports: Regularly export your table data to keep backups and for external analysis if needed.
Need Assistance?
If you encounter any challenges or require further guidance while building your app, please refer to the Documentation or, contact our support team at [email protected].