A sort of domain maping question

This project is still in the planing stage. A client wants to dynamically have several one page sites, based off of an external database. Some sites will use one WP theme, later they will add additional themes for newer pages.

The pages will likely be mapped as subdomains.

I'm trying to figure out how I can direct some "subdomains" to one WP site dynamically, and other subdomains to a different "site" that uses a different theme. The thought is we only have enough actual WP sites for each theme, but each might have several subdomains pointed to it (then based on the subdomain, we spit out the correct templated page using additional values from the external database)

Is what I'm asking clear?