Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 21.1

Added in Builder 6 The following figure shows a component diagram that features an SQLLite database. The database type and name are given as tagged values (dbType and dbConnectionString). More details are found in section Database Server-Specific Notes for SQL Adapters .

...

Multiexcerpt include
MultiExcerptNamesql_alias
PageWithExcerptSQL

SQL Components of Builder Version 5.1

Deprecated since Builder 6.0

...

titleClick here to read the documentation of the sql deployment used in Builder releases before 6.0 ..

The following figure shows a component diagram that features an SQLServer database. The database type is given as <<SQLService>> component name (SQLServer), the database name is the name of the <<SQLDatabase>> interface (SQLEXPRESS). The artifact manifesting the <<SQLDatabase>> interface may hold a connection string. In this example, the Bridge connects to the testhost\SQLEXPRESS@DCS database. The syntax of this expression depends on the database type. More details are found in section Database Server-Specific Notes for SQL Adapters .

Figure: SQL Component Diagram Showing Connection Options

Image Removed

The <<SQLAdapterDependency>> connecting the configuration artifact with the <<SQLDatabase>> interface uses an <<Alias>> artifact (TEST). Each <<SQLAdapter>> referencing the same <<Alias>> artifact connects to the same database. The options of this database connections are given as tagged values on the dependency to the database artifact:

...

user

...

DB user. Optional the password can be given after a '/'. However, this is recommended for development purposes only.

...

maxConnectionReuse

...

This tagged value controls the SQL connection pooling. For instance, if you set a value of 100, all 99 database requests after the first one will reuse the connection. You save the time to make a new connection. For the 101. request, a new connection will be done.

The pooling is switched off if maxConnectionReuse is set to 0 (default).

Value -1 means the connection will be reused forever. In this case you should define reasonable values for maxConnectionAge or maxConnectionIdleTime (see below).

Note
iconfalse

The higher the pooling size, the better suited for parallel accesses. However, big pools may lead to a very high memory consumption at the database.

This setting may especially make sense for online services that need good performance for good user experience. For instance, if creating a database connection may take a lot of time due to a slow system (half a second or more), only the first request will take this additional time.

...

maxConnectionAge

...

After a given connection age the connection will be closed and removed from the pool.
Values: connection age in minutes, default is 15 minutes, -1 means forever.

...

maxConnectionIdleTime

...

Connections not used for maxConnectionIdleTime will be closed and removed from the pool.
This is useful for connections going through firewalls because such connections might be cut off after some time.
Values in minutes, default is 60.

...

schema

...

String that prefixes tables and stored procedures. For example, if schema is set to S1, all tables accessing the current DB are prefixed by S1.
Note: tables in SQL statements have to be marked using the TABLE:: keyword, e.g TABLE::TEMPLOYEE.

...

tableQualifier

...

String that prefixes tables. For example, if tableQualifier is set to TQ1, all tables accessing the current DB are prefixed by TQ1. If schema and table qualifier are given, all tables will become: <schema>.<tableQualifier>.<tableName>.
Note: this works only if the tables in SQL statements are marked using the TABLE:: keyword, e.g TABLE::TEMPLOYEE.

...

options

...

This tagged value can hold a comma separated list of <name>=<value> pairs. These list elements are interpreted as native options. The possible name-value pairs depend on the database type. A comprehensive list can be found at http://www.sqlapi.com/ServerSpecific/index.html

...

...

SQL

...