SmaJIsql is a Graphic User Interface (GUI) specially designed for SMADB using Java Applet. This is a pure Java code utilizing JDBC components. The design of this GUI has the flexibility to access the data in SMADB to meet the needs for general users in astronomy. The current version is SmaJIsql 1.0. The GUI of SmaJIsql 1.0, as illustrated in Fig. 4, consists of five major parts:
1. The data fields for the input parameters: This part is composed of four rows. The first rows are the parameters for establishing a connection to SMADB, including the IP address of the host computer, the SQL Server port number, the username and password for the database access and the database name. In the current version (SmaJIsql1.0), the password for SMADB is encoded; the input field of this parameter is locked. For security, we will take out the first row in the next version upgrading. The next three rows involve the searching parameters. The object name, its coordinates, observing time on source and observing bandwidth are listed in the second row. The third row is the searching parameters such as the Array configuration, Searching radius on the sky, Equinox of the coordinates, Correlator mode and Observing band; each of them is attached with a multiple choice list. These choice lists, which are created from the Choice class in Java, are components that enable a single item to be picked from a pull-down manu. The fourth row includes the searching parameters as follows: Observing date, Observer name, Program ID, Title of Proposal, Data Set Name. In SmaJIsql1.0, not all the searching parameters have been applied to the query processes.
2. Query options: Three query options are provided in SmaJIsql1.0. Each of them corresponds to a stored procedure embedded in SMADB. Stored procedures are programs that are written using ANSI SQL commands combined with standard programming constructs. Stored procedures are secure and performance efficient. The first query option get_SourInfo is to search for the source information by selecting Object Name and/or Object RA (input format = hh:mm:ss.pp), Dec (input format = dd:am:as.p) and Searching radius. The returned results are SMA program ID code (Obs_code), Object name (Source), Object right ascension (Ra), Object declination (Dec), Calibration code (calc, T:target, C:calibrator), Total integration time (Otime), Observing date in mm/dd/yyyy (Obs_date), and Principal observer name (P. I. name).
The second query option get_FileInfo to search for the data file information by selecting Program ID or Principal observer name (Observer Name), or Observing date (in format mm/dd/yyyy). The returned results are SMA program ID code (Obs_code), Principal observer name (P. I. name), Observing date (Obs_date), Number of visibilities (#vis), Size of the data file in Mbytes (Size), Number of sources contained in each file (#source), Location of the files (the first character code C: Cambridge, H: Hilo, M: Mauna Kea) , Data file name.
The third query option get_FreqInfo is to search for frequency setup information by selecting Object Name or Observing Band or Program ID. The returned variables are SMA program ID code (Obs_code), Object name (Source), Observing frequency (Obs_freq in Hz), Channel width (Ch_width in Hz), Bandwidth (BW in Hz), Transition Name (Transition), Systematic Velocity (Sys_vel km/s).
More query options can be added in order to meet users' requirements.
3. Searching Key: The Search bar is an action key. By clicking it, The searching action will take place based on the input parameters and the selected query.
4. FTP or HTTP: By clicking the ftp bar, the Applet will link the user to the FTP and HTTP page from where the FITS-IDI files can be found. The data can be transferred via either ftp or http.
5. Results: This panel lists the results returned from each searching action based on the query option.