You need 2 AAA profiles with different initial roles. The AAA profile for x would have initial role of init-role-x and in init-role-x, you would assign captive portal profile x. The AAA profile for y would have initial role of init-role-y and in init-role-y, you would assign captive portal profile y.
You cannot separate the internal db. You would need to have an external authentication server (or maybe 2) if you want to only allow certain users onto x and others onto y.