28.06.2013 Views

Papers in PDF format

Papers in PDF format

Papers in PDF format

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

follow<strong>in</strong>g, we discuss basic types of documents and special cases.<br />

6.1 Document Types<br />

``Stand-alone'' document:<br />

In the simplest case of a table conta<strong>in</strong><strong>in</strong>g no references to other tables and not be<strong>in</strong>g referenced by any other<br />

table, each entry <strong>in</strong> the database (a record <strong>in</strong> a table) is translated <strong>in</strong>to a HTML file conta<strong>in</strong><strong>in</strong>g a title, the names<br />

of the fields and their values. A sample document is shown <strong>in</strong> [Fig. 3a]. If any label text has been supplied <strong>in</strong> the<br />

catalog table Columns or by additional user <strong>in</strong>put, this text is used as the label for a field; otherwise, the column<br />

name is used for this purpose.<br />

References between tables:<br />

This more <strong>in</strong>terest<strong>in</strong>g case is depicted <strong>in</strong> [Fig. 3b] which shows a web page consist<strong>in</strong>g of two parts separated by a<br />

rule. Consider a web page for a piece of music: the upper part conta<strong>in</strong>s <strong>in</strong>stance data and l<strong>in</strong>ks to parents. A<br />

parent table is a table that is referenced by another table:<br />

the second field <strong>in</strong> the upper part (ComposerID of table Piece) of Fig. 3b] conta<strong>in</strong>s a l<strong>in</strong>k that po<strong>in</strong>ts to a parent<br />

(an entry <strong>in</strong> the table Composer), <strong>in</strong> this case the composer of the piece. A l<strong>in</strong>k to the correspond<strong>in</strong>g web page is<br />

provided together with the value (possibly expanded, see sec. 6.2).<br />

The lower part shows a list of children of this piece, i. e. a list of record<strong>in</strong>gs. We use the expanded keys to<br />

represent the children. Note that <strong>in</strong> the case of 1:n-relationsships a parent can have several children.<br />

Fig. 3: A generated stand-alone document (a) and a document with references (b)<br />

When automatically generat<strong>in</strong>g hypertext from database data, we encountered several problems which seem to persist<br />

across different application doma<strong>in</strong>s. We show those of the problems we have solved <strong>in</strong> the follow<strong>in</strong>g sections.<br />

6.2 Key Expansion<br />

Consider the table Piece: each entry references an entry <strong>in</strong> the table Composer via the field ComposerID. In many cases<br />

this would be a unique number for each composer (an artifical key). In the table Piece this key is conta<strong>in</strong>ed <strong>in</strong> the<br />

referenc<strong>in</strong>g field. Obviously, the result<strong>in</strong>g web page would not look satisfy<strong>in</strong>g, s<strong>in</strong>ce see<strong>in</strong>g e. g. the number 42 <strong>in</strong> the<br />

field ComposerID does not tell much; the user would have to follow this l<strong>in</strong>k to see what the number stands for.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!