mysql.driver = twz1.jdbc.mysql.jdbcMysqlDriver |
Basically, the configuration specifies two things. One is the jdbc driver, the other is the URL of the database server. This Java LDL++ driver is configured to talk with MySQL and Oracle database server. The line starting with "mysql.driver" specifies the JDBC specifies the JDBC/MySQL driver. The line starting with "mysql.url" specifies the URL and the protocol for the MySQL system.
database( {
jdbc::employee(Name:string, Dept:string, Sal:integer)
local_name emp
from 'vesuvio.cs.ucla.edu:mysql'
user_name hxwang
password lapid
} ).
|
Here, "employee" is a table managed by MySQL and is refered by this LDL++ program with the local name of "emp". Also, "vesuvio.cs.ucla.edu" is {\em the machine where the Java LDL++ driver is running on}.
The next example showa a connection to an Oracle server. The Java LDL++ driver in this example is running on "cheetah.cs.ucla.edu".
database( {
jdbc::temp2(Name: integer)
local_name temp
from 'cheetah.cs.ucla.edu:oracle'
user_name hxwang
password dbpasswd,
jdbc::temp5(ID: integer, NAME:varchar, SALARY:float)
local_name emp
from 'cheetah.cs.ucla.edu:oracle'
user_name hxwang
password dbpasswd
} ).
|
Carlo Zaniolo. Jul,1998