阅读背景:

MVC的数据库设计问题 - 每个模型1个表

来源:互联网 

My biggest hurdle with getting started with an MVC framework has to do with with the 1 model to 1 DB table concept. To me it's overly simplistic and unrealistic for anything beyond a simple app. Yet, MVC is in use everywhere, including this awesome StackOverflow site. As is typical, all of the code examples and tutorials i come across are very simple and the 1 to 1 relationship works fine in those cases. But, what i'm looking for is a solid real world example of an MVC model that address table joins. In the case of stackoverflow, i would imagine a DB design with tables like Questions, Tags, Users, etc. In my DB design I may have a Question_Tag link table to to look up all tags associated with a given question. How does MVC deal with this?My biggest hurdle with getting started with an




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: