twass — a database for the transport of dangerous goods by sea

9
TWASS - A Database for the Transport of Dangerous Goods by Sea A.M. Heinecke Faehbereich Informatik (ANT), Universitgt Hamburg, Troplowitzstr. 7, D-2000 Hamburg 54, Federal Republic of Germany H.-J. Golchert FSSH - Hamburg Maritime Research, Elbchaussee 43, D-2000 Hamburg 50, Federal Republic of Germany ABSTRACT The TWASS database has been implemented as part of a research project on the trans- portation of dangerous goods by sea-going vessels within the territorial waters of the Federal Republic of Germany. The project aimed at getting statistical data referring to the substances that are actually transhipped in German ports. Transhipment data can be evaluated with respect to ports, seaways, substances or attributes of substances, and period. The user has no direct access to the database, but works with menus and forms. Therefore neither database knowledge nor detailed chemical knowledge is required for entering data from the transportation notes of the ships. The system has been implemented on a COMPAQ 286 deskpro microcomputer using dBase III under MS-DOS. Discussing the task and the structure of TWASS we will also raise the question in how far dBase III supports the implementation of a database application of this kind. Keywords database, dangerous goods, micro-computer, risk analysis, shipping, marine pollution. INTRODUCTION hazards for the marine environment by the transport of substances endangering water. Thus data collection had Transport of hazardous goods by ships to be extended to all sorts of hazardous substances tran- The problem The transport of hazardous goods by sea- shipped in bulk or in packaged form. These data were going ships bears substantial danger to the marine environ- to be evaluated with respect to ports and seaways not ment. In order to be able to calculate the risk resulting only in terms of transport volume but also in terms of from sea traffic and to determine possible preventive risk of pollution. Furthermore, pollution by ship operation measures against marine pollution by accidents of ships (oily residues, e.g.) had to be examined as well as techni- there is a need for exact data referring to the kind of cal and legal conditions for transport and transhipment. transported substances, the frequency of transports, and the seaways used for transport. Such statistical data Data acquisition Commencing data gathering Hamburg related to different substances transported on the water- Maritime Research assumed an extension of CHEMDAT ways of the Federal Republic of Germany had not been from 300 to 2000 substances and from 1180 lots per half available so far [1]. year to 2000 lots per month to be necessary. It was planned to hold data on one floppy disk per month. By A preliminary study In 1982, Hamburg Maritime Re- this extension the program became very slow with extreme- search started the first data acquisition on the trans- ly long processing time when the list of substances was portation of dangerous goods examining noxious liquid to be altered. With data gathering proceeding the total substances transported in bulk only. A BASIC program amount of lots per month turned out to be 10 times CHEMDAT was implemented on a Commodore MMF 9000 higher than estimated, i.e. 20000 rather than 2000. This micro-computer in order to enter and store data on the could not be handled with the existing system, neither substances to be considered and the actual transhipment with the Commodore MMF 9000 hardware nor with the of these substances. Data could be evaluated with respect CHEMDAT program. to ports and waterways. 64 of the 300 stored substances were transhipped during the examined period with a total Mainly for the reason of being compatible to busi- of 1180 lots [2]. hess standards a Compaq 286 deskpro computer with 30 MByte harddisk and 10 MByte backup tape was de- cided to be the successor of the MMF 9000 system. The The research project dBase III database system under MS-DOS was to be used Scope and structure In 1984, the Umweltbundesamt as a tool for programming the successor of CHEMDAT (German Federal Office of Environment) initiated a research named TWASS (Transport wassergef~ihrdender Stoffe auf project "Marine pollution in connection with the transport Seeschiffen). Data that had already been entered could of hazardous goods by ships Present situation and be transferred to the TWASS system. Programming started recommendations" [3]. The study aimed at describing the by writing the modules for managing the list of substances Paper receiv*d 1 June 1988 and zn final form on 2.5 November 1988 Refcr~e: Carmen M. llenkovilz II II II II I Environmental Software, 1989, Vol. 4, No. 1 17

Upload: am-heinecke

Post on 21-Jun-2016

213 views

Category:

Documents


1 download

TRANSCRIPT

T W A S S - A D a t a b a s e for t h e T r a n s p o r t o f D a n g e r o u s G o o d s by Sea A.M. Heinecke Faehbereich Informatik (ANT), Universitgt Hamburg, Troplowitzstr. 7, D-2000 Hamburg 54, Federal Republic of Germany

H.-J. Golchert FSSH - Hamburg Maritime Research, Elbchaussee 43, D-2000 Hamburg 50, Federal Republic of Germany

ABSTRACT

The TWASS database has been implemented as part of a research project on the trans- portation of dangerous goods by sea-going vessels within the territorial waters of the Federal Republic of Germany. The project aimed at getting statistical data referring to the substances that are actually transhipped in German ports.

Transhipment data can be evaluated with respect to ports, seaways, substances or attributes of substances, and period. The user has no direct access to the database, but works with menus and forms. Therefore neither database knowledge nor detailed chemical knowledge is required for entering data from the transportation notes of the ships.

The system has been implemented on a COMPAQ 286 deskpro microcomputer using dBase III under MS-DOS. Discussing the task and the structure of TWASS we will also raise the question in how far dBase III supports the implementation of a database application of this kind.

Keywords database, dangerous goods, micro-computer, risk analysis, shipping, marine pollution.

INTRODUCTION hazards for the marine environment by the transport of substances endangering water. Thus data collection had

Transport of hazardous goods by ships to be extended to all sorts of hazardous substances tran- The problem The transport of hazardous goods by sea- shipped in bulk or in packaged form. These data were going ships bears substantial danger to the marine environ- to be evaluated with respect to ports and seaways not ment. In order to be able to calculate the risk resulting only in terms of transport volume but also in terms of from sea traffic and to determine possible preventive risk of pollution. Furthermore, pollution by ship operation measures against marine pollution by accidents of ships (oily residues, e.g.) had to be examined as well as techni- there is a need for exact data referring to the kind of cal and legal conditions for transport and transhipment. transported substances, the frequency of transports, and the seaways used for transport. Such statistical data Data acquisition Commencing data gathering Hamburg related to different substances transported on the water- Maritime Research assumed an extension of CHEMDAT ways of the Federal Republic of Germany had not been from 300 to 2000 substances and from 1180 lots per half available so far [1]. year to 2000 lots per month to be necessary. It was

planned to hold data on one floppy disk per month. By A preliminary study In 1982, Hamburg Maritime Re- this extension the program became very slow with extreme- search started the first data acquisition on the trans- ly long processing time when the list of substances was portation of dangerous goods examining noxious liquid to be altered. With data gathering proceeding the total substances transported in bulk only. A BASIC program amount of lots per month turned out to be 10 times CHEMDAT was implemented on a Commodore MMF 9000 higher than estimated, i.e. 20000 rather than 2000. This micro-computer in order to enter and store data on the could not be handled with the existing system, neither substances to be considered and the actual transhipment with the Commodore MMF 9000 hardware nor with the of these substances. Data could be evaluated with respect CHEMDAT program. to ports and waterways. 64 of the 300 stored substances were transhipped during the examined period with a total Mainly for the reason of being compatible to busi- of 1180 lots [2]. hess standards a Compaq 286 deskpro computer with

30 MByte harddisk and 10 MByte backup tape was de- cided to be the successor of the MMF 9000 system. The

The research project dBase III database system under MS-DOS was to be used Scope and structure In 1984, the Umweltbundesamt as a tool for programming the successor of CHEMDAT (German Federal Office of Environment) initiated a research named TWASS (Transport wassergef~ihrdender Stoffe auf project "Marine pollution in connection with the transport Seeschiffen). Data that had already been entered could of hazardous goods by ships Present situation and be transferred to the TWASS system. Programming started recommendations" [3]. The study aimed at describing the by writing the modules for managing the list of substances

Paper receiv*d 1 June 1988 and zn final form on 2.5 November 1988 Refcr~e: Carmen M. llenkovilz I I I I II I I I

Environmental Software, 1989, Vol. 4, No. 1 17

TWASS: A.M. Heinecke g/H.-J. Golchert

and for entering transport data in order to proceed with As the lists of dangerous goods like the Internation- data gathering as soon as possible. The TWASS database al Maritime Dangerous Goods Code [5] do not always had to be designed for gathering all acts of t ranshipment contain enough data for judging the possible danger to of goods that endanger water which are performed in sea-water, Hamburg Maritime Research had to use several ports at waterways used by seagoing ships within the sources like the MARPOL agreement [6] and the GESAMP terri torial waters of the Federal Republic of Germany. list [7 ] in order to build the list of substances for TWASS.

Nevertheless, there ore many substances stored in the system which could not be classified in one of the four

THE TWASS DATABASE hazard categories according to the MARPOL agreement.

Origin of. data Structure of the database Data of transhipment Regulations of the declaration of Terminology As the dBase lU design is oriented to the transhipment or transport of dangerous goods by s h i p s relational data model we shall use the terminology of mainly depend on national and state law. According to relational databases [8 and 9] in describing the TWASS international agreements the German Regulations of the system. Given a collection of sets D1, D2 . . . . . Dn (not Transport of Dangerous Goods by Seagoing Ships [4 ] necessarily distinct), R is a relation on these n sets if it require a notification to the port authorities containing is a set of ordered n-tuples ~dl, d2 . . . . . dn~ such that

- the correct technical name of the dangerous cargo, cll belongs to D1, d2 belongs to D2 . . . . . dn belongs to - the UN number which is an international identification, Dn. Sets D1, D2 . . . . . Dn are the domains of R. The value - the IMDG class which depends on whether the sub- n is the degree of R. A relation can be represented as stance is explosive, inflammable, acid, toxic, and so on, a table. Figure 1 shows a part of the relation TWTR84. - number and weight of the transported lots, We shall denote relations by names in CAPITALS. - the name of the ship.

Each row of the table represents one tuple of the Such declarations have to be given to the port relation which describes one entity of the real world. Thus

authorities in writing. As there is no compulsory form for the terms "tuple" and "enti ty" can be used quite similarly, these notifications the sequence of the items may vary the first one referring more to database architecture, the between declaration lists. These t ransportat ion notes have latter one more to database contents. As a relation is a to be stored at the port authorities or the harbour police set, there is no ordering defined among the tuples, and department for a certain time. Hamburg Maritime Research tuples have to be distinct from one another. Nevertheless, received all transportation notes of the period from dBase III stores the tuples as records of a file, and hence 01-01-1984 to 06-30-1984 from the authorities in order to each record has an internal number which shall be used gather data for the research project. For reasons of data for internal database processing only. privacy protection the notes had to be stored without the ship's name. The columns are called attributes, each tuple is de-

fined by its attribute values. Attributes are drawn from Data of substances The transportation note does not the corresponding domains and have to be distinct from indicate whether the transported substance may cause each other, whereas the domains need not. For example, marine pollution. For example, there are many explosives in relation TWTR84 the attributes Port, Origin, and Destina- which do not endanger water. In order to judge the risk tion are drawn from the same domain PCode which of marine pollution by such goods it is necessary to have consists of 3-digit codes. In terms of the definition of a a list of substances. This list holds data describing the relation, the attributes have an ordering so that re-arrang- substance with respect to its possible effects on the ing the columns would result in a different relation. But marine environment. Using this list the TWASS system is as the attributes are referred to by names rather than able to decide whether an act of transhipment has to by position, column ordering may be neglected. We shall be stored, start attribute names with Capital Letters.

Relation T W T R 8 4

Domains • Dates PCode SubstKey Number FCode PCode MCode PaCd SCd

Attributes~ Date I Port iKeyNumber Weight i Origin iDestinationlModelPackagelShip

. . . . . . . . . . . . . . .

~98573 22 /03 /84 211 1804 23500 000 211 M Oa S

~98574 22 /03 /84 211 1302 1500 211 999 V 0a S

~98575 22 /03 /84 211 902 50 110 000 V Oa S

~98576 21/03/84 110 1804 20000 110 000 M 0a S

~98577 21/03/84 110 902 50 110 000 V Oa S

. . . . . . . . . . . . . . . . . . * * . . . . . . . . . .

I I I I I I I I I

Figure 1. Part of relation TWTR84 (lot data) shown as a table. The attributes drawn from the domain PCode (Port of transhipment, port of Origin, pnrt of Destination) can be used in order to look for the Port Name in relation TWHAE, where there is a key attribute Port Number.

18 Environmental Software, 1989, Vol. 4, No. 1

TWASS: A.M. Heinecke ~' H.-J. Golchert i i i i

A key is an attr ibute which has a unique value for General s t r u c t u r e o f 1"~/A$S Using the terminology of all tuples of the relation or a combination of attributes relational databases we have several relations containing which together are unique for all tuples. Thus every tuple substances, transhipment lots, and evaluation data. Figure 4 can be identified by its key. There may be several keys shows the system structure of TWASS and the data flow. within one relation. As keys are used for retrieving tuples, As defined above, the relations are indicated by names it may be convenient to see the relation as ordered by in CAPITALS, the indices by names in ITALICS. The second the key values. In dBase III, like in many other database line of a relation symbol (outlined) gives the number of systems, this view can be obtained by creating an index tuples in that relation, the second line of an index symbol file with respect to the key. If this index has been (dashed) indicates the attribute for indexing. There are activated, dBase III processes the relation as if it were some additional relations and indices for system purposes sorted allowing the use of "get next" and "get preceding" which allow a rapid alteration of menus, error messages, operator, for example. Indexing is possible with respect help texts, and so on. These are not shown in Figure 4 to attributes that are not keys, too. We shall denote but discussed later. index files by names in upper case ITALICS. Figure 2 shows the relation TWHAE which has two key attributes. The relation TWSL (substances) TWSL represents the There are indices on these keys and other attributes, list o f s u b s t a n c e s . Thus each entity is a chemical sub-

stance which has to be declared when transported by a Usually a database consists of several relations which vessel. The main attributes are UN-Number, Name of the

may be linked by common attributes. If an attribute At t r substance, possible Modes of transportation (bulk, packaged is a key in at least one of two relations PREL and QREL etc.), IMDG Class, and MARPOL hazard Category which that are to be linked [say in QREL), this can be easily together identify a tuple (see Figure 3). There are other done by a natural join. The join creates a new relation attributes giving additional information on the substances RREL matching every tuple of PREL having a certain which can be listed or displayed on the screen (see value for At t r with exactly the one tuple in QREL having below, Figure 5). the same value for Attr . RREL consists of tuples having all of the attributes of the attributes of PREL and QREL, As dangerous goods are often mixtures of chemical but the attribute At t r only once. Figure 3 shows a join substances {e.g., amylalcohol) which may also occur with of the relations TWTR84UM (as PREL) and TWSL (as QREL) a different technical name (e.g., pentanol) and which by the attr ibute KeyNumber of substance (as Attr). How- may have different properties according to the mixture ever, dBase III does not perform joins by really creating (e.g., flash point) classifying them in different IMDG classes a new relation but establishes a temporary link between the identification of a substance is nearly impossible if the two relations allowing access to the corresponding the user does not have detailed chemical knowledge. On QREL-tuple from a given PREL-tuple. the other hand, the values of at least some of the

Relation T W H A E

[ PCode NString Bool Number Number Number NumberNumberNumberNumber Domains

Attributes ' • - "~ Total Import Export tTransit iLots lMinim, jMaxim. Key Attr ~JPortNum.[rorrr~ame iPrt j ] I

~9 i10 Hamburg T 234500 76200 111100 47200 534 200 1850

~10 121 BiJtzfleth T 0 0 0 O 0 0 0

~11 21i Bremen T 12560 0 4550 8010 15 1000 1850

~12 000 North Sea F 0 0 0 0 0 0 0

~13 999 Baltic Sea F 0 0 0 0 0 0 0

. . . . , . . . . . . . . . . . . . . . . . . , . . . . , . . , .

( I ( I ! I I I I I I

Index TWHAENR [on key PortNumber) • [000, ~t12], [110, ~t9], [121, =10] . . . . . [211, ~11] . . . . . [999, ~t13],

Index TWHAENA [on key PoHName) ..... [Baltic Sea, ¢t13], [Bremen, ~11] ..... [BLitzfleth, =10] ..... [Hamburg, =9] ..... [North Sea, ¢~12] . . . . .

Index TWHAEGE (on Total) . [0, 10], [0, 12], [0, . . . . . [12560, .11] . . . . . [234500, =9] . . . . .

Index TWHAEAN (on Lots) • [o, .1o], [o, =12], [o, =13] . . . . . [15, =11] . . . . . [534, . . . . .

Figure 2. Relation TWHAE shown as a table, indices to TWHAE on different attributes shown in linear order. The internal organisation of the index files is not available to the database application programmer.

Environmental Software, 1989, Vol. 4, No. 1 19

TWASS: A.M. tteinecke gJ H.-J. Golchert

Relation TWT84UM (added transhipment)

Attrib.~ KeyNum. jPortNum, jMode I Import I Export I Transit iLots] Minim. j Maxim. J

~3211 1804 211 (~ 156670 23500 10050 121 800 3500

~3212 1804 110 O 255770 2300 20500 150 1000 5000

~3213 1804 110 V 12250 12250 0 13 1000 1200

~3214 902 110 V 50505 40405 10000 403 80 350

~3215 1302 211 V 0 56700 0 567 50 120

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 _ _ I I I I I I I I

Relation TWSL (substances)

Attr ib.~lKeyNum.lUN-Num. Name jMods.jClass I Cat. jProfile j la thers) ]

" ' " " ° ° I " ° "

~1711 902 1307 Dimethyl benzene 0÷00÷ 3.1 C 02 10X ...

~1712 1804 1115 Benzine ~000+ 3.1 U UU UUU ...

~1713 1805 1115 Benzine ~000÷ 3.2 U UU UUU ...

~1714 1302 1115 Benzine, leaded ~000÷ 3.1 B U3 IlIXX ...

~1715 1305 1116 Benzene 0+00+ 3.2 B U3 IlIXX ...

° ° ° . . . . . . . ° ° ° . ° . ° ° ° ° . ° . . . ° .

I I I I I I I I I

"Joined" Relation

Common former TWSL attributes Ilformer TWTR84UM attrib.

Attrib.~ KeyNu . UN-Nu 1 Name iMods.lClassj Cat. iProfile i(oth.)JPortNu.jModejlmport j(oth.)

~3211 1804 1115 Benzine +000+ 3.1 U IJU UUU ... 211 0 !156670 ...

~3212 1804 1115 Benzine +000+ 3.1 U UU UUU ... 110 0 255770 ...

~3213 1804 1115 Benzine ÷000+ 3.1 U UU UUU ... 110 V 12250 ...

~3214 902 1307 Dimethyh. 0÷00÷ 3.1 C 02 10X ... 110 V 50505 ...

~3215 1302 1115 Benzine,h.+000+ 3.1 B U3 IlIXX ... 211 V 0 ... . . . . . . • ° . . . . . . . . . . . . . . . . . . • . . . . . . . . . . . .

I I I I I I I I I I I I I

Figure 3. Join of the relation TWTR84UM (added transhipment) with TWSL (substances) in order to evaluate transhipment data with respect to substance attributes.

attributes of many tuples had not yet been found out The relation TWTR84 (transported lots) TWTR84 con- when data gathering of transhipment started but were tains transhipment data of the first half of 1984. It is to be added later, possible to create additional relations for other years.

The most important attributes are Port of transhipment, In order to allow data gathering as soon as possible KeyNumber of the transhipped substance, Weight of the

each entity was given a unique number as an artificial lot, port of Origin, port of Destination, and Mode of primary key which is not accessible by the user. There is transportation (see Figure 1). Input of lot data is done one index to TWSL using this KeyNumber (TW.~I(L~, another by first entering the UN-Number of the substance into a one using the UN-Number of the substance (TWSLUI~, form. Using the TWSLUN index the system searches for and a third one using the Name of the substance (TW.SLIqA). all tuples in TWSL having this UN-Number. While the latter two are used for sorted output in all printed lists, the first one is used during internal processing If there is no such tuple, the lot has to be docu- for linking the relations of transhipment data and transport mented in a relation TWDO. For this purpose the user data to TWSL, like shown in Figure 3. The list of substances also enters the Name of the substance and the Class as can be printed as a whole in alphabetical (Names) or far as it is obvious from the transportation note. At the numerical (UN-Numbers) order, end of data gathering the relation TWDO is printed as

I I

20 Environmental Software, 1989, Vol. 4, No. 1

TWASS: A.M. Heinecke ~ H.-J. Golchert |

the list of doubtful eases which have to be examined The hazard Categories A to D of MARPOL indicate by experts in order to decide whether a substance has that a substance is a marine pollutant. Transhipment data to be added to TWSL or whether there is just a writing of substances which are marked as not endangering sea- error in the transportation note. TWDO is deleted after water {named Category N by Hamburg Maritime Research} printing, are rejected at input and not stored within the database

in order to reduce the amount of data. As long as it is If there is at least one topic with that UN-Number, uncertain whether a substance may be endagering water

the system indicates how many tuples have been found. it is marked as Category U (unknown) and transhipment The user may then examine these entities sequentially to data belonging to this substance is stored. If later on this see whether one of them corresponds to the transporta- substance becomes known as not endangering water, all tion note with respect to the other attributes mentioned corresponding transhipment data will be deleted. Therefore above. In this case the user selects it by pressing a key an integrity violation occurs if a substance has been and the system takes the KeyNumber of this tuple and marked N due to an error and is later put in another enters it into the TWTR84 record. If there is no substance Category in the course of data gathering. But this case corresponding to the transportation note the lot record is of law probability. has to be entered into TWDO.

The relation TWTR84UM (added transhlpment) In order to evaluate transhipment data the relation TWTR84UM is constructed. For every port, every substance, and every mode of transportation there is one tuple with the

//(MSUbstances / / T r a n s h i p m e n t / following attributes: KeyNumber of the substance, Port of D G c o d e / / t ransportat ion/( transhipment, Mode of transportation, total amount of e t c / . / notes / Import, total amount of Export, total amount of Transit,

/ number of transhipped lots, Minimum weight, and Maximum TW,~J- Port Number (TWHAE) d weight (see Figure 3). The user has to enter the period 2,622 substance ~ of the for which data is to be evaluated. TWTR84UM tuples attributes, year substances Key Number(TWSL),L)/7~;L) is not updated during lot data gathering.

::-J]'V¢'Si/~/'4--;: f o u n d / ~notfound The relation TWTR84RV (added transport) While Name " ~ 1 ~ - ~ TWTR84UM contains data related to transhipment in ports

i-'TWSLUJV--I i132,578 tuples only for printing TWTR84RV holds data describing the transport of sub- iUN-Number i lot data uncertain lots stances on waterways. For every waterway, every sub- :-:TW.~//(E'--', I-J-).~/~.R-8~ -- ~ stance, and every mode of transportation there is one , , List of " tuple with the following attributes: Key Number of the :Key Numberj : i_K_e.y.Num.b, er doubtful cases substance, Mode of transportation, Waterway, total amount

of Transport, and number of transported Lots. There are i List of also attributes for risk analysis which are used when print-

substances ing the appropriate lists. Similar to the transhipment rela- I. / / \ tion the transport relation is constructed on application

by the user and nat updated during lot data gathering. TWREWER ! 106 tuples

substance~11 ~ Other relations There are two other relations which are necessary for constructing the evaluation relations.

TWTR84UM TWTR84RV J i-tI~/~EV/'E'R'Li TWHAE describes the ports which were examined. For forJ ~ - - J 4 7 6 2 tuples 3570tuples I PortNumber: every port there are the PortName and a PortNumber

added transh, added transp, i ' . . . . . . . . . . . . J mainly for reasons of accelerating data gathering. There L---~ I filters Jr I ; rWHAE YWtR-8;iOE-I!-TH/)"RS;tRi(i are additional attributes which are used when the user

58 t u p l e s _K_e_y__Num_b_erj!Key_ N.umbe.rj selects a survey of ports: Total amount of transhipment, total amount of Import, total amount of Export, total

ports ~:~t~I~8-d~I~I-ii-~WTR-8~dR~A- amount of Transit, number of transhipped Lots, Minimum TWHAENR ' Port Number::UN-Number ~ weight, and Maximum weight (see Figure 2).

Port Numbel '," ~7"/~8",~R/~" ', :-Tkg'/-/',4L~/~/,4" ] :Waterway : TWREV contains the description of waterways. For !_Por_t__N__a_m__e_ :.._&...Rj~k__..; ~1 possible combinations of port of Origin and port of Destiny

','~'[~'T/~8"~R/,/-', / there are the Waterways between these ports and the I'~[4//-/A~'GE" ' ,Waterway' , .1 Lengths of the waterways. These data are used when i Total ',&_Ol~-Hi/rr~Jo..; constructing TWTR84RV.

i-)~H?/~/AEA-/~/- ~ , Analysis of data ', Lots ~ substance attributes far filters )i l Transhipment data As dBase lU offers no graphic tools, . . . . . . . . . . . . . .~ (TWSL) ~ data output has to be printed as lists. There are two Lists of tran- Lists of tran- Lists of trans- Lists of trans- types of listings describing transhipment data. The detailed

J shipment IL shipment JJ. porf qnd risk JJ. port qncl risk I list offers all data that is stored in TWTR84UM. For ~ ~ ~ ~ every port there are all substances which are transhipped

in this port sorted sequentially according to their UN- Numbers, to their Names, or to their Total amount of

Figure 4. TWASS system structure transhipment. For every substance there are two lines, the first one showing UN-Number, Name, IMDG Class,

i

Env i ronmen ta l Software, 1989, Vol. 4, No. 1 21

TWASS: A.M. Heinecke g)' H.-J. Golchert

MARPOL Category, and Mode of transportation, the water as those transported in bulk, the danger resulting second one indicating the Total amount of transhipment, from packaged substances was seen to be generally 10 the amount of Import, Export and Transit, the total number times lower than that of the same substance in bulk. of Lots, and the weight of the Minimum, the Maximum Then the relative risk is obtained by multiplying the aver- and the medium lot (computed from Total and Lots). age quantity, the average length of way, and the hazard

factor. The survey of ports shows the Total amount of

transhipment, the amount of Import, the amount of Export, In order to compare the risk related to different the amount of Transit, the number of transhipped Lots, substances transported on different waterways, the second and the Minimum, Maximum and medium lot. The list can type of listing gives a survey of waterways. For each be sorted by PortNames, by Total amount of tranship- substance there is a line containing the name of the sub- ment, or by number of transhipped Lots. This list is not stance, the MARPOL category, and the relative risks for very useful when summing up all substances because of each of the nine waterways that had to be analysed. their very different hazard profiles, but it can be used Like the lists of transhipment, both types of listings can very well with filters, be printed using a filter in order to obtain certain sub-

stances only.

A f i l ter selects only those tuples of a relation which fulfil certain conditions related to their attribute User interface data. As the transhipment data relation TWTR84UM can Display lay-out The TWASS display lay-out has been be linked to TWSL by the KeyNumber of the substance designed to achieve an ergonomical user interface which (see Figure 3), it is possible to define a filter on the does not imply detailed chemical or database knowledge. attributes of the substance data relation TWSL in order Data gathering should be possible after a short lesson to obtain transhipment data of certain substances only. without using a manual. In order to assist the user the Both types of listings can be printed using such a filter. TWASS display is permanently arranged as in Figure 5. The filter may reduce data to a certain range of UN-

Below the headline there is an information line. Numbers, of Names, of MARPOL Categories, of IMDG Classes, of transportation Modes, or of any combination This line shows the path the user has selected within the of those. For example, you can get a survey of ports hierarchy of the menu tree. On the right side, UN or showing the transhipment of packaged substances of NAME indicates the attr ibute that is presently used for MARPOL category A belonging to IMDG class 3 (inflam- sorting. If a filter has been set, this will be indicated in mable). The same sort of filter can be set when printing the information line by FILT. If a listing is to be printed, the list of substances, the type (detailed or survey) will be shown, too.

Transport data Like transhipment data transport data The next two lines are used for error messages can also be printed using two types of listings. The and user assistance. Every time the user has to enter

data into a form, there will be a text indicating the per- detailed l isting of transport on waterways is similar to mitred values; if the user has to choose between a small that one of transhipment data in ports. Each line refers number of values, a text indicates that an item can be to an entity in TWTR84RV and shows the UN-Number, selected by pressing certain keys. In Figure 5 this line the Name and the MARPOL Category of the substance, shows the number of tuples the system has found during the Mode of transportation, the average Weight of a the search, and the prompt for pressing the F2 key. lot, the average Length of the way, the Frequency of

transportation, and the relative Risk. The listing may be The menu area is situated below the information sorted according to UN Numbers, Names, and Risk. lines. The menu choice is performed by pressing function

Normally, a risk is defined to be the product of keys. The explanation of the keys is arranged according the probability of the event and the damage resulting to the arrangement of the function keys within the key- from the event [10] . As there is not much data about board. In every menu, the F10 key will provide an exit frequency and effects of incidents by ships resulting in to the next upper node in the menu tree without perform- marine pollution a statistical calculation of risks is nearly ing any action, whereas the F1 key will give a help text

in the lowest part of the screen. impossible. On the other hand, an analytical approach could not be performed within the scope of the project. Below the menu area, there is the working area. Therefore Hamburg Maritime Research developed a concept This area contains the forms for input or the selected out- for calculating a so-called relative risk in order to compare put. If the user has filled a form, a menu appears which different waterways and to name priorities for measures offers the choice between altering the form (re-filling), against pollution, storing the data of the form, or quitting the menu with

the form being abandoned. Such prompts for confirmation For calculating the relat ive risk we assume that will also appear if data is to be deleted or actions are

the probability of an accident depends on the average to be performed which will take a long time (creation of length of a waterway and the frequency of transport, a new transhipment relation, e.g.). whereas the possible damage is proportional to the trans- ported quantitiy of dangerous cargo and the properties The lowest part of the screen is used for additional of the cargo. As the MARPOL category describes the information like help texts. When working on the list of property "endangering sea-water" the lowest category D substances the user may select the INFO menu for choosing was decided to have the hazard factor of 1 when trans- the content of this area. In Figure 5 the hazard profile ported in bulk. The higher categories C, B, and A were which appears in abbreviated form within the working seen to be 10, 100, and 1000 times more dangerous then area is shown here in full textual form. a D substance. As dangerous goods in packaged form are somehow prevented from getting as quick into sea-

l . . , , , i i l l | i i

22 Environmental Software, 1989, Vol. 4, No. 1

TWASS: A.M. Heinecke ~J H.-J. Go/chert

rggss 2,t Transport Nassergef~hrdender Stoffe auf Seeschiffen ah-sofl ->HAZN->SUBSTANCES->flROXSE ug 4ueber of items found:

F~oka9 last iten IF'4-1next iten

:5-S-]search item rF6-]change sorting

:-i-11HFO IF~-]FZLTER

