Is it possible to use one database for several domains? I would like to show all posts in category A on one domain and all posts in category B on one domain.
It should be unique domains like http://www.aaaa.com and http://www.bbbb.com and not subdomains.
Have this been done before?
Not possible afaik, if only because one part of the required wordpress options is the domain name, which needs to be different for each unique site. What are you trying to accomplish with this?
An option you might want to look into is multiple blogs on a single install : http://www.google.com/search?q=wordpress+multiple+blogs then you can have a single userbase, with whatever shared tables you would like, but have separate urls