Mackski Posted October 4, 2016 Share Posted October 4, 2016 Probably a pretty common scenario, but thinking long term and scalability what are the pros and cons of the following data structures to achieve the same thing? The only draw back of option 1 is that you cannot see the relationship of data at a glance. I would need to create some custom pages to show all related data to a person. Option 1 - Page links This is taking a more SQL approach, where a page represents a database table with link fields to other pages.PeopleActivitiesEvents - Person Link - Activity Link Option 2 - Nested Structure (preferred?) This option is fine, however, for each person the child tree needs to be created upon first login. Subject to changes this could get messy for existing people entries. People - Activities - Events Link to comment Share on other sites More sharing options...
alxndre Posted October 4, 2016 Share Posted October 4, 2016 To me, Option 1 seems more logical, and more organized. Page links would be more useful and intuitive in the future when you're trying to select related data, rather than finding them through a node's children. Consider: $pages->find("template=event, personreference=$person"); against: $pages->find("template=event, has_parent=$person"); I think the first one would be easier to understand, and would execute faster. 1 Link to comment Share on other sites More sharing options...
Mackski Posted October 4, 2016 Author Share Posted October 4, 2016 8 minutes ago, Alxndre' said: To me, Option 1 seems more logical, and more organized. Page links would be more useful and intuitive in the future when you're trying to select related data, rather than finding them through a node's children. This was my initial thought, considering other pages might need access. I guess the only draw back, is if you have a lots of people, the size of the dropdown or radios etc, might get a bit crazy, not sure what the best solution for display would be in this case. Link to comment Share on other sites More sharing options...
alxndre Posted October 4, 2016 Share Posted October 4, 2016 5 minutes ago, Mackski said: the size of the dropdown or radios etc, might get a bit crazy, not sure what the best solution for display would be in this case. You could use the PageAutoComplete input for page fields so the page would not load all the people at once. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now