|
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 .
Figure: SQL Component Diagram Showing Connection Options
The <<SQLAlias>> Employee connects the xUML service with the sql database. Each <<SQLAdapter>> referencing the same <<Alias>> connects to the same database. The options of this database connections are given as tagged values on the dependency to the database artifact:
|
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 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:
Any database uses a charset to encode Strings. If the database uses UNICODE charsets (UTF-8, UTF-16, UTF-32), encoding is handled automatically. If the database is not UNICODE compliant, the Bridge assumes 7-bit ASCII by default. However, in many cases it necessary to define the charset explicitly. This is done by the tagged value charset as shown below. The charset needs to be the same as defined at the database settings. All possible charset definitions are listed in section Charset Definitions . Figure: Tagged Value Charset of a SQL Service Artifact
|