asp.net - Database design & referential integrity -
I am preparing a website UI (signup, signin, editing profile, editing address, etc.)
I have created the following tables. My question is, are there any unnecessary columns or tables? In addition, which column would be the primary key and the foreign key to consider the fact that a user can add / edit another address?
I am using three dropdown lists for I do not know how I am involved in these tables. Do I include enough / more / fewer columns? What should I change? UPDATE1: I have updated the database in the following tables / columns. Now how do I establish a relation between the countryode and embection? Country code (marked) ... or I should leave countrycode from Auser if I keep both tables in it then I will store data in 2 places. I do not want to do this ... the problem is the format of the discontinued name and dialing Code (India, for example, +91) looks like. If I leave that column from Ever, how do I store a mobile number then? Maybe I have to break the country code string and it must remove the dialing code piece and store it on the mobile number. It looks very complicated in the mobile column. < Div class = "post-text" itemprop = "text"> The only relationship you have not found is between In addition, country code (for mobile number) -
CountryCode to
newsletter ,
country (for address) -
country name to
annuity and
state (for address) -
StateName to
Astaet . Of these, the country code comes on the dropdown signup page. The second 2 address book is on the page that is displayed after the user's login.
AUser & amp;
AUserAddress will store the table data.
AUser and
ACountry . Currently, you have
countrycode on
AUser . Instead, should be
CountryID , because it is the primary key of
acountry .
AUserAddress no
stateID and not
state ? If this is the case then there is no need to be both
StateID and
country id on that table, you can set the user's country by looking at the relevant code
StateID column.
Comments
Post a Comment