I have been working on saving/loading, and I came across that I have to load/save a lot of tables, because I split my tables into categories e.g. characters, character_appearance, character_preferences, character_session, etc. (I use the LEFT JOIN clause to load)
Would it be better if I just put all the columns into a single table instead of splitting it into multiple tables?
I generally split them into multiple threads because I thought I would have too many columns inside the table which could cause issues.
Any opinions whether I should use a single table/multiple tables?
这一切都取决于你的设计.角色是否有多个外观?如果是这样,那么character_appearance将属于它自己的表.但是,如果一个字符只有一个外观,那么它将属于字符表.只要每列实际上直接依赖于主键,表中的列数就不是问题.
我想象一个角色可以有几个偏好,在这种情况下你需要创建一个特殊的偏好表.会议怎么样?每个字符或多个一个?问题是会话实际上取决于什么?角色id还是别的什么?
也许一个角色可以在不同的时间有几个会话.如果是这种情况,则会话不依赖于角色的主键,而是依赖于时间和角色的主键.在这种情况下,它不属于字符表,而是属于表格本身.
| 归档时间: |
|
| 查看次数: |
1949 次 |
| 最近记录: |