473,386 Members | 1,741 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,386 software developers and data experts.

Table stuctures in Access

I am creating a database for my company that holds different seminars, often done by different people. those are my 2 variables, but also, each seminar is rated with a sheet, that rates the seminar in various ways (1 to 5) as well as the presenter. how can i relate all of this data in Access, how many tables should i be using, and how can i set it up so i can take averages of the presenter's ratings, as well as take avearges of the specific seminar's ratings? I kind of understand how to query things, but the basic setup of the database is my problem. Right now i have a Presenter Table, which only has a name and a presenter ID#, a Seminar table, which has only a seminar name and seminar id #, and an evaluations table, which has an Evaluation id#, as well as all of the evaluations for both the presenter and the seminar. Is this set up correctly, do you need a more specific example? any help i can get would be greatly appreciated.
-joshmoshoshkosh
Jun 21 '07 #1
12 1284
tdw
206 100+
I am creating a database for my company that holds different seminars, often done by different people. those are my 2 variables, but also, each seminar is rated with a sheet, that rates the seminar in various ways (1 to 5) as well as the presenter. how can i relate all of this data in Access, how many tables should i be using, and how can i set it up so i can take averages of the presenter's ratings, as well as take avearges of the specific seminar's ratings? I kind of understand how to query things, but the basic setup of the database is my problem. Right now i have a Presenter Table, which only has a name and a presenter ID#, a Seminar table, which has only a seminar name and seminar id #, and an evaluations table, which has an Evaluation id#, as well as all of the evaluations for both the presenter and the seminar. Is this set up correctly, do you need a more specific example? any help i can get would be greatly appreciated.
-joshmoshoshkosh
Would I be correct in understanding that any particular presenter may be associated with more than one seminar, and vise versa? If so I would have the evaluation field as a third field in the Seminar and Presenter tables.

I would only have two fields in the Evaluations table. For example:
Field one would be called EvaluationID and be a number or autonumber field, and field two would be called EvalDescription (or something like that).
If the EvaluationID field has the number 1, the description might be "Excellent", or for 2, "Pretty good", for 3, "Just okay" etc.

Then in the Evaluation fields in the Seminar and Presenter tables I would just use 1, 2, or 3 etc. Then you can create a form that will display the EvalDescription (i.e. "Excellent" instead of "1") for the seminar and/or presenter. You can add a field to the form that calculates the average evaluation based on the numbers that are in the Evaluation field of your Seminar and/or Presenter tables.

If you need more detailed instructions, please let me know.
Jun 21 '07 #2
MMcCarthy
14,534 Expert Mod 8TB
Have a look at this tutorial

Database Normalisation
Jun 22 '07 #3
Would I be correct in understanding that any particular presenter may be associated with more than one seminar, and vise versa? If so I would have the evaluation field as a third field in the Seminar and Presenter tables.

I would only have two fields in the Evaluations table. For example:
Field one would be called EvaluationID and be a number or autonumber field, and field two would be called EvalDescription (or something like that).
If the EvaluationID field has the number 1, the description might be "Excellent", or for 2, "Pretty good", for 3, "Just okay" etc.

Then in the Evaluation fields in the Seminar and Presenter tables I would just use 1, 2, or 3 etc. Then you can create a form that will display the EvalDescription (i.e. "Excellent" instead of "1") for the seminar and/or presenter. You can add a field to the form that calculates the average evaluation based on the numbers that are in the Evaluation field of your Seminar and/or Presenter tables.