~i-~back to SUBSTRNCES Menu UN Prefix o Naee t307]1 Dinethyl benzene

~aPo~ Group~ oxi~ in f e ~ p ~ c a u oil~ flu~ sol~g~S~LUj pL~d PcGr~ [---dT~~--~Viscos at°C

Hazard pro f i le : g:Hot knoHn to be signiFicantlg bioaccuMulated " I f l :Sl ight lg toxic I I C:Practicall9 non hazarJous D:Hon-hazardous (solution) E:lSlight prob]ees~ beach use uneffected

Figure 5. TWASS display

Menus and forms TWASS is a complete user's machine, dialogue can be implemented. The same concept holds After booting of the computer the user works with menus for help texts which are also stored as a relation TWHELP. and forms only. Figure 6 shows the structure of TWASS This provides a way of changing the TWASS system from the user's point of view. Menus are indicated by from German language to English, e.g., without many CAPITALS, forms by italics. The user cannot leave the alterations of the program text. hierarchy of the menu tree except by pressing the F10 key (END) in the main menu. Data backup is not performed Problems As messages, help texts, and menus a stored from the user interface, as relations and called by the program using a key number,

every relation needs an additional index on those key numbers. Then every relation and every index is an open file in terms of the operating system, and thus the number

PROJECT EVALUATION of open files can become too high. In order to avoid

Implementation this the access to data of these relations can be perform- Rapid prototyping When programming started there was ed by internal dBase III record number without using an only a rough specification of the TWASS system. Imple- index, or the relations and indices have to be opened mented parts of the program became used as soon as before each access and closed afterwards. The first meas- they had been writ ten. The specification of the program ure complicates alterations, the second slows down execu- and of the data to be stored had to be altered fie- tion speed. quently. For example, several attributes have been added to TWSL when data gathering had already started. As stated above, with an index being used a

dBase III relation appears as if it were sorted. There The dBase III database system supports rapid and may be more than one index for each relation. The

flexible programming quite well. The macro command indices are activated by program commands. All active interprets text stored in a variable as program text indices of a relation are updated automatically when during execution. Thus menus can be described as tuples altering, inserting, or deleting tuples of the relation. Un- of a relation TWMENU with three attributes for each fortunately, only the first index effects the sorted order function key of the menu, namely Use, Text, and Command. of the relation. For example, the indices to TWSL (sub- Use is boolean and indicates whether the respective key stances) on UN-Number (TWGLUI~ and on Name (TWSLNA), is used in that menu. The Text describes that function may both be activated at the same time by the command and is displayed on the screen for menu choice, the "SET INDEX TO TWSLUN, TWSLNA". Then tuples are shown Command is executed if that function has been chosen, in sequential order according to their UN-Number, but Normally the Command is a procedure call. As dBase III those with the same UN-Number are not sorted by Name allows recursive procedures, the whole structure of the but by their (internal) record number. If multi level ordering program can be defined by a single procedure using the is necessary, the indices have to be constructed on the menu relation. Thus altering the program skeleton can be combination of attributes which is the string "UN-Number done by creating, deleting, or altering tuples in a relation. & Name" (concatenation) or "Name & UN-Number", respec-

tively. Thus indices become very large. Another relat ion TWh4ESS contains the messages

the program displays when reacting to certain user actions. In dBase III there is always only one relation in For each message there is the text to be displayed in the active working area. Relations can be "joined" by a the information lines and a description whether the user command specifying the common attr ibute and the working is expected to press one of the upper two function area of the other relation. As stated above, there will keys. Again, by a single procedure and a relation a be no new relation created by that join. If the "joined" large part of the computer-based portion of the user relation has to be processed using orders belonging to

Environmental Software, 19889 Vol. 4, No. 1 23

TWASS: A.M. Heinecke ~ It.-J. Golchert

attributes of the first and the second relation alternatevly, Performance the working area has always to be switched as the first Data gathering There have been 132,578 records of index of the active working area is the only one effecting transhipment data for the first half of 1984. Data gather- sorted order, ing was performed by students without computer experi-

ence. The average data input was about 90 lot records Whereas the dBase III programming language can per hour. Thus data gathering of all German ports in the

be judged as sufficient in terms of data structure and first half of 1984 took about 7 man months. There were program structure, there are practically no debugging no problems ef fected by the TWASS system, but different tools. Error messages are short and partly misleading. For forms of transportation notes resulted in difficulties espe- example, dBase lU allows only 32 procedures within a so- cially if there were measures of capacity instead of meas- called procedure file. Writing a 33rd procedure is possible, ures of weight, duplicate notifications, wrong UN numbers, but calling it results in a message "SYNTAX ERROR". More- and other discrepancies. About 5 ~ of the lot data records over, the limit of 32 procedures is troublesome as recursive had to be documented in TWDO and to be checked by procedure calls may only be performed within the same experts. procedure file. Thus modularity in programming is not sup- ported very well. Data analysis Creating a new TWTR84UM relation which

means adding the lot data for every substance, every port, and every mode of transportation takes about 7 hours. This is true also for TWTR84RV adding transports for every substance, every waterway, and every mode of transporta-

MAIN tion. Printing a list of transhipment takes 15 hours or more SUBSTANCES depending on the filter. A complete listing of transhipment

CH S, NGE - password last item is about 300 pages long. A port survey is calculated and next item printed in 2 to 5 hours depending on the filter. A corn- search- search term plete listing of transports is about 60 pages long and change sorting needs 2 or more hours for printing depending on the INFLOMFAGF data filter, too. A list of substances with its 150 pages is

~- EmS data printed in about 3 hours. I" hazard profile I" source and group Data storage The relation TWSL takes about 560 kBytes, I" abbreviations the related indices TWSLUN, TWSLNA, and TWSLKE sum up L normal to 950 kBytes. The original lot data TWTR84 needs

FILTER I -show filter 4.6 MBytes of disk storage, the TWTR84 index another ~- filter on /o f f 3.9 MBytes. TWTR84UM and its indices take together only J-clear filter 600 kBytes. The whole TWASS system with all system L set filter - filter relations and data relations but without the TWASS program

CHANGES ~-change i tem- substance and without the dBase HI system itself takes 11.5 MBytes. ~-delete i tem- transfer related lots The TWASS program has about 3000 lines of dBase III L append i tem- substance program commands. Extending data to a full year would

BRQWSE be no problem. Using the tape backup data of several I" last item years could be processed with the relations of one year I" next item I" search- search term on disk and the others on tape. ~- change sorting ~- INFO (same menu as in CHANGE) Conclusion TWASS shows that relatively large amounts L FILTER (same menuasinCHANGE) of data can be handled with a micro-computer if there

PRINT f start printing is an appropriate database system. In spite of some

FORMAT (future enhancement) difficulties mentioned above dBase Ill performed well in change sorting our application. Programming could be done with reason- FILTER (same menuasin CHANGE) able efforts. No faults appeared within the dBase Ul system

LO] DATA INPUT - password new i t e m - lot or its programming language. Long processing times are list of port codes assumed to depend not on the fact that dBase III is an list of package codes interpreting system but on the very high number of disk

AI~ ALYSIS accesses. The main advantage of dBase III has been the PORTS l" start printing high flexibility with easy alterations of relations and the

I -FORMAT possibility to hold parts of the program structure in such / ~- standard relations. / ~ survey ~- new transhipment database - period Further development t change sorting Graphical output There has been a special adaptation

FILTER (same menuasinCHANGE) of TWASS to a proposed research project discriminating WATERWAYS

f start printing single docks and sheds of the ports of Hamburg. An FORMAT (same menuasinPORTS) attempt has been made to visualize the results by simple new waterway database- period bar charts. As there were no graphic tools for dBase III, calculate risks these bar graphs have been built of characters and FILTER (same menu asin CHANGE) stored as a relation.

END

Figure 6. Menu tree of TWASS The dBase III plus system which is an upgraded version of dBase III allows binding of assembler routines

24 Environmental Sol'tware, 1989, Vol. 4, No. 1

TWASS: A.M. Heinecke ~ H.-J. Golchert

which may be called from dBase Ill plus programs. Among REFERENCES other available bindings there is a package of graphic tools [11] for creating pie charts, bar charts, and other [1] Hole G. (1985) Grundsatzfragen des Gefahrguttrans- diagrams which can be displayed on the sreen, stored to portes, in Dokumentation Gefahrguttage Hamburg disk, and printed. As dBase Ul plus is upwards compatible 1985, p. 3. Storck Verlag, Hamburg. to dBase III, we are able to transfer TWASS to this [2] FSSH/Dornier (Ed.)(1983). Transport van Chemikalien version and add better graphics for output of statistical auf See, Forschungsbericht 04 00204 100 140 0150, data to the TWASS program. Bundesminister fiJr Forschung und Technologic, Bonn.

[3] Jacobi H. Golchert H.-J. et.al. (i987). Marine pollution Upgrading performance As stated above, the relations in connection with the transport of hazardous of added transhipments TWTR84UM and the relation of goods by ships - Present situation and recommenda- added transports TWTR84RV are not updated during data tions, Forschungsbericht Wasser 102 03 212, Bundes- input. Data analysis should be possible for any period of minister f/Jr Umwelt, Naturschutz und Reaktorsicherheit, the year. Therefore the relations had to be created by Bonn. adding all lot records from TWTR84 belonging to a period defined by the user. It would be of no use updating the E4] Bundesminister fLir Verkehr (Ed.) (1986). Verordnung

