Ok I’ll make this short and sweet, I’m looking for opinions based on which method I should go about coding this. My database is setup so that if I have say a user table and a profile table, I make a third table that associates the relationships between both tables.
Now my question is this.
Option A: Would it be smarter to create a usersprofiles class that connects with that table to perform queries and then define relationships between that class to the two other classes with the relations function?
Option B: Hard code queries with the usersprofiles table within either class / controller class as they are used / needed.
I’m thinking A would make things easier but it might be excessive. See all you’ll ever query with usersprofiles is for a profile id to find the user that belongs to it or a user id to find the profile that belongs to the user.
Also because there would probably not be any point to joining queries with the usersprofiles table, maybe it’s overkill?
Any thoughts would be appreciated.