健身房锻炼日志应用程序的数据库架构

Database Schema for a Gym Exercise Log App

我正在制作一个 android 应用程序(我的第一个)来记录健身房锻炼,但我不确定如何最好地构建数据库来存储这些数据。

我希望能够存储:

我已经制定了以下方案来说明我认为这可以如何实现:

我的主要问题是:

谢谢!

Is it optimal to store all the individual set log data in a single table (Log Entries)?

很可能是的,如果行数增长对响应时间产生不利影响,则例外。

Should the Exercise Type and Equipment tables be separate or just columns in the Exercise Table? Same goes for Workout Type

它们应该分开以减少不必要的重复和问题,例如如果您要更改类型或设备,那么您必须将该更改应用到练习中的所有行 table 和单独的 table 您只需要进行一个更改。

Would this be a good approach in terms of performance/usability?

除了日志 table(包括想要日期在内的原样),这似乎是一种很好且有效的方法。不需要日志 table,因为日志条目 table 有一个日期时间列(因此响应评论是,最好使用 date/time日志条目并删除日志 table).