iJber die Bef~rderung gef~hrlicher GiJter mit Seeschif- relations during data input as the user might want to analyse quite another period next time. In the use of fen, Bundesgesetzblatt I, p. 961, Bonn. TWASS it turned out that nearly all statistical analysis [5] International Maritime Organisation (Ed.) (1983). referred to the full period of the first half of 1984. If International Maritime Dangerous Goods Code, Amend- data gathering should be extended to other periods and/ ment 21 - 83, IMP, London. or areas, TWASS should add the transhipments and trans- [6] International Maritime Organisation (Ed.) (1979). ports during input so that an analysis for the whole period International Conference on Marine Pollution 1973, could be started at once. Only for shorter periods the IMP, London. 7 hours long process of creating the new -UM or -RV relation would be necessary. On the other hand, thus [7] International Maritime Organisation (Ed.) (1986). data input might be a bit slower. Composite list of hazard profiles of substances

arried by ships 1985, BCH/Circ.16, IMP, London. As there are also compilers for dBase programs it [8] Date C. J. (1977). An Introduction to Database

would be interesting to have a compiled version of TWASS, Systems (2nd Edition), Addison-Wesley Publishing too. But we do not expect great improvements as pro- Company, Reading. cessing time seems to be more related to the very high number of disk accesses. Perhaps a disk with shorter [9] Flares h (1981). Data Base Architecture, Van Nostrand

