Hello. I am trying to design a database, this is my first semi-complex database.
The overview of the site is everyone will have their own profile. They can store their license information, addresses, etc. The information that could be duplicated/have multiple of, I put into separate tables. Such as the user putting 2 or more home addresses or licenses for all 50 states.
I have extended the ASPNETDB, and I am tapping into the aspnet_Users table, to set up a relationship between my main table, the Profile table, with the UserName field.
The way I have it set up now (I have taken out all but the aspnet_Users and GreenUserProfile relationship as I was testing, trying to figure it out) will not let a user go to the registration page and create a username. The error I get is:
Is that because the insert statement that the ASPNETDB uses will need to extend and create lines with the related username in the other tables?
I would guess that a new user would need to have the other tables filled out with minimal information (required fields in the tables) when they create a user name...correct?
Please see attached image of my tables.
Thanks so much for the help!
Also, I heard that querying nvarchar (such as userName) is slower than querying an integer (such as employeeID). It makes sense. Should I have the other tables that are linked to the GreenUserProfile reference (relation with) a userID (int) field instead of a userName field?
The overview of the site is everyone will have their own profile. They can store their license information, addresses, etc. The information that could be duplicated/have multiple of, I put into separate tables. Such as the user putting 2 or more home addresses or licenses for all 50 states.
I have extended the ASPNETDB, and I am tapping into the aspnet_Users table, to set up a relationship between my main table, the Profile table, with the UserName field.
The way I have it set up now (I have taken out all but the aspnet_Users and GreenUserProfile relationship as I was testing, trying to figure it out) will not let a user go to the registration page and create a username. The error I get is:
VB.NET:
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_aspnet_Users_GreenUserProfile". The conflict occurred in database "tjnevis", table "dbo.GreenUserProfile", column 'userName'.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK__aspnet_Me__UserI__15502E78". The conflict occurred in database "tjnevis", table "dbo.aspnet_Users", column 'UserId'.
The statement has been terminated.
The statement has been terminated.
Is that because the insert statement that the ASPNETDB uses will need to extend and create lines with the related username in the other tables?
I would guess that a new user would need to have the other tables filled out with minimal information (required fields in the tables) when they create a user name...correct?
Please see attached image of my tables.
Thanks so much for the help!

Also, I heard that querying nvarchar (such as userName) is slower than querying an integer (such as employeeID). It makes sense. Should I have the other tables that are linked to the GreenUserProfile reference (relation with) a userID (int) field instead of a userName field?