Helma Logo
main list history
previous version  overview  next version

Version 8 by anton on 08. May 2008, 18:29

<b>Naming conventions</b>

All the tables and columns in the database are all lowercase. (Which is quite handy with an Mysql database because the names are case-sensitive if the underlying file system is also case-sensitive. So Mysql Names are case sensitive on Linux but not on Windows.)

Tablenames are plural.

Prototype names start with upper case and are camel case. Prototype names are singular.

Property- Object- and Collection-Mapping start with lower case and are also camel case.

Foreign keys are prefixed with the name of the table they are referring to.

<h2>1:n relation</h2>

<b>DB schema</b>

<% this.image name="1-to-n-relation.jpg" %>


  images        = Collection(Image)
  images.local  = gallery_id
  images.foreign = galleries_gallery_id

<h2>m:n relation</h2>

<b>DB schema</b>

<% this.image name="m-to-n-relation.jpg" %>


  tags                          = Collection(Tag)
  tags.filter                  = ${image_id} = tags2images.images_image_id AND tags2images.tags_tag_id = tags.tag_id
  tags.filter.additionalTables  = tags2images