问题
Why do they split up the users stuff into 2 tables? Like they got aspnet_ membership and aspnet_users.
Is it just because the membership stuff they have is so long?
回答1:
It's to separate identity/authentication management from membership management. The "big" user table is the actual identity repository - e.g., if you want to use SQL to store your identity data, it all goes in here. But you may want to use some other source - say, Active Directory - to be your identity repository. You validate identity and authentication against that instead, but you still need to have some way to join the SQL-based role/membership data to the AD-based identity data. That's where the smaller table comes in - just enough info to maintain those relationships.
回答2:
It's for securing multiple applications from a single user database; aspnet_membership has UserId and ApplicationId so each user can have a different password for multiple applications (and also be locked out of one application but not another).
来源:https://stackoverflow.com/questions/1489809/why-does-asp-net-membership-have-a-users-table-and-a-membership-table