Hello everyone,
QUESTION
HOW WOULD YOU DESIGN THE DATABASE?
OPTION ONE: If I eager load Member page with all the relations the view page would run 10 SQL queries total on load to display the data. When a member wants to update a record, they would click on the button next to either the phone section, name section and that would create a new record on the respective table and refresh the page to show the latest change.
OPTION TWO: If I have all the fields on the Member table, it would run only 4 SQL queries. When a member wants to update a record, they would click on a button next to the field they want to edit, when it saves, it would generate a record in the respective table AND update the field on the main Members table. (In this case the Model Member would have about 23 fields)
DESIGN AND REQUIREMENTS
I would like to keep a history of changes that are made for every Member for their address, phones, emails. By creating different tables for each one of these we can keep track of when the change was made, who made it and more.
RELATIONSHIPS
Users hasOne Member. Member belongsTo User
Member hasMany Phones. Phones belongTo Member.
(I have 6 Names, Phones, Addresses, Marital, Status, Emails)
Thank you for your tips and recommendations in advanced!