I have four groups of tables:
Group A: tables which are queried only by unregistered users;
Group B: tables which are queried only by registered users;
Group C: tables which are queried by both registered and unregistered users; and,
Group D: tables which are queried only by the administrator.
I would like to know whether there are any merits, security or otherwise, of segregating them into separate databases if each group is independent of each other.
I wouldn’t bother. For a web app, application security is going to be more important than database level security. I.e., putting four locks on your front door doesn’t provide more security if you leave your windows open. If the tables logically belong to the same application, keeping them in the same database will make maintenance much easier. Also, if any of the users (like the admin) ever need to access tables in one of the other databases, then your app will need to juggle multiple active connections.