|
This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||
|
4D v20.2
External data storage
|
||||||||||||||||||||||||||||||||||
| Automatic mode | Custom mode | |
| Setting the storage folder | Name and location set by 4D; only one default folder for whole database | Name and location set freely; can be different for each field |
| Loading of external files | Automatic | Automatic |
| Creation and updating of external files | Automatic | Manual |
| Deletion of external file if record is deleted | Yes | No |
| Deletion of external file if Null value assigned to the field | Yes | No |
| Automatic integration when database is saved | Yes | Yes (external path) |
| Automatic support when log file is integrated | Yes | Yes (external path) |
| Support of standard indexes (Text fields) | No | No |
| Support of keyword indexes (Text and Picture fields) | Yes | No |
| Support of transactions | Yes | No |
Data stored outside of the data file are organized according to the following principles:
In automatic mode, recording a field into an external file is done when the record is saved to disk (after validation of the transaction if need be):
In custom mode (path defined by the SET EXTERNAL DATA PATH command), 4D only stores the pathname of the file when the record is saved on disk. The file must be managed (creation and modification) by the developer.
The storage place for the data is a local parameter in each database. When synchronizing or replicating data, these parameters may differ between the local database and the remote one. In this case, the storage complies with the parameters of each database; the synchronization or replication does not change them.
For example, if a Picture field in the remote database is normally saved outside of the data file and this same field in the local database is saved in the data file, when replication occurs, any data added to this field in the local database (in the data file) will still be stored outside of the data file in the remote database.
External storage files can be accessed in read/write by applications other than 4D (operating systems, text or graphical editors, and so on). However, this must be done with precaution because it may alter the functioning of the application:
Note: External Text files are saved in UTF-8 without BOM format. If they are opened by a third-party application and then saved with a BOM, they can still be opened again by 4D but will then be saved without BOM.
Note that loading a record in "read only" does not lock the external files for the fields of this record. These files can still be modified on disk by 4D or by third-party applications, even though their contents are loaded in memory by 4D.
Product: 4D
Theme: Creating a database structure
Created: 4D v13
4D Design Reference ( 4D v20)
4D Design Reference ( 4D v20.1)
4D Design Reference ( 4D v20.2)
Add a comment