This article has information about multi-tier database architecture.
How can I create a Multi tenant UI in Java ...
It depends on the requirement. If the tenants' views are completely different, different pages, layout, flow, etc., then you can have a page for each tenant. Usually the pages are similar, except that the data view is different. In this case, the same ui can be used for tenants and views controlled by the tenant's configuration. The view should be metadata oriented. The view can be customized using the / db configuration configuration, where each tenant configuration is stored. The tenant can choose what can be displayed during configuration.
....
. . , . Hibernate http://docs.jboss.org/hibernate/orm/4.1/devguide/en-US/html/ch16.html
. , this