🗃 AppStruct Database
The AppStruct Native Database is a built-in backend solution that provides seamless data management for your no-code applications. Designed for rapid development and immediate productivity, it offers zero-configuration setup with powerful table-based data storage and management.
Overview
What is AppStruct Database?
AppStruct Database is a cloud-native, table-based database that integrates directly with your AppStruct applications:
- Zero Configuration: Ready to use immediately - no setup required
- Visual Management: Create and manage tables through an intuitive interface
- Automatic Integration: Seamlessly works with AppStruct workflows and components
- Secure by Default: Built-in security and access control
- Scalable: Handles everything from prototypes to production applications
Key Features
- Instant Setup: Create database with one click
- Visual Table Designer: Build tables without SQL knowledge
- Advanced Column Types: Text, Number, Boolean, Image, and Foreign Key support
- Table Relationships: Link tables together with foreign keys
- CRUD Operations: Create, read, update, and delete data easily
- Import/Export Tools: CSV, Excel, and Google Sheets integration
- Column Permissions: Fine-grained access control at the column level
- Bulk Operations: Multi-row selection and batch operations
- Real-time Updates: Live data synchronization across your app
- Workflow Integration: Direct integration with AppStruct actions and workflows
Getting Started
Creating Your Database
When you first access the AppStruct Database section, you'll be prompted to create your project database:
-
Navigate to Backend Section:
- From your AppStruct project, click on the Backend tab
- Select AppStruct Database (the first option with the AppStruct logo)
-
Create Database:
- Click "Create Database" if this is your first time
- The system will automatically set up your database infrastructure
- This process takes just a few seconds
-
Database Ready:
- Once created, your database is immediately ready for use
- You can start creating tables and adding data right away
Understanding the Interface
Database Dashboard:
- Create Table Button: Add new tables to your database
- Table List: View all tables in your project
- Import Tools: CSV, Excel, and Google Sheets import options
- Table Management: Access table settings and data
Table Operations:
- View Data: Browse and edit table contents
- Add Columns: Extend table structure with different data types
- Add Rows: Insert new data records
- Bulk Operations: Select and delete multiple rows
- Column Reordering: Drag and drop to reorder columns
- Export Data: Export table data as CSV
- Set Permissions: Configure column-level access control
Column Types and Data Management
Available Column Types
AppStruct Database supports multiple data types to handle different kinds of information:
Text:
- Store text strings, names, descriptions, and other textual data
- Ideal for user names, descriptions, categories, and free-form text
- Supports text search and filtering
Number:
- Store numeric values including integers and decimals
- Perfect for quantities, prices, scores, and calculations
- Supports mathematical operations and numeric filtering
Boolean:
- Store true/false values with toggle interface
- Great for settings, flags, and yes/no questions
- Displays as an interactive toggle switch
Image:
- Store image URLs with upload functionality
- Built-in image upload interface
- Automatic image preview in table view
- Supports common image formats
Foreign Key:
- Link records between different tables
- Create relationships and maintain data integrity
- Dropdown selection from related table records
- Automatic data validation
Managing Columns
Adding New Columns:
- Click "Add Column": Open the column creation dialog
- Enter Column Name: Follow naming rules (letters, numbers, underscores only)
- Select Data Type: Choose from Text, Number, Boolean, Image, or Foreign Key
- Configure Relationships: For Foreign Key columns, select the target table
- Save Column: The new column appears in your table
Column Operations:
- Reorder Columns: Drag and drop columns to change their order
- Set Permissions: Control who can view and edit column data
- Delete Columns: Remove columns with confirmation dialog
- Edit Data: Click cells to edit values inline or use row edit modal
Table Relationships
Creating Foreign Key Relationships:
- Add Foreign Key Column: Select "Foreign Key" as the column type
- Choose Target Table: Select which table this column should reference
- Map Display Field: Choose which field from the target table to display
- Save Relationship: The foreign key column is created
Using Relationships:
- Dropdown Selection: Choose related records from a dropdown menu
- Data Integrity: Automatic validation ensures referenced records exist
- Navigation: Click related records to view connected data
- Cascading Updates: Changes to referenced records reflect automatically
Relationship Examples:
- Users → Orders: Link orders to the user who placed them
- Products → Categories: Connect products to their categories
- Posts → Authors: Associate blog posts with their authors
Data Import and Export
Import Options
AppStruct Database supports multiple import formats to help you migrate existing data:
CSV Import:
- Click Import → CSV: Select CSV import option
- Choose File: Upload your CSV file from your computer
- Automatic Processing: Data is parsed and imported automatically
- Column Mapping: New columns are created as needed
- Data Validation: Invalid data is flagged for review
Excel Import:
- Click Import → Excel: Select Excel import option
- Upload File: Support for .xlsx and .xls formats
- Sheet Processing: Data from the first sheet is imported
- Type Detection: Column types are automatically detected
- Bulk Import: Large datasets are processed efficiently
Google Sheets Import:
- Click Import → Google Sheet: Open Google Sheets import dialog
- Enter Sheet URL: Paste the public Google Sheets URL
- Access Validation: Ensure the sheet is publicly accessible
- Import Data: Data is fetched and imported directly
- Real-time Sync: Option for ongoing synchronization
Export Options
CSV Export:
- Full Table Export: Download complete table data as CSV
- Filtered Export: Export only visible/filtered data
- Custom Formatting: Proper handling of different data types
- Large Dataset Support: Efficient export of thousands of records
Export Process:
- Click Export CSV: Button available in table header
- Processing: Data is prepared for download
- Download File: CSV file downloads automatically
- Open Anywhere: Use exported data in Excel, Google Sheets, or other tools
Import Best Practices
Data Preparation:
- Clean Headers: Use simple column names without special characters
- Consistent Formatting: Ensure data types are consistent within columns
- Remove Empty Rows: Clean up your data before import
- Backup Original: Keep a copy of your original data
Column Mapping:
- Match Names: Use similar column names to existing table columns
- Data Types: Ensure imported data matches expected column types
- Required Fields: Include all required columns in your import file
- Validation: Review imported data for accuracy
Security and Permissions
Column-Level Permissions
AppStruct Database provides fine-grained access control at the column level:
Permission Types:
- View Access: Control who can see column data
- Edit Access: Control who can modify column data
Access Levels:
- Everyone: All users can access (default)
- Only Logged In Users: Requires user authentication
- Only the Record Creator: Only the user who created the record
- Nobody: No access (hidden column)
Setting Up Permissions
Configure Column Permissions:
- Open Column Settings: Click the settings icon next to column name
- Select Permissions: Choose "Permissions" from the dropdown menu
- Set View Access: Choose who can view the data in this column
- Set Edit Access: Choose who can modify the data in this column
- Save Permissions: Apply the new permission settings
Permission Examples:
- Personal Data: Set "Only the Record Creator" for sensitive user information
- Admin Fields: Set "Nobody" for internal administrative columns
- Public Data: Keep "Everyone" for publicly viewable information
- User Content: Set "Only Logged In Users" for authenticated content
Security Features
Built-in Security:
- Data Encryption: All data encrypted in transit and at rest
- Access Logging: Track all data access and modifications
- Input Validation: Automatic validation prevents malicious input
- SQL Injection Protection: Parameterized queries prevent attacks
Best Security Practices:
- Principle of Least Privilege: Give minimum necessary access
- Regular Reviews: Periodically review and update permissions
- Sensitive Data Protection: Use restrictive permissions for personal data
- Testing: Test permission settings with different user roles
Database Operations
Database Request Actions
AppStruct Database operations are performed through Database Request actions in your app's workflows. These actions provide a visual, no-code way to interact with your database.
Available Operations:
- Select: Retrieve data from your database tables
- Insert: Add new records to your database
- Update: Modify existing records
- Delete: Remove records from your database
How It Works:
- Add Database Request Action: Add a "Database Request" action to any workflow trigger
- Choose Backend: Select "AppStruct" as your backend platform
- Select Table: Choose which table to interact with
- Choose Method: Pick Select, Insert, Update, or Delete
- Map Elements: Visually connect your UI elements to database columns
- Set Conditions: Use the visual condition builder for filters
Setting Up Database Request Actions
Step 1: Add the Action
- Open Workflow Settings: Click on any UI element (button, form, etc.)
- Add Action: Click "Add Action" and select "Database Request"
- Choose Backend Platform: Select "AppStruct" from the dropdown
Step 2: Configure the Request
- Select Table: Choose your target table from the dropdown
- Choose Method: Select the operation type:
- Select: Get data from the database
- Insert: Add new data to the database
- Update: Modify existing data
- Delete: Remove data from the database
Step 3: Map UI Elements to Database Columns
- Connect Components: Click "Connect to component" to add a new mapping
- Select Database Column: Choose which column to work with
- Choose UI Element: Select where to save data (for Select) or get data from (for Insert/Update)
- Set Element Property: Pick which property of the UI element to use (text, value, etc.)
Working with Different Operations
Select (Get Data):
- Single Record: Get one specific record
- List of Records: Get multiple records (toggle "List of rows")
- Add Filters: Use visual condition builder to filter results
- Map to Elements: Choose where to display the retrieved data
Insert (Add Data):
- Map Form Fields: Connect form inputs to database columns
- Set Values: Map UI element values to corresponding database fields
- Validation: Data validation happens automatically based on column types
Update (Modify Data):
- Add Filters: Specify which records to update using visual conditions
- Map Changes: Connect UI elements containing new values to database columns
- Conditional Updates: Use filters to update only specific records
Delete (Remove Data):
- Add Filters: Specify which records to delete using visual conditions
- Safety First: Always use specific filters to avoid deleting wrong data
- Confirmation: Consider adding confirmation dialogs before delete actions
Visual Condition Builder
Adding Filters:
- Click "Add Filters": Add conditions to your database request
- Choose Column: Select which database column to filter on
- Select Operator: Choose comparison type (equals, greater than, contains, etc.)
- Set Value: Specify the filter value (can be static text or from UI elements)
- Multiple Conditions: Add multiple filters with AND/OR logic
Common Filter Examples:
- User-Specific Data: Filter by
user_id
equals current user - Status Filtering: Filter by
status
equals "active" - Date Ranges: Filter by
created_at
greater than specific date - Text Search: Filter by
name
contains search input value
Advanced Features
Bulk Operations
Multi-Row Selection:
- Select Individual Rows: Click checkboxes to select specific rows
- Select All: Use header checkbox to select all visible rows
- Bulk Delete: Delete multiple selected rows at once
- Visual Feedback: Selected rows are clearly highlighted
Bulk Operation Process:
- Select Rows: Check the boxes next to rows you want to operate on
- Choose Action: Click "Delete Rows" button when rows are selected
- Confirm Action: Confirm the bulk operation in the dialog
- Process Results: Operation is applied to all selected rows
Data Editing
Inline Editing:
- Double-Click to Edit: Double-click any cell to edit its value
- Type-Specific Editors: Different input types for different column types
- Auto-Save: Changes are saved automatically when you finish editing
- Validation: Real-time validation prevents invalid data entry
Row Edit Modal:
- Edit Icon: Click the edit icon to open full row editor
- All Columns: Edit all columns for a record in one place
- Image Upload: Upload images directly for image columns
- Foreign Key Selection: Choose related records from dropdown menus
- Save Changes: Apply all changes at once
Table Management
Column Reordering:
- Open Reorder Modal: Click "Reorder column" in column settings
- Drag and Drop: Drag columns to change their order
- Visual Feedback: See real-time preview of new order
- Save Order: Apply the new column arrangement
Table Operations:
- Add Relations: Create foreign key relationships between tables
- Delete Tables: Remove entire tables (with confirmation)
- Export Data: Download table contents as CSV files
- Import Data: Add data from CSV, Excel, or Google Sheets
Integration with AppStruct
Visual Element Mapping
Element-to-Database Mapping: AppStruct uses a visual mapping system to connect your UI elements with database columns:
- No Code Required: Everything is done through visual interfaces
- Drag and Drop: Connect elements to database columns visually
- Property Selection: Choose which element property to use (text, value, checked, etc.)
- Real-time Preview: See how data flows between your UI and database
Supported Element Properties:
- Text Elements: Map to
innerText
property for display - Input Fields: Map to
value
property for user input - Images: Map to
src
property for image URLs - Checkboxes: Map to
checked
property for boolean values - Dropdowns: Map to
value
property for selected options
Workflow Integration
Common Workflow Patterns:
Form Submission → Database Insert:
- User fills form → Form elements collect data
- Submit button clicked → Triggers Database Request action
- Insert method → Adds new record to database
- Form fields mapped → To corresponding database columns
- Success feedback → User sees confirmation
Data Display → Database Select:
- Page loads → Triggers Database Request action
- Select method → Retrieves data from database
- Filter applied → Shows only relevant records
- Data mapped → To display elements (tables, lists, cards)
- UI updates → Shows retrieved data
Search Feature → Filtered Select:
- User types in search → Search input captures text
- Search triggered → Database Request action fires
- Filter condition → Uses search input as filter value
- Results returned → Filtered records retrieved
- Results displayed → Mapped to result display elements
Backend Platform Selection
AppStruct vs Supabase: The same Database Request action works with both:
- AppStruct Database: Select "AppStruct" as backend platform
- Supabase: Select "Supabase" as backend platform
- Same Interface: Identical setup process for both
- Seamless Switching: Easy to change between backends
Real-time Updates
Automatic Synchronization:
- Live Data: Changes to database automatically update your app UI
- Multi-User: Multiple users see changes instantly
- No Refresh Needed: UI updates automatically when data changes
- Optimized Performance: Only changed data is transmitted
How It Works:
- Database Changes: Any insert, update, or delete operation
- Automatic Detection: AppStruct detects the change
- UI Refresh: Elements mapped to changed data update automatically
- Real-time Experience: Users see changes immediately
Error Handling and Validation
Built-in Safety:
- Data Type Validation: Automatic checking of data types
- Required Field Checking: Ensures required data is provided
- Connection Monitoring: Handles network interruptions gracefully
- User Feedback: Clear error messages for users
Common Error Scenarios:
- Missing Required Data: Clear indication of which fields are required
- Invalid Data Types: Automatic conversion where possible
- Network Issues: Retry mechanisms and offline queuing
- Permission Errors: Clear messaging about access restrictions
Best Practices
Database Design
Table Structure:
- Plan Your Schema: Design your table relationships before creating tables
- Use Descriptive Names: Choose clear, meaningful table and column names
- Normalize Data: Avoid duplicate data by using foreign key relationships
- Consider Growth: Plan for future data expansion and scaling needs
Column Types Selection:
- Text for Content: Use text columns for names, descriptions, and content
- Numbers for Calculations: Use number columns for quantities, prices, and metrics
- Booleans for Flags: Use boolean columns for on/off, yes/no type data
- Images for Media: Use image columns for photos, logos, and visual content
- Foreign Keys for Relationships: Link related data across tables
Data Management
Import/Export Strategy:
- Clean Data First: Prepare and validate data before importing
- Batch Operations: Use import tools for large datasets
- Regular Exports: Create backups by exporting your data regularly
- Test Imports: Try small batches first to verify import process
Permission Management:
- Start Restrictive: Begin with limited permissions and expand as needed
- Review Regularly: Audit permissions periodically for security
- Document Access: Keep track of who has access to what data
- User-Specific Data: Use "Record Creator" permissions for personal data
Performance Optimization
Efficient Queries:
- Use Specific Filters: Always filter data to get only what you need
- Limit Results: Use appropriate limits for large datasets
- Index Key Columns: Foreign key columns are automatically indexed
- Avoid Full Scans: Use filtered queries instead of loading all data
UI/UX Best Practices:
- Loading States: Show loading indicators during database operations
- Success Feedback: Confirm successful operations to users
- Error Messages: Provide clear, helpful error messages
- Optimistic Updates: Update UI immediately, sync with database in background
Common Use Cases
User Management System
Table Structure:
- Users Table: id, name, email, avatar (image), role, created_at
- User Profiles Table: user_id (foreign key), bio, location, preferences
- Activity Log Table: user_id (foreign key), action, timestamp
Implementation:
- User Registration: Form submission → Insert into Users table
- Profile Updates: Edit form → Update Users and User Profiles tables
- Activity Tracking: Actions → Insert into Activity Log table
- User Dashboard: Load user data → Display in profile components
Product Catalog
Table Structure:
- Categories Table: id, name, description, image
- Products Table: id, name, price (number), category_id (foreign key), image, active (boolean)
- Product Reviews Table: id, product_id (foreign key), user_id (foreign key), rating (number), comment
Implementation:
- Product Listing: Select products → Filter by category → Display in catalog
- Product Details: Select product by ID → Show full information
- Review System: Form submission → Insert review with foreign keys
- Category Management: Admin interface → CRUD operations on categories
Content Management
Table Structure:
- Authors Table: id, name, email, bio, avatar (image)
- Posts Table: id, title, content, author_id (foreign key), published (boolean), created_at
- Tags Table: id, name, color
- Post Tags Table: post_id (foreign key), tag_id (foreign key)
Implementation:
- Blog Posts: Create/edit forms → Insert/update Posts table
- Author Profiles: Author data → Display author information
- Tag System: Many-to-many relationship → Tag posts and filter by tags
- Publishing: Toggle published boolean → Control post visibility
Troubleshooting
Common Issues
Table Creation Problems:
- Invalid Table Name: Ensure name follows naming rules (starts with letter/underscore)
- Duplicate Names: Table names must be unique within your project
- Special Characters: Remove spaces and special characters from names
Data Entry Issues:
- Validation Errors: Check that data matches expected format
- Required Fields: Ensure all required fields have values
- Data Type Mismatches: Verify numbers are numeric, dates are valid dates
- Image Upload Failures: Check image format and file size limits
Import Problems:
- File Format: Ensure CSV/Excel files are properly formatted
- Column Names: Use simple column names without special characters
- Data Consistency: Check that data types match column expectations
- Large Files: Break large imports into smaller batches
Permission Issues:
- Access Denied: Check column permissions for affected users
- Visibility Problems: Verify view access settings
- Edit Restrictions: Confirm edit access permissions
- Creator-Only Data: Ensure correct user context for record creator permissions
Error Messages
"Database does not exist for this project":
- Solution: Click "Create Database" to initialize your project database
- Cause: First time accessing database, or database was accidentally deleted
"Table name must start with a letter or underscore":
- Solution: Rename table to start with a letter (a-z) or underscore (_)
- Cause: Table name starts with number or special character
"Column name must start with a letter or underscore":
- Solution: Use valid column names (letters, numbers, underscores only)
- Cause: Column name contains invalid characters
"Failed to upload image":
- Solution: Check image format (JPG, PNG, GIF) and file size
- Cause: Unsupported image format or file too large
Performance Issues
Slow Loading:
- Large Tables: Use filters to limit data retrieval
- Heavy Images: Optimize image sizes before upload
- Complex Queries: Simplify filters and conditions
- Network Issues: Check internet connection stability
Import/Export Delays:
- File Size: Break large files into smaller chunks
- Data Validation: Pre-validate data to avoid processing errors
- Concurrent Operations: Avoid multiple imports simultaneously
- Browser Limits: Use current browser versions for best performance
Limitations and Considerations
Current Limitations
Advanced Query Features:
- Complex Joins: Multi-table joins planned for future releases
- Aggregation Functions: SUM, COUNT, AVG operations in development
- Stored Procedures: Custom database functions planned
- Advanced Indexing: Custom index creation coming soon
Data Features:
- File Storage: Currently supports image URLs, file upload planned
- JSON Data: Support for JSON column types in development
- Audit Logging: Change tracking features being developed
- Data Versioning: Version control for data changes planned
Scale Considerations
Performance Guidelines:
- Record Limits: Optimal performance with tables under 10,000 records
- Column Limits: Recommended maximum of 50 columns per table
- Image Sizes: Keep images under 5MB for best performance
- Concurrent Users: Supports multiple users, performance may vary with load
Growth Planning:
- Data Migration: Plan for data export/import as you scale
- Performance Monitoring: Monitor query performance as data grows
- Backup Strategy: Regular exports recommended for large datasets
- Upgrade Path: Enterprise features available for larger applications
Roadmap and Future Features
Coming Soon
Advanced Query Features:
- Query Builder: Visual query construction interface
- Aggregation Functions: Built-in SUM, COUNT, AVG operations
- Complex Joins: Multi-table relationship queries
- Stored Procedures: Custom database functions and triggers
Enhanced Data Types:
- JSON Support: Store and query JSON data structures
- File Upload: Direct file storage and management
- Date/Time Types: Advanced date and time handling
- Geographic Data: Location and mapping data types
Planned Enhancements
Analytics and Reporting:
- Built-in Analytics: Database usage and performance metrics
- Custom Reports: Generate reports from your data
- Data Visualization: Charts and graphs from database data
- Export Formats: PDF, Excel, and other export options
Advanced Security:
- Row-Level Security: Permissions at the individual record level
- Audit Trails: Complete change logging and history
- Data Encryption: Enhanced encryption options
- Compliance Tools: GDPR, HIPAA, and other compliance features
Migration and Integration
Moving to AppStruct Database
From External Databases:
- Export Your Data: Extract data from current database as CSV/Excel
- Plan Table Structure: Design your AppStruct tables with appropriate column types
- Create Tables: Set up tables in AppStruct Database with foreign key relationships
- Import Data: Use CSV/Excel import tools to transfer existing data
- Set Permissions: Configure column-level permissions for security
- Update Workflows: Connect your app to new database using Database Request actions
From Other AppStruct Backends:
- Export Data: Use export features if available from current backend
- Switch Backend: Change backend setting to AppStruct Database
- Recreate Structure: Build your table structure with relationships
- Import Data: Transfer your existing data using import tools
- Test Functionality: Verify everything works correctly with new backend
Integration with External Systems
API Access:
- REST API: Access your data via REST endpoints
- Webhook Support: Send data changes to external systems
- Real-time Sync: Keep external systems updated
- Custom Integration: Connect with third-party services
Data Synchronization:
- One-Way Sync: Send data to external systems
- Import Automation: Scheduled imports from external sources
- Conflict Resolution: Handle data conflicts intelligently
- Scheduled Operations: Automatic periodic data operations
Need Assistance?
Getting Support:
- Documentation: Comprehensive guides and tutorials available
- Support Team: Contact [email protected] for help
- Community Forum: Connect with other AppStruct developers
- Video Tutorials: Step-by-step visual guides
What to Include When Asking for Help:
- Specific Error Messages: Copy exact error text
- Steps to Reproduce: What you did when the problem occurred
- Expected vs Actual: What you expected vs what happened
- Browser Information: Which browser and version you're using
- Project Details: Information about your project setup
- Data Context: Table structure and column types involved
Emergency Support:
- Critical Issues: 24/7 support for production problems
- Data Recovery: Help with data loss situations
- Performance Issues: Assistance with slow database operations
- Security Concerns: Immediate help with security-related problems
Next Steps
Getting Started:
- Create Your Database: Click "Create Database" in the backend section
- Build Your First Table: Create a simple table with different column types
- Add Sample Data: Enter test data and try different input methods
- Set Up Relationships: Create foreign key connections between tables
- Configure Permissions: Set up column-level access control
- Connect to Workflows: Link your tables to app actions and workflows
Advanced Usage:
- Plan Your Data Structure: Design comprehensive table schemas with relationships
- Import Existing Data: Use CSV, Excel, or Google Sheets import tools
- Implement Data Workflows: Create complete data management flows
- Set Up Security: Configure appropriate permissions for different user roles
- Monitor Performance: Track database usage and optimization opportunities
- Scale Your Application: Expand your database as your app grows
The AppStruct Database provides a comprehensive foundation for your application's data needs. With advanced column types, table relationships, import/export capabilities, and fine-grained permissions, you can build sophisticated data-driven applications without writing any code. Start simple, learn the system, and gradually expand your database structure as your application grows and your requirements become more complex.