我正试图设计一个简单的SQLite数据库,以便在服务器上对播放器进行计费。服务器按月支付,费用为10美元(但这可能会发生变化)。我想要下列表格(或更好的表格):
Months:
-id (int primary key)
-ref (text) something like "JAN11 just for readability"
-cost (real) something like 10 or 9.5 the monthly cost of the server
Players:
-id (int primary key)
-name (text)费用应由本月底登录的球员分摊。今年1月,有5人登录,他们得到了10美元的分红。
简单地说,:,我不知道如何存储玩家是否在一个月内登录,以便在他们之间分摊费用。
发布于 2011-05-22 02:37:18
另一张很好的桌子是Logins,例如:
Logins:
id int,
player_id int,
month_id int这样,您就可以只检查一个球员是否登录,甚至还可以检查他们登录了多少次(假设您想要跟踪它)。
https://stackoverflow.com/questions/6085659
复制相似问题