ASP.NET Membership Database: Relationships and UniqueIdentifiers

I have created an ASP.NET application. I automatically configured membership with the built-in tools which stores all membership info in my app_data folder in a SQL express database.

Meanwhile, the rest of my data for my application is stored in a separate SQL Server database. Some fields in this database need to relate to the user table, but I can't build a relationship because the automatic configuration of the membership database sets the datatype of the UserID to UniqueIdentifier, thus I can't build a relationship.

My questions is:
1. Is this the best way to build this? Or should I have everything in one central database?
2. If this is an acceptable way to do this, how do I build the relationship?

Who is Participating?
David RobitailleAnalyst ProgrammerCommented:
I usually link the tables user using the Aspnet_user.LoweredUserName to link from "my" tables to the table. then i could retrieve the userID to get data from the others tables.
But it`s true that you cannot build "foreign key" relationship. But you could still link the data in a query.
David RobitailleAnalyst ProgrammerCommented:
"should I have everything in one central database?" Yes
here how to do this
iammrkcohenAuthor Commented:
Sounds good. Any insight into building the relationship? Will this be automatic if all tables are in one database?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.