[[TOC]]
= Generating MOLGENIS from scratch =
We will generate a new MOLGENIS by the example of a simple Address Book application:
a simple database having “Contacts” entities that each can have zero or more “Addresses”:
[[Image(address-book-screenshot.JPG)]]
== 1. Create the data model XML[[BR]] ==
Create a new xml file ‘addressbook_db.xml’ in the root of you application. This file will contain the MOLGENIS model. Use the following template:
{{{
#!xml
}}}
== 2. Add a “Contact” data type. ==
{{{
#!xml
}}}
== 3. Add properties to the “Contact” data type. ==
* A unique, automatic numeric identifier field that MOLGENIS will use to refer contacts.
{{{
#!xml
}}}
* A required and unique string field ‘displayname’ to have a unique label to find Contacts by. Note that if you provide no ‘type’ then type=”string” is implied.
{{{
#!xml
}}}
* Optional (‘nillable’) string fields for firstname, lastname and midinitials:
{{{
#!xml
}}}
* An optional field of type date for birthday:
{{{
#!xml
}}}