Virtual users from a database

Is it possible to keep users in a database, and load/validate them from it?

Thank you.