Fermilab logo
Fermilab

Beams-doc-553
Version: 3
Category: Note



Notes on the Beams Document Database


Bruce C. Brown
Fermi National Accelerator Laboratory*
P.O. Box 500
Batavia, Illinois 60510

5/23/2003




*Operated by the Universities Research Association under contract with the U.S.
Department of Energy.

Topics

Introduction

The Beams Division has had a variety of notes systems which document various aspects of the complex and its operations. These systems have evolved in various ways since their introduction in the era when all documents were circulated as paper copies. In the fall of 2002, it was recognized that the work of the Main Injector Group was being impeded by the fact that their web system for documents was difficult to maintain and available new documents had not been added for a couple of years. A document database system which had evolved by use in several experimental groups was implemented to replace the MI-Notes web page system. This system was then made available to various groups and now is open for use across the Beams Division. This note will provide my personal view concerning current use of this system.

Additional Information on the Document Database

A paper on this document system, A Web Based Document Database, was presented at CHEP03. It provides a different sort of overview of this system. The 'get instructions' menu item within the database and references therein provide detailed information on the system and its use. Reference to a more technical description of the system is provided there: BTeV Document Database Design and Interface. If you find this note useful, it is linked as the 'Useful notes' menu item within the database.

DocDB Features

Please access the Beams Division Document Database. The system is implemented using a relational database, some perl code and a web interface.

Some Features to Notice

You will find most everything is obvious from the web interface.

DocDB Contacts

The following staff are contacts at present:

Use them as sources for username/password information and questions. This group plus support people can be reached via beams-docdb@fnal.gov. Your requests, comments and suggestions are welcome.

Inserting Complete Versions

Users of the document database are likely to lack one or more of the tools which a given author has to create documents. In particular, many Unix users cannot access MS Word or PowerPoint presentations (although there are programs available to access these file types on Unix). Similarly, some Windows users have not installed a Postscript viewer. We therefore recommend that the author seek to provide the document in formats which are widely readable such as POSTSCRIPT (.ps) or Portable Document Format (.pdf). If you have output in .ps, many Unix installations have a utility called ps2pdf to do the file conversion to .pdf. Windows users can 'print' to an Acrobat Distiller from Word or PowerPoint. Find a friend with Adobe Acrobat installed.

It is also true that many times a user would find it convenient to use something from your document in a new document so access to the source: figures, equations, or even templates or style files might be useful. The Document Database system encourages submission of a complete document -- all files for a given document. The source files for MSWord (.doc) or PowerPoint (.ppt) can be stored as well as postscript or .pdf versions. Perhaps you would like to include the Excel file which provides some calculation or data which you used and would like to share. The database can also accept data in any file format. For LaTeX documents, the supporting sources are likely to be in several files. For Web Documents (.html), the primary document may include files, such as included images, in separate files of various formats. We will describe how they can be conveniently brought along.

Some care should be exercised with regard to drawings. Procurement of fabricated items is often based on drawings with formal drawing numbers. Therefore formal drawing numbers are controlled. If you place a revisable version of a drawing into the database, consider making suitable notation changes so that the casual user will not produce and distribute a copy which can be mistaken for a formal release. I recommend the alternative of placing in the database only non-revisable versions (such as .ps or .pdf) of formal drawings.

When a document is selected from the database, the form displays the available files in lists: "Files in Document", "Other Files" (when applicable), and "Retrieve archive of files as" which provides a zip or tar archive file. When creating or adding files to a document, one selects 'main' (default) to have them displayed in the first list. The file classification can be modified using the "Update DB Info" option under "Create or Change".

Hints on Inserting Complete Versions

If you are storing a web page in DocDB, the most convenient way to assemble the needed files is to use the save feature of a browser. In Mozilla 1.2.1 one selects save as type `web page complete'. This results in an html file in the selected directory plus a subdirectory with the required files (and pointers suitably modified in the html file). There is a `all files' option in Netscape 4.7x and Internet Explorer 5 has the save `web page complete' but I have not confirmed that it provides the same capability. If one uses an otherwise unoccupied directory, the file specification for tar or zip is particularly simple. Note that while this brings along embedded images or other 'related' files, if your 'document' consists of several .html files, the browser cannot know to follow just some links (and cannot follow all links) so you need to exercise care to bring all of 'yours' along. This means putting them in the same directory or a subdirectory and correctly specifying the appropriate links. In placing a version of this document into the database I discovered that the appropriate 'relative' links had been replaced with 'complete' links -- but to the directory from which I was extracting the file. You can see this if you look at the 'Topics' menu in V2 of this document.

