[#43] WIP - refactor code to use :id :name :parent convention

* Create the database with unique index on (name, parent)
* Add debug logging