BLOGS

DATABASE

warning: file_get_contents(http://www.telize.com/geoip/54.80.209.254) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /var/www/www.4d.com/docs/includes/common.inc(1762) : eval()'d code on line 4.

SQL Views

This How-Do-I shows you some examples on how to use SQL Views in more and less complex ways.

SQL views

 

Download for Windows & Mac

Indexed picture metadata

The 4D database engine indexes picture metadata.

Search images and get much faster results based on the keywords that are automatically indexed by the database engine.

 

Externalized application settings

Application settings and preferences can now be stored external to your 4D application’s primary structure (e.g. the size of the database cache, HTTP port number, etc.).

This allows for smoother upgrades whenever you update your solutions, especially on large-scale deployments that have numerous users.

 

External data storage

Store pictures, blobs and text outside of the data file.

This feature reduces the size of the data file itself, so that operations that occur on the file happen much more quickly. 4D will automatically manage the storage and backup of the external data. Or, if you prefer, customize it to your own needs and manage the backup yourself. In the latter scenario, you can store the paths to these external files within 4D, which will remain part of the data that uses the file.

 

4D SQL

This example database demonstrates the possibility of carrying out queries via the 4D language as well as SQL.

Specific examples show both languages in parallel so that they can be compared easily and in order to highlight their respective advantages.

 

Comments and explanations are provided during the execution of these queries.

 

Download for Windows or Mac

Database Events

This "How Do I" gives you an example of the new database method 'On System events' management.

The new events supported by this new method apply to background or foreground application moves.

 

Download for Windows or Mac

4D Indexes

This example database shows the various possibilities for using indexes in 4D.

There are several types of indexes in 4D that can be selected according to the type of data and their use.

 

In addition to demonstrating their effectiveness, this example explains how to choose the most appropriate type of index.

 

Download for Windows or Mac

Integrated, Native SQL

4D's database engine and development environment feature integrated, native SQL.

The 4D language allows you to connect directly to an ODBC data source and to execute SQL queries inside  "Begin SQL" and "End SQL" tags (and via the new 4D command: QUERY BY SQL).


This database shows how to carry out queries with the 4D language as well as with SQL.


Specific examples show both languages in parallel in order to compare them easily and to highlight their respective advantages.

 

Comments and explanations are provided during the execution of these queries.

 

4D Indexes

This example shows the various possibilities of using indexes in 4D.

4D's index types include:

 

- BTree index for non-repeated values (IDs, names, etc.)
- cluster index for repeated values (Booleans, titles (M., Ms., etc.))
- composite index for sorting (FirstName+LastName, City+ZipCode, State+City, etc.)
- keyword indexes for texts

 

The indexes are created and stored in a separate file.

 

To demonstrate their efficiency, this example explains how to choose the correct index type.
 

Synchronize Multiple Sites

How do I synchronize multiple sites with their headquarters?

 Download for Mac or Windows