set-based 3-tier Client Server programming

The SQL based database servers have the facility to define dynamic views based on a SQL query. Can we define such dynamic sets in Haskell that are fully specified by the membership criteria? If we have an GUI engine that will handle the display and update to dynamic sets, then we can write the Client Server application using declaratations only. The application logic, GUI and persistence all can work using the same model and without the need to explicitly specify the IO details between various tiers.
Ashish's Niti