Chapter 6. Virtual Databases
Chapter 6. Virtual Databases 6.1. VDB Definition A VDB or virtual database definition is contained in an XML file. For .vdb archive files created in the design tool, this file is embedded in the archive and most fields can be updated through tooling. The XML schema for this file can be found in the EAP_HOME /docs/teiid/schema directory. Example 6.1. Example VDB XML
<vdb name="USD{vdb-name}" version="USD{vdb-version}"> <!-- VDB properties --> <property name="USD{property-name}" value="USD{property-value}" /> <!-- UDF defined in an AS module, see Developers Guide --> <property name ="lib" value ="{module-name}"></property> <import-vdb name="..." version="..." import-data-policies="true|false"/> <!-- define a model fragment for each data source --> <model visible="true" name="USD{model-name}" type="USD{model-type}" > <property name="..." value="..." /> <source name="USD{source-name}" translator-name="USD{translator-name}" connection-jndi-name="USD{deployed-jndi-name}"> <metadata type="USD{repository-type}">raw text</metadata> </model> <!-- define a model with multiple sources - see Multi-Source Models --> <model name="USD{model-name}" path="/Test/Customers.xmi"> <property name="multisource" value="true"/> . . . <source name="USD{source-name}" translator-name="USD{translator-name}" connection-jndi-name="USD{deployed-jndi-name}"/> <source . . . /> <source . . . /> </model> <!-- see Reference Guide - Data Roles --> <data-role name="USD{role-name}"> <description>USD{role-description}</description> . . . </data-role> <!-- create translator instances that override default properties --> <translator name="USD{translator-name}" type="USD{translator-type}" /> <property name="..." value="..." /> </translator> </vdb>