The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

User class and subclasses

My thought is to have a base User class for authentication purposes, and instantiate one of the user classes (subclasses of User?) based on the class of the user.

1) is this a smart design pattern for the database? A 'users' table with authentication information and a 'user_class_id' field that points to a 'user_classes' table, from which the proper subclass is instantiated?
if not, what would be the best way to design this?

2) how would you model this in Ruby on Rails? particularly if the user class is in the User table?

You could use one table for the login information (users), and other tables for the Residents, Sponsors, etc. Now you make a many-to-many relation between residents and users, sponsors and users, etc. This way you can have multiple users for one sponsor. Only if you need this flexibility.