To assemble sources for LaTeX documents, one can simply copy them into an empty directory. It is useful to provide the TeX or LaTeX source (.tex), any graphic files which were used, and any special style files which may not be widely or conveniently available. I have also included the intermediate device independent .dvi file in case it might be useful.

The form which allows you to upload a complete document in an archive (tar or zip) format will also ask you to describe the file in that archive to be included as the 'main' file. Be prepared to provide that file name exactly.

Assembling tar Archive on Unix (Sun - Solaris)
I had to re-learn tar for this purpose. Let me provide an example. I have a work area for documents: ~bcbrown/MI_DocStore with a subdirectory ~bcbrown/MI_DocStore/Doc_Archive/. I save my html page or copy my LaTeX sources to this subdirectory. For MI-0004 I did this, then created a tar archive with the command
    tar cf ../MI-0004.tar  . 
This created the archive from the files in the current directory and its subdirectories and places the output file one level up.
Assembling a zip archive on Windows

My Windows 2000 machine has WinZip loaded. I have used it to create a zip archive for uploading to DocDB. Here is what worked (described from the WinZip 'Classic' (not 'Wizard') interface).

  1. Invoke WinZip.
  2. Select New and give a file name.
  3. It will then present a window for creating the archive. On the lower right corner devoted to Folders
    1. Select Recurse Folders
    2. Unselect Save Extra Folder Info (otherwise the subdirectory labeling will include a full or nearly full tree... ugh).
  4. Then add the files using the 'Add with Wild Cards' option.
If you started in a clean enough directory, this will be straightforward.

Comments on Browsers

Resizing Problems with Netscape 4.7

Since some of us remain using Netscape 4.7x for browsing (and e-mail), we are more sensitive to some features which others of you can ignore. A particularly aggravating feature is the poor handling of resizing by that Netscape version. If one is filling in a DocDB form and decide that a larger (or smaller) screen would make the job easier, you will have to realize that the form will be repainted and any data entered will be lost.

Selecting Multiple Items in a Menu List

Note also that the key combinations which permit one to select more than one item in a menu list (author, topic...) will be different with different browsers. Simple clicks, clicks with control key and perhaps shift-click will provide the selection of an additional (rather than all between or replacement) for a given browser.

More modern browsers better support the DocDB functionality.

Other Notes Systems

In its early days, Fermilab maintained two sets of formal note systems: TM (Technical Memos) and FN (Physics Notes). The Beams Division (then the Accelerator Division) had an Exp (Accelerator Experiment) notes system. The AntiProton Source project created PBar Notes as a separate system and the model was followed for Main Injector Notes and MTF Notes (Magnet Test Facility). In early 2003, a new page SEARCH for Fermilab Preprints has been provided by the Library group which makes easy access to many of these note systems (but not all). I note that there are PBar Notes available on the web are better accessed at this time via links on the Documents page of the Antiproton Source page reached via the Beams Division web site.

The Main Injector Group has maintained a formal note system since 1989. In the summer of 1998 and again one summer since then, summer help has scanned old documents and converted them to a machine readable form. The access to them has been provided via a web page (MI Notes). The system has not been successfully maintained for documents created since 1999. We have reserved Beams-doc numbers for available MI Notes. We indicate the MI-Note number in the "Publication Information" field. Efforts to move quality copies of these documents to DocDB is underway.MI-Notes are available from a paper file. Contact the Main Injector secretary for copies. A menu to access these from the document database web site is available and will be fully implemented when the insertion of MI-Notes is complete.

The EXP notes are available from Beams Division secretaries. A subtopic for them has been reserved under Beam Physics. I suggest that for transferring these and other notes systems, the option of using the "Publication Information" field to identify them can be quite satisfactory. Since it is a free-form data entry field, some care will be required to guarantee accuracy, but corrections of database information is not a problem.