Start with reading the example supplied with the source code of Pilot-DB. Copy it and then modify it for your needs.
There is no licence restriction on creating plugins.