Aded db-relation with logic, full-locales, bugs fixed