...it changes the url to example.com/databasesearch/tag/specifiedtagname...
It's not bad that you're trying to make things user friendly for the user, but the customizable URL controllable by users is where problems can begin and Stephen made a good example in his comment.
What I would recommend at the very least is to make such customizable URL's not directly accessible to search engines. As you may already know, this means these pages should have the noindex and nofollow attributes. You can easily add this in your HTML with the following line anywhere between the html head tags:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
Also, any links on your website that point to these URLs should also have a "rel=nofollow" attached. For example:
<a href="http://example.com/databasesearch/tag/specifiedtagname" rel="nofollow">specified tag name</a>
And one more thing you can try as you know is to exclude the URLs from your sitemap, and consider excluding the parent URLs (URLs that contain links to the bad URLs) from the sitemap as well.
Will google/other SEs see these as multiple pages? The page has the same title and content at the top, it would just filter the search and show different results.
Very likely. If the amount of "same content" is large then these pages would be considered duplicate. If you want to make a page indexable by search engines without penalty, it must have content people want to read on the page, not act just like a "doorway" to another page.
example.com/databasesearch/tag/viagra
produce a page that could get included in search results? If so, Google could penalize your site for that.