If you need more detailed instructions, please let me know.
A bit more help would be great... here's a more detailed description.
Say i have this seminar... ABC... and ABC was done by Joe. Abc has a evaluation sheet, with numbers 1 to 5*(bad to excellent) rating 6 different aspects of the Abc seminar, as well as 4 spots to rate Joe. Others could be doing this seminar as well, and joe could be doing other seminars including Abc. (i hope that makes sense).. My problem is, i want to be able to add these evaluation sheets as i go, but i'm having problems normalizing all of it. I read your tutorial, but i'm not sure if i should have a separate table for each question? ... Right now i have a table for Presenters with a Presenter ID (auto #, primary), First name, and Last name. Then I have a table for Seminars, which is only seminar id(auto #, primary) and seminar description. My third table is an evaluation table. This has an Evaluation ID (auto #, primary) as well as a spot for each one of the 10 questions. THis spot is only a number field, but how can i make this so all of these are related, and how can i get it so i can look at ABC's rating averages, Joe's ratings, etc... i'm just having problems getting them all to work cohesively, i think i understand reports, but im just having problems organizing and relating the data. Do i need the presenter ID in both the Presenter table as well as in the Evaluation table? And same with the Seminar ID, does that need to also be part of the evaluation table?
and to top this off, sometimes i get sheets, that are just summaries of a specific person at a specific seminar, for example: Mary at seminar XYZ has a totals sheet with 8 5's(excellent) 13 4's(above average) 4 3's(average).... and this is just the data for one question.... is there going to be problems with sheets like this? I don't know if im making this whole project harder than it should be, or if i'm just not relating the data correctly, or maybe i'm approaching it all wrong. Any help would be greatly appreicated. Thanks so much!!!
-Joshmoshoshkosh
Jun 25 '07 #4
MMcCarthy
14,534 Expert Mod 8TB
If I understand you correctly ...

A presenter (Joe) can present more than one seminar and a seminar (ABC) can have more than one presenter. This is a many to many relationship so a join table is needed.

tblPresenter
PresenterID (Primary Key, AutoNumber)
PresenterName

tblSeminar
SeminarID (Primary Key, AutoNumber)
SeminarName

tblPresentedSeminar (Join table)
PresenterID (Composite Primary Key, Foreign key referencing tblPresenter)
SeminarID (Composite Primary Key, Foreign key referencing tblSiminar)

Now is the data is relevant to the seminar regardless of who presented it then you add the field to tblSeminar.

If the data is relevant to the presenter regardless of the seminar then you add the field to tblPresenter

Any data that is specifically relevant Joe's presentation of ABC seminar would be a field in tblPresentedSeminar

You don't have to add all fields to the tables, if you follow the normalisation rules then you can add relevant tables for the data and just add a foreign key to the table.
Jun 26 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Now presuming evaluations are relevant to Joes presentation of the ABC seminar then you can have a foreign key in tblPresentedSeminar called EvaluationID but it would not be part of the composite primary key. This foreign key would reference the following table.

tblEvaluation
EvaluationID (Primary Key, Autonumber)
Question1
Question2
>
>
>
Question10

However, if there is more than one evaluation per seminar then it is different.

Don't put the EvaluationID in tblPresentedSeminar

If the evaluation is based on the seminar then add a foreign key SeminarID to tblEvaluation and if the evaluation is based on the presenter then add a foreign key PresenterID to tblEvaluation. If it is tied to both then add both foreign keys.

Getting the idea ?
Jun 26 '07 #6
Yes there can be many evaluation sheets for any given seminar given by any person.... anyone at the seminar can fill out an evaluation, so really there could be hundreds for each person, each time they do a seminar, but the sheets evaluate the seminar as well as the person doing the seminar at the time... that's why i'm having so many problems...And also, what's different about doing a Join table, compared to a regular table, can i just enter the same names that i had for my other fields, and still select autonumber for the data type? Thanks for all the help, i'm learning a lot from you!



Now presuming evaluations are relevant to Joes presentation of the ABC seminar then you can have a foreign key in tblPresentedSeminar called EvaluationID but it would not be part of the composite primary key. This foreign key would reference the following table.

tblEvaluation
EvaluationID (Primary Key, Autonumber)
Question1
Question2
>
>
>
Question10

However, if there is more than one evaluation per seminar then it is different.

Don't put the EvaluationID in tblPresentedSeminar

If the evaluation is based on the seminar then add a foreign key SeminarID to tblEvaluation and if the evaluation is based on the presenter then add a foreign key PresenterID to tblEvaluation. If it is tied to both then add both foreign keys.

Getting the idea ?
Jun 26 '07 #7
Yes there can be many evaluation sheets for any given seminar given by any person.... anyone at the seminar can fill out an evaluation, so really there could be hundreds for each person, each time they do a seminar, but the sheets evaluate the seminar as well as the person doing the seminar at the time... that's why i'm having so many problems...And also, what's different about doing a Join table, compared to a regular table, can i just enter the same names that i had for my other fields, and still select autonumber for the data type? Thanks for all the help, i'm learning a lot from you!

this is what an eval sheet looksl like:
Seminar Name: ABC

Seminar ratings: Excellent Poor
1) Overall rating of the seminar [ ] [ ] [ ] [ ] [ ]
(above are just my 1-5 checkboxes, rated excellent to poor)***
Excellent Poor
2) Organization of the content [ ] [ ] [ ] [ ] [ ]
Excellent Poor
3) Ability to apply information [ ] [ ] [ ] [ ] [ ]
Excellent Poor
4) Effectiveness of Visuals [ ] [ ] [ ] [ ] [ ]
Excellent Poor
5) Before seminar knowledge [ ] [ ] [ ] [ ] [ ]
Excellent Poor
6) After seminar knowledge [ ] [ ] [ ] [ ] [ ]


