Separate layers for the web and database