Any graphical user interface (GUI) requires large amounts of complex metadata for the layout of windows and menus, their style and behavior, their bindings, etc. Designing, debugging and maintaining this interfaces is a difficult task and objectorientation is of little help as it tends to overcrowd the code with these metadata. Following a similar idea by Goyal et al., who considered GUI programming a database research problem and gave solutions based on logical programming, we propose storing these metadata in a database which we connect to a scripting language, here Tcl. We explain the details first with a small example where the database acts as a front-end to Mathematica