Presenter Name: Joe
Presenter Ratings:
Excellent Poor
7) Interest level [ ] [ ] [ ] [ ] [ ]
Excellent Poor
8) Demonstration of knowledge[ ] [ ] [ ] [ ] [ ]
Excellent Poor
9) Communication skills [ ] [ ] [ ] [ ] [ ]
Excellent Poor
10) Relevant Examples [ ] [ ] [ ] [ ] [ ]
Excellent Poor


so for any time someoene presents, each audience member gets one of these, and we're trying to make sense of it using a database. Like for instance, how well did Joe do on this project, or Sue's numbers for project XYZ are better than Joe's, or saying to a client, "our seminar ABC has been getting 4's and 5's, it's one of our best seminars" etc.... so we want to be able to total the number of 1's 2's 3's 4's and 5's for each area and be able to call them up for easy reference. THanks again for everything I really appreciate it!
Jun 26 '07 #8
MMcCarthy
14,534 Expert Mod 8TB
Yes there can be many evaluation sheets for any given seminar given by any person.... anyone at the seminar can fill out an evaluation, so really there could be hundreds for each person, each time they do a seminar, but the sheets evaluate the seminar as well as the person doing the seminar at the time... that's why i'm having so many problems...
tblEvaluation
EvaluationID (Primary Key, Autonumber)
SeminarID (Foreign key, referencing tblSeminar)
PresenterID (Foreign key, referencing tblPresenter)
Question1 (Number, Integer - 1 to 5)
Question2
>
>
>
Question10

This way each evaluation is tied to the seminar and to the Presenter. So if for example you wanted to retrieve all the evaluations for Joe from the ABC seminar then:

Expand|Select|Wrap|Line Numbers
  1. SELECT tblEvaluation.*
  2. FROM ((tblEvaluation INNER JOIN tblPresenter
  3. ON tblEvaluation.PresenterID = tblPresenter.PresenterID)
  4. INNER JOIN tblSeminar
  5. ON tblEvaluation.SeminarID=tblSeminar.SeminarID)
  6. WHERE tblPresenter.PresenterName LIKE 'Joe'
  7. AND tblSeminar.SeminarName LIKE 'ABC';
  8.  
And also, what's different about doing a Join table, compared to a regular table, can i just enter the same names that i had for my other fields, and still select autonumber for the data type? Thanks for all the help, i'm learning a lot from you!
tblPresenter
PresenterID (Primary Key, AutoNumber)
PresenterName

tblSeminar
SeminarID (Primary Key, AutoNumber)
SeminarName

tblPresentedSeminar (Join table)
PresenterID (Composite Primary Key, Foreign key referencing tblPresenter)
SeminarID (Composite Primary Key, Foreign key referencing tblSiminar)

tblPresentedSeminar is the Join table. It is simply there to break the many to many relationship between tblPresenter and tblSeminar.

You don't use autonumbers, Your primary key in this case is made up of two foreign keys which reference the primary keys of the two tables being joined. You set the datatype to Number, Long Integer.

Mary
Jun 26 '07 #9
How do i set a "composite primary key?" it wouldn't let me set multiple primary keys.
-Josh




tblEvaluation
EvaluationID (Primary Key, Autonumber)
SeminarID (Foreign key, referencing tblSeminar)
PresenterID (Foreign key, referencing tblPresenter)
Question1 (Number, Integer - 1 to 5)
Question2
>
>
>
Question10

This way each evaluation is tied to the seminar and to the Presenter. So if for example you wanted to retrieve all the evaluations for Joe from the ABC seminar then:

Expand|Select|Wrap|Line Numbers
  1. SELECT tblEvaluation.*
  2. FROM ((tblEvaluation INNER JOIN tblPresenter
  3. ON tblEvaluation.PresenterID = tblPresenter.PresenterID)
  4. INNER JOIN tblSeminar
  5. ON tblEvaluation.SeminarID=tblSeminar.SeminarID)
  6. WHERE tblPresenter.PresenterName LIKE 'Joe'
  7. AND tblSeminar.SeminarName LIKE 'ABC';
  8.  


