Web interfaces

Web access is provided to data in the MBARI_Samples Database. Web queries are begun from:

  1. Internal Query the Samples Database web site - complete data (shortcut within this document for info)
  2. External Query the Specimen Database web site - reduced set of data (shortcut within this document for info)
  3. Expedition search (shortcut within this document for info)

Note that non-web queries may be made using satellite MS Access databases, MS Excel, or directly with MS SQL Server utilities, with the proper applications installed on your machine, ODBC set up, and proper user permissions. These are better tools for generating truly custom queries and editing data than the web queries. See Sample Coordinator or Data Base Administrator for assistance.

The database, queries, and documentation are all on the server Godzilla. The domain name server (DNS) name is dbweb1 and the username embedded in the web queries is samWebUser. The web interfaces require Microsoft's Internet Information Server, FrontPage Extensions, and English Query, ESRI Internet Mapping Server, and ODBC drivers on the server.

1. The internal Query the Samples Database
Access to the full scope of data in the MBARI_Samples database is available through MBARI's internal web from the Canyon Head.

User instructions:
1. Ask a question from the Common queries, tutorial, or by typing directly into the box.
2. Select the "Ask Question" button.
3. All the specimens that meet the criteria are returned in a table.
4. Further information about a specimen can be retrieved by clicking on the hyperlinked ID number for that specimen.

Developer and maintainer instructions:
- Installation instructions and a list of the ASP files used in this application
- Official Microsoft product info for English query offers technical information, demos
- The MSEQ Whitepaper: Tornado\dropbox\Iag\samplesDB\mseq\EnglishQuery.doc
- The MSEQ Help File as a .chm (Compiled HTML): Tornado\dropbox\Iag\samplesDB\mseq\Eqbol.chm (internal to MBARI) This contains a useful step-by-step Tutorial for new EQ users. This uses hh.exe to read the file. You can also get to the file on FOG or Minke from Start->Program Files->Microsoft SQL Server 7.0->English Query->English Query Help.

The internal Query the Samples Database site has been constructed using Microsoft English Query within Active Server Pages (ASP) pages, with some VB Script and JavaScript. Note to developers: the main query page, "default.asp", operates within the virtual directory "queries" so that the global.asa file is read; if run from within the physical directory "samp_mseq", the global.asa file is not read and a runtime error will be reported.

With English Query technology, the user can ask any question in prose about the data, have it translated into SQL, and select the fields they wish to see in the return set. The user can to go back to the query to refine the question. On separate buttons, "common queries" are offered, which are based upon the list of queries originally presented on this site, and a "tutorial" is offered, which is a list of many examples of queries that the user may modify, complete with dropdown boxes to aid with spelling and format. The data are returned in a table in a frame below the query frame. The fields returned are set by the user or by default. From the return set table, the user may select the hyperlink in the MBARI ID field to view more information about the individual specimen, see a GIS map of collecting locations, get comma-delimited files or make labels (more about these below).
bulletSelect pages: Further data for individual specimens are found in the page "Sample Info", which is an ASP page that returns data for the selected sample. This page is reached from the initial return table by clicking the hyperlinked MBARI ID field. From there the user can choose to go to the ASP page "Images", which returns all the images on file for that specimen. From these "select pages", the user can go to the "edit pages" (below), can query for subsamples, view the VIMS annotations at the time the sample was collected, and other options. The "select" and "edit" pages call views in SQL Server.
bulletEdit pages: Information to be edited in the database can be entered with the "edit pages" for collecting event information, sample information, and images. These are ASP pages. These pages return the information that exists in the database for a particular specimen and offer form fields for the user to type in information to be changed. The action on the forms is to: A) send an e-mail to Jenny that lists any values typed into the fields, and B) append this data to a log file on the web site. Jenny then manually edits the data using a MS Access satellite database (e.g., sampleForms.mdb).

Attached to the internal Query the Samples Database site are links to several functions:
bulletComma-delimited files link asks the same SQL statement, but returns the data in a new page as comma-delimited text. View the instructions for exporting to other programs such as MS Excel. This link is from the return frame of the query page.
bulletCreate labels link first creates a comma-delimited file, then instructs the user to choose the type of label desired, and fires up a Microsoft Word document containing a macro that runs to create pages of the appropriate label size.
bulletView with GIS link first creates a comma-delimited file, then runs an applet to open a map showing the locations of all the samples in the query result set. See the documentation for the GIS display of samples data. This link is from the return frame of the query page.
bulletView the VIMS annotations link queries the VIMS (video annotation) database for all the annotations within 10 minutes on either side of the time the specimen was collected. This link is from the select "Sample Info" page.
bulletView subsamples sends an SQL statement for all other samples that share the same CollectionEventID and returns a table that resembles the original query return table. This link is from the "select" pages.

2. The external Query the Samples Database web site
The external Query the Samples Database site is not yet available. It is expected that it will enable users outside MBARI to ask a limited set of questions about the data and receive a limited scope of data in return. Use of the data is subject to the MBARI data use policy disclaimer:

Data use disclaimer: MBARI provides these data "as is", with no warranty, express or implied, of the data quality or consistency. It is provided without support and without obligation on the part of the Monterey Bay Aquarium Research Institute to assist in its use, correction, modification, or enhancement. For use in publication, authors should obtain written permission from MBARI's Director of Information and Technology Dissemination (mailto:conn@mbari.org), acknowledge MBARI as the data source in those publications, and provide reprints to the MBARI library.

The main query page contains a list of links to forms within which the values to be queried are specified by the user. This presentation of queries is based on Active Server Pages (ASP) rather than Microsoft's English Query. The queries were developed using Microsoft FrontPage and InterDev, and employ MS SQL views in the database.

Queries list: The main queries list is an HTML page. (See static example.)
Query forms: The forms that are linked from the queries list are ASPs. The action on the Submit button is to call the ASP returnTable.asp with the form values as variables and the particular query type (qType) as a hidden variable.
MS SQL views: The same "views" in SQL Server (similar to "queries" in MS Access) are called over and over again by the different queries and ASP files.
Return templates (ASP files): The return templates contain the SQL statements, identify the ODBC data source (e.g., sample1, the ODBC name for MBARI_Samples), and specify the appearance of the return pages. In most cases, the SQL statements pass variables through views in SQL Server to the database. The different types of return templates are:
bulletreturnTable.asp: The initial return from any of the main queries is a table. The variables were passed from the query forms. The hidden variable qType calls a case statement in the file, which determines which SQL statement will be passed to the database. (See static example.)
bulletSelect page templates: Further data for individual specimens are found in the page "Sample Info", which is an ASP page that returns data for the selected sample. (See static example.) This page is reached from the initial return table by clicking the hyperlinked MBARI ID field. From there the user can choose to go to the ASP page "Images", which returns all the images on file for that specimen. From these "select pages", the user can query for subsamples, and other options. The "select"pages call views in SQL Server.

3. The Expedition Search pages
An alternate way of retrieving sample data from the web and entering the above system of queries is through the tables generated in the Expedition search web site. The specimen information is summarized in these tables through an automated process that searches for specimens in the MBARI_Samples database.

»Next: English Query and ASPs
SamplesDB documentation in frames

Last updated: 10 February 2005 by Jennifer Paduan
Copyright © 1999 MBARI