Macromedia colfusion mx 7 Manual
18
Chapter 2: Using the ColdFusion MX Administrator
The following table compares the client variable storage options:
Migrating client variable data
To migrate your client variable data to another data source, you should know the structure of the
database tables that store this information. Client variables stored externally use two simple
database tables, like those shown in the following tables:
database tables that store this information. Client variables stored externally use two simple
database tables, like those shown in the following tables:
Creating client variable tables
Use the following sample ColdFusion page as a model for creating client variable database tables
in your own database. However, keep in mind that not all databases support the same column
data type names. For the proper data type, see your database documentation.
in your own database. However, keep in mind that not all databases support the same column
data type names. For the proper data type, see your database documentation.
Tip: The ColdFusion MX Administrator can create client variable tables for data sources that use one
of the bundled JDBC drivers. For more information, see the online help.
of the bundled JDBC drivers. For more information, see the online help.
Storage type
Advantages
Disadvantages
Data source
• Can use existing data source
• Portable: not tied to the host
• Portable: not tied to the host
system or operating system
• Requires database transaction to
read/write variables
• More complex to implement
Browser cookies
• Simple implementation
• Good performance
• Can be set to expire automatically
• Client-side control
• Good performance
• Can be set to expire automatically
• Client-side control
• Users can configure browsers to
disallow cookies
• Cookie data is limited to 4 KB
• Netscape Navigator allows only 20
• Netscape Navigator allows only 20
cookies from one host; ColdFusion MX
uses three cookies to store read-only
data, leaving only 17 cookies available
uses three cookies to store read-only
data, leaving only 17 cookies available
System registry
• Simple implementation
• Good performance
• Registry can be exported easily to
• Good performance
• Registry can be exported easily to
other systems
• Server-side control
• Possible restriction of the registry’s
maximum size limit in Windows in the
Control Panel
Control Panel
• Integrated with the host system: not
practical for clustered servers
• Not available for UNIX
CDATA Table
Column
Data type
cfid
CHAR(64), TEXT, VARCHAR, or equivalent
app
CHAR(64), TEXT, VARCHAR, or equivalent
data
MEMO, LONGTEXT, LONG VARCHAR, or equivalent
CGLOBAL Table
Column
Data type
cfid
CHAR(64), TEXT, VARCHAR, or equivalent
data
MEMO, LONGTEXT, LONG VARCHAR, or equivalent
lvisit
TIMESTAMP, DATETIME, DATE, or equivalent