2 added 326 characters in body
source | link

You're almost certainly overthinking this. Your quest for an ideal data structure is a solution in search of a problem.

Look carefully at the example you gave. All three of those dropdowns have a different data source, and they imply a relational structure. Just by looking at the names of your dropdowns, I know that you have three tables: Groups, Events and Locations, each having primary keys and foreign keys that associate the tables with each other.

Three tables in a relational database is the ideal data structure for your scenario.

If you need a data representation that can be used in a web page, create a ViewModel object, but in non-trivial applications, it's often necessary to AJAX in the list for a particular dropdown, based on the selection provided by the user in the previous dropdown. The lists can be too large to embed in the actual web page.

You're almost certainly overthinking this. Your quest for an ideal data structure is a solution in search of a problem.

Look carefully at the example you gave. All three of those dropdowns have a different data source, and they imply a relational structure. Just by looking at the names of your dropdowns, I know that you have three tables: Groups, Events and Locations, each having primary keys and foreign keys that associate the tables with each other.

Three tables in a relational database is the ideal data structure for your scenario.

You're almost certainly overthinking this. Your quest for an ideal data structure is a solution in search of a problem.

Look carefully at the example you gave. All three of those dropdowns have a different data source, and they imply a relational structure. Just by looking at the names of your dropdowns, I know that you have three tables: Groups, Events and Locations, each having primary keys and foreign keys that associate the tables with each other.

Three tables in a relational database is the ideal data structure for your scenario.

If you need a data representation that can be used in a web page, create a ViewModel object, but in non-trivial applications, it's often necessary to AJAX in the list for a particular dropdown, based on the selection provided by the user in the previous dropdown. The lists can be too large to embed in the actual web page.

1
source | link

You're almost certainly overthinking this. Your quest for an ideal data structure is a solution in search of a problem.

Look carefully at the example you gave. All three of those dropdowns have a different data source, and they imply a relational structure. Just by looking at the names of your dropdowns, I know that you have three tables: Groups, Events and Locations, each having primary keys and foreign keys that associate the tables with each other.

Three tables in a relational database is the ideal data structure for your scenario.