Create db.tcl

Everything related to creation and maintenance of the database