开发者

why applicationName is primary key instead of application-Id in asp.net applications table?

I have a question about aspnet_applications table I have created asp.net membership using .net framework 4.0 it created some tables but I don't understand why Microsoft generate aspnet_applications table like this :

ApplicationName -> Primary key

LoweredApplicationName

ApplicationId -> unique index

Description

I think about this in开发者_Python百科 my opinion applicationId should be a key and application name should be an unique index but Microsoft have done completely conversely. and I have some trouble in .net entity model when I need updating model from database it couldn't updated. I mean it couldn't make associations.

What is the main reason defining Application-Name as primary key instead of application-Id?


It makes no difference. A primary key constraint and a unique constraint on non-nullable columns means exactly the same thing and they work just the same way.

In principle, all keys are equal and which one you designate to be the "primary" one is mostly a matter of style and readability.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