External Databases
External Databases
A separate facility in RAMADDA allows for integrating external databases into the repository. To do this an administrator needs to specify a set of property definitions in the RAMADDA home directory.

The first property is a list of the database names (can be arbitrary) that are defined. e.g. below there are 3 database names defined.
  table.db.databases=employees,menagerie

For each of the named databases there needs to be specified the JDBC url and the username/password. e.g.:
table.db.menagerie.url=jdbc:mysql://geodesystems.com:3306/menagerie?zeroDateTimeBehavior=convertToNull&initialTimeout=1000&connectTimeout=5000               
table.db.menagerie.user=db user
table.db.menagerie.password=db user password

table.db.employees.url=jdbc:mysql://geodesystems.com:3306/employees?zeroDateTimeBehavior=convertToNull&initialTimeout=1000&connectTimeout=5000       
table.db.employees.user=db user
table.db.employees.password=db password

Once the databases are define you can create an entry for a particular table in the database. Under the File->Pick a Type->Choose Entry Type select "External Database" under the "Database" category. When initially creating the entry you select which database is to be used, e.g., "employees". Once the entry is created go back and edit it. Now there will be a menu that lists all of the tables in the selected database.

Once created the External Database entry can act as a source of point data and can be used to create displays. Database table fields can be configured to be able to be used in the display filter specifications. When editing the entry add the following properties in the Properties field:
#This says that the particular field can be used in the display
request.<field name>.display=true

e.g.:
request.gender.display=true

#This says that all fields can be used in the display
request.*.display=true

#This defined the field as an enumeration
request.<field name>.type=enumeration
e.g.:

request.gender.type=enumeration