上QQ阅读APP看书,第一时间看更新
Creating a relational category model
In our previous recipe, we created a simple product model, which had a couple of fields. In practice, however, the applications are much more complex and have various relationships among their tables. These relationships can be one-to-one, one-to-many, many-to-one, or many-to-many. In this recipe, we will try to understand some of these relationships with the help of an example.