Suppose we have the
following database:
Exchange Rate DB
current_date | sourceCurrency | targetCurrency | exchangeRate |
Aug 26 10:41:52 EDT 1999 | CAD | USD | 0.665572 |
Aug 26 10:41:52 EDT 1999 | USD | CAD | 1.50244 |
Aug 26 10:41:52 EDT 1999 | CAD | EUR | 0.638588 |
Aug 26 10:41:52 EDT 1999 | EUR | CAD | 1.56601 |
Aug 26 10:41:52 EDT 1999 | USD | EUR | 1.04229 |
Aug 26 10:41:52 EDT 1999 | EUR | USD | 0.959446 |
In a XIB database description, an input binding provides information on how to connect to the database and the queries to be performed. The address of the database is jdbc:msql://mika.ai.toronto.edu:1114/testDB and the driver we use to connect is com.imaginary.sql.msql.MsqlDriver. If we want to use the login name guest and connect with password 12345, then the INPUT BINDING for this database is:
<INPUTBINDING>
<BASE> jdbc:msql://mika.ai.toronto.edu:1114/testDB </BASE>
<DRIVER> com.imaginary.sql.msql.MsqlDriver </DRIVER>
<USER> guest </USER>
<PASSWORD> 12345 </PASSWORD>
<DBQUERY>
SELECT current_date, sourceCurrency,
targetCurrency, exchangeRate
FROM currency_table
WHERE sourceCurrency = 'from' AND
targetCurrency = 'to'
</DBQUERY>
</INPUTBINDING>