Rus*_* F. 1 mysql database data-structures
我正在MySQL上构建一些关系数据库并遇到一些问题.
例如,我有一个表Client和Cources.
一个客户端可以访问多个Cource.
怎么可以存储在数据库中?
我猜这实际上是一个多对多的关系,你可以用三个表建模:
Client
- ClientId (PK)
- other fields
Cource
- CourceId (PK)
- other fields
ClientCourceVisit
- ClientId (FK)
- CourceId (FK)
- other fields
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
30 次 |
| 最近记录: |