Tech Tip: The Structure is a Database!
PRODUCT: 4D | VERSION: 11 | PLATFORM: Mac & Win
Published On: March 8, 2010
One of the architectural changes in 4D v11 SQL was to change the Structure file from a Data Dictionary (using Mac OS Resources) to a database (using tables and records).
The foundation of this change is the fact that the 4D Data Engine is used to manage the Structure file. This implies some interesting things:
- The maximum number of Structure objects (forms, methods, lists, menu bars, etc.) is the same as the maximum number of records in 4D v11 SQL (see the Tech Tip What is the maximum number of methods in 4D v11 SQL?).
- The Structure file has an index (see the Tech Tip How can I rebuild all indexes in 4D v11 SQL?).
- Structure records are loaded into the 4D Data file cache just like any other record.
- However changes to structure file objects are not logged to the Journal file.
- Therefore if 4D quits unexpectedly, any structure changes that were in the cache that have not been flushed will be lost.
- Save early, save often. Saving changes to a method by explicitly calling the save command, for example, forces the changes to disk.
- Therefore if 4D quits unexpectedly, any structure changes that were in the cache that have not been flushed will be lost.
Of course the Structure file still contains other information besides the actual table of objects. Yet it is quite exciting to see 4D leveraging powerful technologies like the Data Engine to repalce obsolete technologies like the Resources used in the Structure file.
Please note that this Tech Tip is not meant to serve as official documentation for the 4D Structure file. All information contained herein is subject to change without notice.
See Also: