473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

queries between multiple tables

I'm relatively new when it comes to access but I think I have a grasp
on the basics. I have a very specific problem that requires a little
help from someone more experienced.

I'm trying to help someone in the field of consulting create a more
comprehensive database for their data they collected from surveys.
Here's the background:

Three surveys are sent a year, each with similar questions, but the
surveys are continually revised (new questions are added, and old
questions that haven't been helpful are taken out)

I have a table that holds all the questions (an ID #, the question,
the 5 multiple choice answers, the number (1-5) of the correct answer,
and a 'section' column that marks the topic the question aims at
asking)

My friend would also like to store the test statistics that he
generates for each survey he hands out. So I'm planning to set up one
table for every survey he sent out (which amounts to about 20 tables
so far). The leftmost column holds the question's ID number, and the
other columns hold several significant statistics - the percentage of
respondents who got the question right, e.g. Note: I don't understand
all the statistics behind this, I'm just trying to set up the database
so it will be easier for him while he expands it.

So I have two questions at this point:

1) is there a more efficient way to store the data of each survey,
rather than just making a new table? The reason I did that is because
each survey is slightly different, and i can't conceive of making one
table that can efficiently store all of it. However, if anybody has a
better way, I would be willing to hear it.

2) when i run a query, I want to be able to track each question's
statistics over time. So, when i run the query i use the criteria row
to zero in on one question (by typing in the question's ID). Now my
problem is that since I have 20 tables for each survey, there is no
easy way I know of doing this. What I want is this:

I want to plug in a specific question's ID number and have access pull
up a table that looks something like this:

Survey / P value / R value ....

(date) (double) (double)
1/1/02 .82 .31
6/1/02 .59 .29
1/1/03 .73 .25
....

Sorry if this is all confusing. The basis of the problem is that there
are 3 variables (question ID #, date of the survey, and the statistics
of the question) while there is only a 2 variables that can be
represented in a table (to my knowledge).

Thanks
Jul 3 '08 #1
2 1199
On 3 Jul, 20:49, alex.william...@gmail.com wrote:
I'm relatively new when it comes to access but I think I have a grasp
on the basics. I have a very specific problem that requires a little
help from someone more experienced.

I'm trying to help someone in the field of consulting create a more
comprehensive database for their data they collected from surveys.
Here's the background:

Three surveys are sent a year, each with similar questions, but the
surveys are continually revised (new questions are added, and old
questions that haven't been helpful are taken out)

I have a table that holds all the questions (an ID #, the question,
the 5 multiple choice answers, the number (1-5) of the correct answer,
and a 'section' column that marks the topic the question aims at
asking)

My friend would also like to store the test statistics that he
generates for each survey he hands out. So I'm planning to set up one
table for every survey he sent out (which amounts to about 20 tables
so far). The leftmost column holds the question's ID number, and the
other columns hold several significant statistics - the percentage of
respondents who got the question right, e.g. Note: I don't understand
all the statistics behind this, I'm just trying to set up the database
so it will be easier for him while he expands it.

So I have two questions at this point:

1) is there a more efficient way to store the data of each survey,
rather than just making a new table? The reason I did that is because
each survey is slightly different, and i can't conceive of making one
table that can efficiently store all of it. However, if anybody has a
better way, I would be willing to hear it.

2) when i run a query, I want to be able to track each question's
statistics over time. So, when i run the query i use the criteria row
to zero in on one question (by typing in the question's ID). Now my
problem is that since I have 20 tables for each survey, there is no
easy way I know of doing this. What I want is this:

I want to plug in a specific question's ID number and have access pull
up a table that looks something like this:

Survey * * / * *P value * / * R value ....

(date) * * * * (double) * * * * (double)
1/1/02 * * * * .82 * * * * * * * * .31
6/1/02 * * * * .59 * * * * * * * * .29
1/1/03 * * * * .73 * * * * * * * * .25
...

Sorry if this is all confusing. The basis of the problem is that there
are 3 variables (question ID #, date of the survey, and the statistics
of the question) while there is only a 2 variables that can be
represented in a table (to my knowledge).

Thanks
For the first part try three tables!

table 1 = tblSurvey (surveyID(PrimaryKey), SurveyDate, Survey_details
etc)

table 2 = tblQuestions (QuestionID(PrimaryKey), SurveyID(ForeignKey),
Question, AnswerGiven, AnswerExpected etc)

table 3 = tblStats (StatID(PK), QuestionID(FK), StatisticType,
StatisticValue) - each row has ony 1 statistic in it
This way you can store all questions associated with Surveys
efficiently
Jul 4 '08 #2
On Jul 3, 8:15*pm, purpleflash <k...@bgs.ac.ukwrote:
On 3 Jul, 20:49, alex.william...@gmail.com wrote:
I'm relatively new when it comes to access but I think I have a grasp
on the basics. I have a very specific problem that requires a little
help from someone more experienced.
I'm trying to help someone in the field of consulting create a more
comprehensive database for their data they collected from surveys.
Here's the background:
Three surveys are sent a year, each with similar questions, but the
surveys are continually revised (new questions are added, and old
questions that haven't been helpful are taken out)
I have a table that holds all the questions (an ID #, the question,
the 5 multiple choice answers, the number (1-5) of the correct answer,
and a 'section' column that marks the topic the question aims at
asking)
My friend would also like to store the test statistics that he
generates for each survey he hands out. So I'm planning to set up one
table for every survey he sent out (which amounts to about 20 tables
so far). The leftmost column holds the question's ID number, and the
other columns hold several significant statistics - the percentage of
respondents who got the question right, e.g. Note: I don't understand
all the statistics behind this, I'm just trying to set up the database
so it will be easier for him while he expands it.
So I have two questions at this point:
1) is there a more efficient way to store the data of each survey,
rather than just making a new table? The reason I did that is because
each survey is slightly different, and i can't conceive of making one
table that can efficiently store all of it. However, if anybody has a
better way, I would be willing to hear it.
2) when i run a query, I want to be able to track each question's
statistics over time. So, when i run the query i use the criteria row
to zero in on one question (by typing in the question's ID). Now my
problem is that since I have 20 tables for each survey, there is no
easy way I know of doing this. What I want is this:
I want to plug in a specific question's ID number and have access pull
up a table that looks something like this:
Survey * * / * *P value * / * R value ....
(date) * * * * (double) * * * * (double)
1/1/02 * * * * .82 * * * * * * * * .31
6/1/02 * * * * .59 * * * * * * * * .29
1/1/03 * * * * .73 * * * * * * * * .25
...
Sorry if this is all confusing. The basis of the problem is that there
are 3 variables (question ID #, date of the survey, and the statistics
of the question) while there is only a 2 variables that can be
represented in a table (to my knowledge).
Thanks

For the first part try three tables!

table 1 = tblSurvey (surveyID(PrimaryKey), SurveyDate, Survey_details
etc)

table 2 = tblQuestions (QuestionID(PrimaryKey), SurveyID(ForeignKey),
Question, AnswerGiven, AnswerExpected etc)

table 3 = tblStats (StatID(PK), QuestionID(FK), StatisticType,
StatisticValue) - each row has ony 1 statistic in it

This way you can store all questions associated with Surveys
efficiently

Thank you thats a very good way to do it!
Jul 4 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Mike N. | last post by:
Hello: I am new to T-SQL programing, and relativly new to SQL statements in general, although I have a good understanding of database theory. I'm a little confused as to the fundamental...
1
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
3
by: NeilAnderson | last post by:
I'm a fairly new user of access & I've never had any training, so I'm wondering if I'm doing the right thing here, or if it matter at all. I'm building a database for room booking purposes and I'm...
3
by: Kenneth | last post by:
I have 3 different tables that I want Queries to sum up, but I do not get all the information into my Queriy-file. The 1st table have 9 different products. The 2nd table have 3 of those 9...
5
by: Martin Lacoste | last post by:
There's likely not a simple answer for this, I know, but, I thought I'd try anyways... Background.. I've been racking my brain with some queries that I thought were straightforward, but have...
4
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure...
7
by: Daz | last post by:
Hi. I am trying to select data from two separate MySQL tables, where I cannot use join, but when I put the two select queries into a single query, I get an error telling me to check my syntax. Both...
8
by: beretta819 | last post by:
Ok, so I apologize in advance for the wordiness of what follows... (I am not looking for someone to make this for me, but to point me in the right direction for the steps I need to take.) I was...
8
by: Sheldon | last post by:
I just received a 2nd (configured as a dual) monitor but, for Access only, I can't seem to figure out, if it's possible, to view, say, Table1 on one monitor and Table2 on the other monitor. If I...
2
by: jaffar.kazi | last post by:
Hi All. This might be the wrong group to post this query, since it is ADO.NET related, but I couldn't find any ADO.NET group. My problem is that I want to write some queries, which use temp...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.