|
| 1 | +# Master vs External Data Sources |
| 2 | + |
| 3 | +The differences between master data sources and external data sources in NocoBase are primarily reflected in four aspects: data source type support, collection type support, field type support, and backup and migration capabilities. |
| 4 | + |
| 5 | +## 1. Data Source Type Support |
| 6 | + |
| 7 | +For more details, see: [Data Source Manager](https://docs.nocobase.com/handbook/data-source-manager) |
| 8 | + |
| 9 | +### Data Source Types |
| 10 | + |
| 11 | +| Data Source Type | Master Data Source Support | External Data Source Support | |
| 12 | +|------------------|---------------------------|------------------------------| |
| 13 | +| PostgreSQL | ✅ | ✅ | |
| 14 | +| MySQL | ✅ | ✅ | |
| 15 | +| MariaDB | ✅ | ✅ | |
| 16 | +| KingbaseES | ✅ | ✅ | |
| 17 | +| MSSQL | ❌ | ✅ | |
| 18 | +| Oracle | ❌ | ✅ | |
| 19 | + |
| 20 | +### Collection Management |
| 21 | + |
| 22 | +| Collection Management | Master Data Source Support | External Data Source Support | |
| 23 | +|----------------------|-----------------------------|------------------------------| |
| 24 | +| Basic Management | ✅ | ✅ | |
| 25 | +| Visual Management | ✅ | ❌ | |
| 26 | + |
| 27 | +## 2. Collection Type Support |
| 28 | + |
| 29 | +For more details, see: [Collections](https://docs.nocobase.com/handbook/data-modeling/collection) |
| 30 | + |
| 31 | +| Collection Type | Master Data Source | External Data Source | Description | |
| 32 | +|----------------|-------------------|---------------------|-------------| |
| 33 | +| General | ✅ | ✅ | Basic collection | |
| 34 | +| View | ✅ | ✅ | Data source view | |
| 35 | +| Inheritance | ✅ | ❌ | Supports data model inheritance, master data source only | |
| 36 | +| File | ✅ | ❌ | Supports file uploads, master data source only | |
| 37 | +| Comment | ✅ | ❌ | Built-in comment system, master data source only | |
| 38 | +| Calendar | ✅ | ❌ | Collection for calendar views | |
| 39 | +| Expression | ✅ | ❌ | Supports formula calculations | |
| 40 | +| Tree | ✅ | ❌ | For tree structure data modeling | |
| 41 | +| SQL | ✅ | ❌ | Collection defined through SQL | |
| 42 | +| External Connection | ✅ | ❌ | Connection collection for external data sources, limited functionality | |
| 43 | + |
| 44 | +## 3. Field Type Support |
| 45 | + |
| 46 | +For more details, see: [Collection Fields](https://docs.nocobase.com/handbook/data-modeling/collection-fields) |
| 47 | + |
| 48 | +### Basic Types |
| 49 | + |
| 50 | +| Field Type | Master Data Source | External Data Source | |
| 51 | +|-----------|----------------|-------------------| |
| 52 | +| Single text | ✅ | ✅ | |
| 53 | +| Long text | ✅ | ✅ | |
| 54 | +| Phone | ✅ | ✅ | |
| 55 | +| Email | ✅ | ✅ | |
| 56 | +| URL | ✅ | ✅ | |
| 57 | +| Integer | ✅ | ✅ | |
| 58 | +| Number | ✅ | ✅ | |
| 59 | +| Percent | ✅ | ✅ | |
| 60 | +| Password | ✅ | ✅ | |
| 61 | +| Color | ✅ | ✅ | |
| 62 | +| Icon | ✅ | ✅ | |
| 63 | + |
| 64 | +### Choice Types |
| 65 | + |
| 66 | +| Field Type | Master Data Source | External Data Source | |
| 67 | +|-----------|----------------|-------------------| |
| 68 | +| Checkbox | ✅ | ✅ | |
| 69 | +| Single select | ✅ | ✅ | |
| 70 | +| Multiple select | ✅ | ✅ | |
| 71 | +| Radio group | ✅ | ✅ | |
| 72 | +| Checkbox group | ✅ | ✅ | |
| 73 | +| China region | ✅ | ❌ | |
| 74 | + |
| 75 | +### Media Types |
| 76 | + |
| 77 | +| Field Type | Master Data Source | External Data Source | |
| 78 | +|-----------|----------------|-------------------| |
| 79 | +| Media | ✅ | ✅ | |
| 80 | +| Markdown | ✅ | ✅ | |
| 81 | +| Markdown(Vditor) | ✅ | ❌ | |
| 82 | +| Rich text | ✅ | ✅ | |
| 83 | +| Attachment(Association) | ✅ | ❌ | |
| 84 | +| Attachment(URL) | ✅ | ✅ | |
| 85 | + |
| 86 | +### Date & Time Types |
| 87 | + |
| 88 | +| Field Type | Master Data Source | External Data Source | |
| 89 | +|-----------|----------------|-------------------| |
| 90 | +| Datetime(with time zone) | ✅ | ✅ | |
| 91 | +| Datetime(without time zone) | ✅ | ✅ | |
| 92 | +| Unix timestamp | ✅ | ✅ | |
| 93 | +| Date(without time) | ✅ | ✅ | |
| 94 | +| Time | ✅ | ✅ | |
| 95 | + |
| 96 | +### Geometric Types |
| 97 | + |
| 98 | +| Field Type | Master Data Source | External Data Source | |
| 99 | +|-----------|----------------|-------------------| |
| 100 | +| Point | ✅ | ✅ | |
| 101 | +| Line | ✅ | ✅ | |
| 102 | +| Circle | ✅ | ✅ | |
| 103 | +| Polygon | ✅ | ✅ | |
| 104 | + |
| 105 | +### Advanced Types |
| 106 | + |
| 107 | +| Field Type | Master Data Source | External Data Source | |
| 108 | +|-----------|----------------|-------------------| |
| 109 | +| UUID | ✅ | ✅ | |
| 110 | +| Nano ID | ✅ | ✅ | |
| 111 | +| Sort | ✅ | ✅ | |
| 112 | +| Formula | ✅ | ✅ | |
| 113 | +| Sequence | ✅ | ✅ | |
| 114 | +| JSON | ✅ | ✅ | |
| 115 | +| Collection select | ✅ | ❌ | |
| 116 | +| Encryption | ✅ | ✅ | |
| 117 | + |
| 118 | +### System Info Fields |
| 119 | + |
| 120 | +| Field Type | Master Data Source | External Data Source | |
| 121 | +|-----------|----------------|-------------------| |
| 122 | +| Created at | ✅ | ✅ | |
| 123 | +| Last updated at | ✅ | ✅ | |
| 124 | +| Created by | ✅ | ❌ | |
| 125 | +| Last updated by | ✅ | ❌ | |
| 126 | +| Table OID | ✅ | ❌ | |
| 127 | + |
| 128 | +### Association Types |
| 129 | + |
| 130 | +| Field Type | Master Data Source | External Data Source | |
| 131 | +|-----------|----------------|-------------------| |
| 132 | +| One-to-one | ✅ | ✅ | |
| 133 | +| One-to-many | ✅ | ✅ | |
| 134 | +| Many-to-one | ✅ | ✅ | |
| 135 | +| Many-to-many | ✅ | ✅ | |
| 136 | +| Many-to-many (array) | ✅ | ❌ | |
| 137 | + |
| 138 | +:::info |
| 139 | +Attachment fields depend on file collections, which are only supported by master data sources. Therefore, external data sources do not currently support attachment fields. |
| 140 | +::: |
| 141 | + |
| 142 | +## 4. Backup and Migration Support Comparison |
| 143 | + |
| 144 | +| Feature | Master Data Source | External Data Source | |
| 145 | +|---------|-------------------|---------------------| |
| 146 | +| Backup & Restore | ✅ | ❌ (User managed) | |
| 147 | +| Migration Management | ✅ | ❌ (User managed) | |
| 148 | + |
| 149 | +:::info |
| 150 | +NocoBase provides backup, restore, and structure migration capabilities for master data sources. For external data sources, these operations need to be completed independently by users according to their own data source environments. NocoBase does not provide built-in support. |
| 151 | +::: |
| 152 | + |
| 153 | +## Summary Comparison |
| 154 | + |
| 155 | +| Comparison Item | Master Data Source | External Data Source | |
| 156 | +|----------------|-------------------|---------------------| |
| 157 | +| Data Source Types | PostgreSQL, MySQL, MariaDB, KingbaseES | PostgreSQL, MySQL, MariaDB, MSSQL, Oracle, KingbaseES | |
| 158 | +| Collection Type Support | All collection types | Only general and view collections | |
| 159 | +| Field Type Support | All field types | All field types except attachment fields | |
| 160 | +| Backup & Migration | Built-in support | User managed | |
| 161 | + |
| 162 | +## Recommendations |
| 163 | + |
| 164 | +- **If you need to use NocoBase's advanced features** (such as comments, inheritance, file uploads, etc.), please use the **master data source**. |
| 165 | +- **If you only need to read or connect to existing external data source data**, you can use **external data sources**. |
0 commit comments