2003 Data Structure Fundamentals
Data Structure Fundamentals
Understanding Data Tables
What Are Data Tables?
- Contacts table - Stores information about people
- Companies table - Stores information about organizations
- Deals table - Stores information about sales opportunities
- Tasks table - Stores information about activities and to-dos
How Data Tables Work
- Columns = Fields (define what information you track)
- Rows = Records (individual entries)
- Tab = Table (groups related information)
- Enforced data types (dates must be dates, numbers must be numbers)
- Data validation rules
- Automatic calculations
- Relationships between tables
- Advanced querying and filtering
- Scalability to millions of records
Table Characteristics
- Table Name - Descriptive name (e.g., "Contacts", "Orders", "Projects")
- Fields - Define what information the table stores
- Records - The actual data entries
- Settings - Configuration options for behavior
- Permissions - Control who can view/edit data
Understanding Fields
What Are Fields?
- First Name
- Last Name
- Email Address
- Phone Number
- Company
- Date Added
- Status
Field Types Overview
Basic Text Fields
- Short Text - Single line of text (names, titles, short notes)
- Long Text - Multiple lines of text (descriptions, comments)
- Email - Email addresses with validation
- Phone - Phone numbers with formatting
- URL - Website addresses
Number Fields
- Number - Numeric values (quantity, age, score)
- Currency - Money amounts with currency symbols
- Percentage - Percentage values
- Auto Increment - Automatically generated sequential numbers
Date & Time Fields
- Date - Calendar dates
- Date & Time - Date with specific time
- Time - Time only (without date)
Selection Fields
- Dropdown - Choose one option from a list
- Multi-Select Dropdown - Choose multiple options
- Radio Buttons - Choose one option (displayed as buttons)
- Checkboxes - Choose multiple options (displayed as checkboxes)
Special Fields
- File Upload - Attach files and documents
- Image - Upload and display images
- Yes/No - True/false or on/off values
- User - Link to application users
Field Properties
- Field Name - Internal identifier (lowercase, no spaces)
- Display Name - What users see
- Description - Help text for users
- Required - Must have a value
- Unique - No duplicate values allowed
- Default Value - Pre-filled value for new records
- Validation Rules - Custom requirements
Choosing the Right Field Type
- Data Validation - Ensures data is entered correctly
- Display Format - How data appears to users
- Calculations - What operations you can perform
- Sorting & Filtering - How you can organize data
- Component Compatibility - What components can use the field
- Email addresses → Use Email field (validates format, allows email sending)
- Prices → Use Currency field (formats with $, allows calculations)
- Status → Use Dropdown field (limits to predefined options)
- Notes → Use Long Text field (allows multiple lines)
- Quantity → Use Number field (allows math calculations)
Understanding Records
What Are Records?
- First Name: John
- Last Name: Smith
- Email: john.smith@example.com
- Phone: 555-1234
- Company: Acme Corp
- Status: Active
Record ID
- Automatically generated when record is created
- Never changes
- Used internally to track and link records
- Ensures each record can be uniquely identified
Creating Records
- Manually - Users enter data through forms
- Import - Upload from CSV or Excel files
- API - Programmatically via REST API
- Rules - Automatically created by automation rules
- Webhooks - Created from external systems
Viewing Records
- Table view (like a spreadsheet)
- Search and filter records
- Sort by any field
- Edit records directly
- Bulk operations (delete, update multiple)
Relationships Between Tables, Fields, and Records
The Hierarchy
- Tables contain fields and records
- Fields define what information each record stores
- Records are individual entries with values for each field
A Simple Analogy
Think of tables like a filing cabinet:
- Filing Cabinet = Your Database
- Drawers = Tables (Contacts, Companies, Orders)
- File Folders = Records (each person, each company, each order)
- Information on Folder Labels = Fields (Name, Email, Phone)
Tables Working Together
Tables can be connected through relationships. For example:
- A Contact works at a Company
- A Deal is associated with a Contact
- An Order contains multiple Products
- A Task is assigned to a User
We'll cover relationships in detail in Phase 2, but it's important to understand that tables don't exist in isolation - they work together to model real-world scenarios.
Planning Your Data Structure
Identify Your Entities
Start by listing the main "things" you need to track. These become your tables.
Ask yourself:
- What are the main objects or entities in my system?
- What information do I need to store?
- What are people, things, or events I need to track?
Examples:
- CRM: Contacts, Companies, Deals, Activities
- Project Manager: Projects, Tasks, Team Members, Time Logs
- Inventory: Products, Orders, Customers, Suppliers
- Event Management: Events, Attendees, Sessions, Venues
Identify Attributes
For each entity, list what information you need to know. These become your fields.
For a Contact, you might need:
- Name (first and last)
- Email address
- Phone number
- Company
- Job title
- Address
- Status (active/inactive)
- Notes
- Date added
Avoid Redundant Data
Don't repeat the same information in multiple places. Instead, use relationships.
Bad Example:
- Storing company name, address, phone in every contact record
Good Example:
- Create a Companies table
- Link contacts to companies
- Company info stored once, shared by all contacts at that company
Start Simple
Don't try to plan everything upfront:
- Start with core tables and fields
- Build and test
- Add complexity as needed
- Iterate based on actual usage
Tadabase is flexible - you can always add fields, create new tables, and adjust as you learn.
Best Practices for Table Design
Naming Conventions
- Table Names: Use plural nouns (Contacts, Orders, Projects)
- Field Names: Use descriptive names (first_name, not fn)
- Be Consistent: Use same naming style throughout
- Avoid Spaces: Use underscores (order_date, not "order date")
- Be Descriptive: Clear names are better than short ones
Table Organization
- One table per entity type
- Keep related information together
- Don't create tables for every tiny detail
- Group logically related tables
Field Organization
- Put most important fields first
- Group related fields together
- Use appropriate field types
- Make required fields truly necessary
- Provide helpful descriptions
Data Validation
- Use field type validation (email format, number ranges)
- Set required fields for critical data
- Use unique constraints where appropriate (email, SKU)
- Provide default values when sensible
- Use dropdown lists to limit options
Scalability Considerations
- Think about future growth
- Design for thousands of records, not just dozens
- Use indexed fields for frequently searched data
- Avoid overly complex structures initially
Creating Your First Table
Step 1: Access Data Builder
- Open your application in the builder
- Click on "Data Builder" in the left sidebar
- You'll see an empty canvas (no tables yet)
Step 2: Create New Table
- Click the "+ Create Table" button
- Enter table name: Contacts
- Optionally add a description: "Store contact information"
- Click "Create"
Step 3: Table Created
Congratulations! You've created your first table. Tadabase automatically creates a few default fields:
- Record ID - Unique identifier for each record
- Date Created - When the record was created
- Date Modified - When the record was last updated
These system fields are created automatically for every table and don't count toward your field limits.
Adding Fields to Tables
Adding a Short Text Field
- Click "+ Add Field" button
- Select "Short Text" field type
- Enter field name: first_name
- Enter display name: First Name
- Check "Required" (make it mandatory)
- Click "Save"
Add More Fields
Repeat the process to add these fields:
Last Name (Short Text)
- Field name: last_name
- Display name: Last Name
- Required: Yes
Email (Email)
- Field name: email
- Display name: Email Address
- Required: Yes
- Unique: Yes (no duplicate emails)
Phone (Phone)
- Field name: phone
- Display name: Phone Number
- Required: No
Company (Short Text)
- Field name: company
- Display name: Company
- Required: No
Status (Dropdown)
- Field name: status
- Display name: Status
- Options: Active, Inactive, Prospect
- Default: Active
- Required: Yes
Notes (Long Text)
- Field name: notes
- Display name: Notes
- Required: No
Viewing and Editing Records
Accessing Records View
- Click on your Contacts table in the Data Builder
- Click the "Records" tab at the top
- You'll see an empty table (no records yet)
Adding a Record Manually
- Click the "+ Add Record" button
- A form appears with all your fields
- Fill in the information:
- First Name: John
- Last Name: Smith
- Email: john.smith@example.com
- Phone: 555-1234
- Company: Acme Corp
- Status: Active
- Notes: Met at conference
- Click "Save"
Viewing Records
Your record now appears in the table view. You can:
- Sort - Click column headers to sort
- Search - Use search box to find records
- Filter - Apply filters to show specific records
- Edit - Click a record to edit it
- Delete - Select record and click delete
Editing Records
- Click on any record to open it
- Modify the fields you want to change
- Click "Save" to update
Bulk Operations
You can perform operations on multiple records:
- Check boxes to select multiple records
- Use bulk actions: Delete, Update field values
- Export selected records
Practice Exercise
Add at least 5 more contact records with different information. This will give you data to work with when we create pages in the next section.
Common Field Types in Detail
Short Text vs Long Text
Short Text:
- Single line input
- Best for: Names, titles, SKUs, brief entries
- Character limit: configurable
- Displays in single line on forms and tables
Long Text:
- Multi-line text area
- Best for: Descriptions, comments, notes, articles
- No character limit (or very high)
- Displays as text box on forms
- Can include rich text formatting (optional)
Dropdown Fields
Use dropdowns when:
- You have a limited set of predefined options
- Want to ensure consistency (no typos or variations)
- Need to filter or group by these values
Examples:
- Status (Active, Inactive, Pending)
- Priority (High, Medium, Low)
- Department (Sales, Marketing, Support)
- Country (list of countries)
Date Fields
Date fields provide:
- Calendar picker for easy selection
- Consistent date format
- Date-based filtering and sorting
- Calculations (days between, add days, etc.)
Use for:
- Birth dates
- Start/end dates
- Due dates
- Event dates
Number Fields
Number fields enable:
- Mathematical calculations
- Aggregations (sum, average, min, max)
- Numeric sorting
- Number formatting (decimals, thousands separators)
Use for:
- Quantities
- Scores
- Ages
- Measurements
Currency Fields
Currency fields are special number fields:
- Automatic currency symbol ($, €, £, etc.)
- Two decimal places
- Proper formatting with commas
- Support for different currencies
Use for:
- Prices
- Costs
- Revenue
- Budgets
Yes/No Fields
Simple boolean (true/false) fields:
- Checkbox display
- Toggle switch option
- Filter by yes or no
Use for:
- Active/Inactive status
- Email opt-in
- Featured items
- Completed tasks
Understanding System Fields
Record ID
- Unique identifier for each record
- Auto-generated sequential number
- Never changes or repeats
- Used internally for relationships and linking
- You can display it but users typically don't edit it
Date Created
- Timestamp when record was created
- Automatically set
- Never changes
- Useful for sorting by newest/oldest
- Can be used in filters and reports
Date Modified
- Timestamp when record was last updated
- Automatically updated on any change
- Useful for tracking recent activity
- Can be used to identify stale records
Created By & Modified By
- Track which user created/modified the record
- Available in apps with user authentication
- Useful for audit trails
- Can be used for security rules
Modifying Table Structure
Adding New Fields
- Click "+ Add Field" anytime
- New field is added to all existing records (empty until filled)
- Set default values to populate existing records
Editing Fields
- Click field name to edit properties
- Change display name, description, settings
- Be careful changing field type (may lose data)
Deleting Fields
- Click field options → Delete
- Warning: Deleting fields permanently removes all data in that field
- Tadabase will prompt for confirmation
Reordering Fields
- Drag and drop fields to reorder
- Changes order in forms and tables
- Put most important fields first
Data Structure Checklist
- What tables are and how they organize data
- What fields are and how they define information types
- What records are and how they store actual data
- How to create a new table in Tadabase
- How to add fields to a table
- How to choose appropriate field types
- How to add and edit records manually
- The difference between system fields and custom fields
- Best practices for naming and organizing tables and fields
Next Steps
Next: Pages and Components Basics - Building Your Application Interface
Hands-On Exercise (To Be Added)
Exercise placeholders will include:
- Create a Contacts table with all the fields described above
- Add at least 10 contact records with varied data
- Practice editing and deleting records
- Create a second table (Companies) with fields: company_name, industry, website, phone
- Add 5 company records
- Experiment with different field types
- Practice sorting and filtering records
Knowledge Check (To Be Added)
Quiz questions will test understanding of:
- Difference between tables, fields, and records
- When to use different field types
- Best practices for table design
- How system fields work
- Planning data structures
- Naming conventions
We'd love to hear your feedback.