Frontend dev trying to fullstack - confused by options

I am almost exclusivley a frontend dev, trying to branch out and build a full stack app with NEXTjs, drizzle and planetscale. I keep finding myself struggling with option paralysis trying to decide if I have complex SQL to minimise work in the app or lots of simple SQL queries that need complex functions to join them all together. I know the answer i likely *"it depends" * but can anyone recommend any good articles or youtube videos on best practice and practical tips when planning and building the interactions between database and app. My current specific scenario is a family charity letting parents know about support groups. It has a table of groups, with the following joins: - a one to many join to openingTimes that has the weekday, startTime, endTime - a one to many join to contactDetails that has type and value (i.e. facebook, phone etc) - a many to many join (via a junction table) to attendeeTypes that has name, description (i.e. babies, toddlers, preschool, parents etc) How would you handle displaying all the groups including all the opening hours, contact details and the attendee types? - simple SQL query for each table, and manually join in the app? - complex drizzle query to get all the data into the specific format ( is it even possible - best I end up with several empty parent objects that still need manipulation) - something else?
0 Replies
No replies yetBe the first to reply to this messageJoin