Schemaball is an SQL database schema viewer. It requires Perl and a few modules, such as GD and optionally Math::Bezier and SQL::Translator. Schemaball creates flexible visualizations of database schemas. Schemas may be read from an SQL schema dump, flat file or live database.

schemaball

home about screenshots requirements

documentation

tour tutorials README CHANGES man page

download

Perl code

Tutorials

These tutorials illustrate different features of Schemaball. Tutorials are divided into sections. Each section covers a particular aspect of a feature or set of features. Each section has its own documentation, configuration file and schema ball image.

tutorial 6.0.description

all tutorials | description | Sections 1 2 3 4 5 6 7 8

NAME

sbtut_06 - adjusting schema diagram geometry and properties

SYNOPSIS

PURPOSE

In this tutorial, we'll see how to adjust geometry, like size, circle layout, and link curvature, as well as other properties, like font and font size, of the schema diagram.

TUTORIAL

Image Size

The image size is controlled by the size property in the <image> block. The value is in pixels and specifies the edge legnth of the square image. Remember that the schema ball will be inscribed inside this image.

  <image>
  size = 1000
  </image>

The resulting image is sbtut_06_01.png. When the image is made smaller, the size of other elements shrink. Font size and size of table glyphs, however, is specified in absolute values.

  <image>
  size = 500
  </image> 

The resulting image is sbtut_06_02.png.

Element Size

In the above image, the table glyphs and font size are both too large. To scale these down, the size properties in the <table> and <label> block should be used.

  <table>
  size = 15
  </table>

  <label>
  size = 6
  </label>

The resulting image is sbtut_06_03.png

Circle Radius

The radius of the inscribed schema ball is controlled by the glyphradius property in the <image> block.

  <image>
  ...
  glyphradius = 0.5
  ...
  </image>

The units of this value are relative to the radius of the inscribed circle in the image (i.e. radius imagesize/2). The resulting image is sbtut_06_04.png.

Labels

The font of the table labels is controlled with the font property in the <label> tag. In addition, the labels may be offset from the schemaball using the margin property.

  <label>
  font = minimono.ttf
  size = 6
  margin = 25
  </label>

The resulting image is sbtut_06_05.png.

The margin may be negative. This pushes the labels into the schema ball.

  <label>
  ...
  margin = -20
  ...
  </label>  
 
The resulting image is sbtut_06_06.png.

Since the table glyphs are interfering, you can make them invisible by setting their colours to be the background colour. Hiding the glyphs using <hide_rx> won't work here because labels for hidden glyphs are not shown.

  <table>
   ...
  fill = ffffff
  outline = ffffff
  ...
  </table>

The resulting image is sbtut_06_07.png.

Anonymous Schemas

HISTORY

BUGS

Please report errors and suggestions to martink@bcgsc.ca.

AUTHOR

Martin Krzywinski, martink@bcgsc.ca

$Id: schemaball,v 1.5 2003/10/27 20:25:11 martink Exp $

CONTACT

  Martin Krzywinski
  Genome Sciences Centre
  Vancouver BC Canada
  www.bcgsc.ca
  martink@bcgsc.ca