Intergrate UI with database