Comparison of Dynamic Lists and Database Resources

Documentation home 

 

See also:       Dynamic Lists

Database Resources

FPL Script Command Syntax

 

Dynamic lists and database resources are the two Ebase elements that can be used to access relational databases. The following chart compares their features:

 

Feature

Dynamic List

Database resource

Read from database

a

a

Write to database

x

a

Display as a pulldown list

a

x

Automatic validation of entered data

a

x

Can be used with tables

Note 1

a

Must be included in a business view

x

a

 

Note 1: when using an API based language, lists ( a Custom List as opposed to a Dynamic List) can be constructed from tables, and vice versa. When using the FPL language, a list can be constructed from a table using the buildlistfromtable() function, but a table cannot be constructed from a list.

 

Each dynamic list or database resource represents a single SQL statement. This SQL statement can be built automatically by the system or it can be manually created using either the dynamic list editor or the database resource editor.

 

Dynamic lists can only read from databases so SELECT statements are the only SQL statements that are issued. A dynamic list is normally built - and the SELECT statement executed - automatically by the system during before field processing for the field which is associated with the list. This will occur when the page is being prepared for presentation.

 

In contrast, database resources can issue the full range of SQL statements SELECT, UPDATE, INSERT, DELETE. The SQL statements are executed when the corresponding script command is executed as shown in the table below. This means that accesses to database resources are under the full control of the Ebase developer.

 

API based language

FPL command

SQL statements executed

DatabaseResource.fetch()

FETCH

select

DatabaseResource.update()

UPDATE

update

DatabaseResource.insert()

INSERT

insert

DatabaseResource.delete()

DELETE

delete

Table.fetchtable()

FETCHTABLE

select

Table.updatetable()

UPDATETABLE

update, insert, delete

 

Both dynamic lists and database resources can be created automatically by the system or can be created manually. Database resources can be imported directly from the database using the import from schema button in the database editor. This will create one database resource for each database table imported. A dynamic list can be created from a database resource using the build dynamic list button in the database resource editor.

 

There is no limit to the complexity that can be used in SQL statements for either dynamic lists or database resources.