Reinhold Company, New York. access time would result in a higher improvement. In every case, TWASS is no system for online queries. Besides of [10] Camarinopoulos L. and Becker A. (1983). Zuverl~issig- special investigations, there are only a few standard types keits-und Risikoanalysen, in Kerntechnische Gesellschaft of statistical output which are expected by the users. Seminar Band 2, Bonn, Verlag T0V Rheinland, Thus upgrading these output by graphics or new forms of K~ln. lists that might be choosen by the user is more important. [11] Cooper, J,T. & Company (1986). dBase Tools for C,

Emergency information system The TWSL relation already The Graphics Library, Ashton-Tate Publishing Group, contains more details about the chemical substances than Torrance. required for the original project. For example, there are [12] Bundesminister fLir Verkehr (Ed.) (1984). EmS-Richtlinie the attributes EroS and MFAG (see Figure 5). These num- iJber UnfallmaBnahmen fiJr Schiffe, die gef~hrliche bets refer to the Emergency Schedules [12] and the GLiter bef~rdern, RM 002, Bundesonzeiger Nr. 151, Medical First Aid Guide [13]. Together with some other Beilage Nr. 41/84, Bonn. attributes describing the physical behaviour of the substance [13] Bundesminister fLir Verkehr (Ed.) (1984). MFAG-Leitfa- these data are necessary for planning counter-measures in den fiJr medizinische MaBnahmen bei Unf~illen mit case of on accident. Extending the existing list of sub- gef~hrlichen GiJtern, RM 003, Bundesanzeiger Nr. stances by some new attributes and by data of dangerous 235, Beilage Nr. 64/84, Bonn. goods not endangering water Hamburg Maritime Research is building an information system for the use of the harbour police and fire brigade in order to react quickly and correctly to accidents with dangerous goods.

i i

Environmental Software, 1989 Vol. 4, No. 1 25