tblPresenter
PresenterID (Primary Key, AutoNumber)
PresenterName

tblSeminar
SeminarID (Primary Key, AutoNumber)
SeminarName

tblPresentedSeminar (Join table)
PresenterID (Composite Primary Key, Foreign key referencing tblPresenter)
SeminarID (Composite Primary Key, Foreign key referencing tblSiminar)

tblPresentedSeminar is the Join table. It is simply there to break the many to many relationship between tblPresenter and tblSeminar.

You don't use autonumbers, Your primary key in this case is made up of two foreign keys which reference the primary keys of the two tables being joined. You set the datatype to Number, Long Integer.

Mary
Jun 26 '07 #10
Do i do a foreign key just by linking the presenter ID from tblPresenter to presenter ID in the Evaluation table in the relationships window? Also, where would I implement taht SQL code, or could i do the same type of commands with the report wizard? Sorry for all the questions, i really appreciate all of the help!
-Josh

How do i set a "composite primary key?" it wouldn't let me set multiple primary keys.
-Josh
Jun 26 '07 #11
MMcCarthy
14,534 Expert Mod 8TB
How do i set a "composite primary key?" it wouldn't let me set multiple primary keys.
-Josh
It won't let you select each individually but if you select both of them together and then set the primary key
Jun 26 '07 #12
MMcCarthy
14,534 Expert Mod 8TB
Do i do a foreign key just by linking the presenter ID from tblPresenter to presenter ID in the Evaluation table in the relationships window?
To make a foreign key relationship.

Firstly, in tblPresentedSeminar go to the fields PresenterID and SeminarID and set the Indexed Property to Yes (Duplicates OK). It may already be set if you have set the composite primary key.

Then, open the relationships window and create a relationship between PresenterID in tblPresenter and PresenterID in tblPresented Seminar. Now double click on the line to open the relationship properties window. Tick all three check boxes. Now do the same for SeminarID.

Also, where would I implement taht SQL code,
If you mean the last query I gave you then open a new query in design view (don't bother adding any tables) and then go up and change the view to sql view. Just copy in the code and save.


or could i do the same type of commands with the report wizard? Sorry for all the questions, i really appreciate all of the help!
-Josh
I'm not sure what you mean by this but lets leave reports alone for the moment. It's imporant to get the structure right first.
Jun 26 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Mahesh Hardikar | last post by:
Hi , Oracle 8.1.7.0.0 on HP-UX 11.0 I am a newbie as far as PL-SQL is concerned . I have Sybase/MSSQL T-SQL background. We have a report which uses a select statement . This select...
7
by: Bing Wu | last post by:
Hi Folks, I have a very large table containing 170 million rows of coordinats: CREATE TABLE "DB2ADMIN"."COORDINATE" ( "FID" INTEGER NOT NULL , "AID" INTEGER NOT NULL , "X" REAL NOT NULL ,...
8
by: Vladimir | last post by:
Hello, I have a table in MS Access database. It has one field (with BYTE datatype) that has several properties set in Lookup tab of table Design View. Display Control = Combo Box. Row Source...
2
by: Daniel | last post by:
I use an Access database to basically take data exports, import them, manipulate the data, and then turn them into exportable reports. I do this using numerous macros, and queries to get the data...
5
by: Sami | last post by:
Please bear with me, and if you answer this question, please do it step by step. I am new at Access, not at all sophisticated. I am using Office XP. This will need to be read in Access for...
5
by: PAUL | last post by:
Hello, I have 2 tables with a relationship set up in the dataset with vb ..net. I add a new record to the parent table then edit an existing child record to have the new parent ID. However when I...
5
by: gmelcer | last post by:
Hi, I need to use the data type "struct" in a class. Could someone show me a simple example of how to use stuct in a class and access the data type which is declared in the private section of the...
5
by: wugon.net | last post by:
question: db2 LUW V8 UNION ALL with table function month() have bad query performance Env: db2 LUW V8 + FP14 Problem : We have history data from 2005/01/01 ~ 2007/05/xx in single big...
3
by: =?Utf-8?B?SXNsYXkgUm9kcmlndWV6IEpyLg==?= | last post by:
How do you share glogal data stuctures between VB.net and C++ or C# ? Thanks, Islay -- Islay
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...

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.