Hey folks...
The database I'm currently working on is not overly large in terms of data (less than 2000 rows in total accross all tables), however it's fairly comprehensive in terms of its interface. I currently have 21 tables--all linked. Two of these tables are the MAIN data items, and the other 19 tables contain all of the supporting information (mostly in one to many relationships). The data entry screens need to make it very easy for the users to select from the existing supporting information (or add new information), so I'm populating various controls on the forms with this supporting information via queries on form load. My question is this: How many queries is too many? To elaborate, for a table structure of this size, at what point does the number of stored queries in my database become a burden? I've started to run into many situations where I have two options for a given query situation for control population... Option A) Store three or four very similar queries that each have a minor structural difference from each other, and call the apropriate one for the given situation when populating my control, or Option B) Build the SQL code at run time based on the current situation and populate the control that way.
I feel like this isn't coming accross the way I intend it too, so I'll illustrate with my current example.
I'm building a Search Form for searching Initiatives (one of the MAIN data items in my database)...the Search Form can be called from 6 unique locations within my database, and each of those locations requires that one of the controls on the Search Form be populated with supporting data based on queries that have STRUCTURAL differences for each location. So, would it be wise to save 6 separate queries in Access, and call each of them only when the Search Form is called on by one of the unique locations that requires it? Or should I just build the SQL dynamically at run time and populate the control that way?
I realize as well that the answer to this question probably depends largely on the size of the table that is populating the control...how does this come into play? Are saved queries better for really big tables that are called only sometimes? Or for small tables that are called frequently? .....
To sum up my question, how many saved queries is too many? Is it ridiculous to start saving queries for all kinds of control-populating routines that all have very slight SQL structural differences?
Thanks in advance for any replies...
Sam
The database I'm currently working on is not overly large in terms of data (less than 2000 rows in total accross all tables), however it's fairly comprehensive in terms of its interface. I currently have 21 tables--all linked. Two of these tables are the MAIN data items, and the other 19 tables contain all of the supporting information (mostly in one to many relationships). The data entry screens need to make it very easy for the users to select from the existing supporting information (or add new information), so I'm populating various controls on the forms with this supporting information via queries on form load. My question is this: How many queries is too many? To elaborate, for a table structure of this size, at what point does the number of stored queries in my database become a burden? I've started to run into many situations where I have two options for a given query situation for control population... Option A) Store three or four very similar queries that each have a minor structural difference from each other, and call the apropriate one for the given situation when populating my control, or Option B) Build the SQL code at run time based on the current situation and populate the control that way.
I feel like this isn't coming accross the way I intend it too, so I'll illustrate with my current example.
I'm building a Search Form for searching Initiatives (one of the MAIN data items in my database)...the Search Form can be called from 6 unique locations within my database, and each of those locations requires that one of the controls on the Search Form be populated with supporting data based on queries that have STRUCTURAL differences for each location. So, would it be wise to save 6 separate queries in Access, and call each of them only when the Search Form is called on by one of the unique locations that requires it? Or should I just build the SQL dynamically at run time and populate the control that way?
I realize as well that the answer to this question probably depends largely on the size of the table that is populating the control...how does this come into play? Are saved queries better for really big tables that are called only sometimes? Or for small tables that are called frequently? .....
To sum up my question, how many saved queries is too many? Is it ridiculous to start saving queries for all kinds of control-populating routines that all have very slight SQL structural differences?
Thanks in advance for any replies...
Sam
Last edited: