Hey guys, I'm new here and new to Prisma. I would ...
# orm-help
a
Hey guys, I'm new here and new to Prisma. I would love some help, I am building a workout app using Prisma and MySQL and I'm struggling with designing the schema. I basically am unsure how to allow users to complete a workout and store their results. I have made a post with my initial models - https://stackoverflow.com/questions/69490891/workouts-app-schema-for-mysql-using-prisma. Any help or advice would be much appreciated.
d
Hey Adam. I think your issue is more related to Database Architecture than to Prisma. It could be good for you to design a ERD (Entity Relationship Diagram) and map everything you’re trying to design in your system. Also, do you really the ‘Block’ model? If it’s really tied to a month, could it then be just a Workout “length” property?
Not an expert here at all (I’m a frontend dev). But I found these videos to be helpful when I started learning dbs:

https://www.youtube.com/watch?v=QpdhBUYk7Kk

https://www.youtube.com/watch?v=wR0jg0eQsZA

a
Thanks so much for the reply Diego, really appreciate it. Awesome, I have been through the videos and I am currently reworking my ERD 🙂
I'm slightly confused re your suggestion about removing the block and adding a length field. Just to clarify, a block would be 4 weeks, containing 5 workouts per week. A workout would be something like 'legs'. Would you suggest leaving the block table out completely?