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

Table with 230 Fields....what's a better alternative?

I'm making a database to record training that employees have recieved.
For each training excercise, they recieve a mark between 1 and 3.

Initially, when there weren't so many training elements, I had put the
employee first name, last name, section, First Aid, Forklift
operation... and so on in one table. However, I now have a list of 227
Training elements that need to be completed (each recieving a mark
between 1 and 3). When I tried to put them all in one table, it said
there were too many fields.

Then I split them up into two tables and tried to join them with a
query based on first and last name. That produced all the fields I
needed, but did not show all the combo boxs (most, but not all) that I
had specified in the table set-up (Combo Box, Value List, "1","2","3").
Now I'm thinking I'll need to break them down into multiple smaller
tables, and display the fields via multiple subforms on a master form.

I'd like to know if people have a better solution. Actually, I'm pretty
sure someone does. Not even sure my idea of splitting them further will
work, but its the best I can come up with at the moment...

Thanks for your help,

Reg

Nov 13 '05 #1
10 1515

"Regnab" <p.*******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I'm making a database to record training that employees have recieved.
For each training excercise, they recieve a mark between 1 and 3.

Initially, when there weren't so many training elements, I had put the
employee first name, last name, section, First Aid, Forklift
operation... and so on in one table. However, I now have a list of 227
Training elements that need to be completed (each recieving a mark
between 1 and 3). When I tried to put them all in one table, it said
there were too many fields.

Then I split them up into two tables and tried to join them with a
query based on first and last name. That produced all the fields I
needed, but did not show all the combo boxs (most, but not all) that I
had specified in the table set-up (Combo Box, Value List, "1","2","3").
Now I'm thinking I'll need to break them down into multiple smaller
tables, and display the fields via multiple subforms on a master form.

I'd like to know if people have a better solution. Actually, I'm pretty
sure someone does. Not even sure my idea of splitting them further will
work, but its the best I can come up with at the moment...

Thanks for your help,

Reg


Your current design has the fundemental problem that to add a new training
element, you need to add a new field. This means you need to change not
only table structure, but queries, forms, reports, modules, etc. To make
things much easier, you need to set up your table structure so it can cope
with adding/editing/deleting training elements without any need to change
any of the forms, reports, etc.
The standard solution is to have three tables:
tblEmployee - 1 record per employee
tblTraining - 1 record per training element
tblEmployeeTraining - 1 record for each bit of training an employee has done

This is the only sensible way to do this, but will involve pulling apart
almost all you have done and converting the data from the old to the new
format. However, there is not much point describing this technique further
unless we know you would be happy to take this radical re-design. Let us
know.
Nov 13 '05 #2

"Regnab" <p.*******@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
I'm making a database to record training that employees have recieved.
For each training excercise, they recieve a mark between 1 and 3.

Initially, when there weren't so many training elements, I had put the
employee first name, last name, section, First Aid, Forklift
operation... and so on in one table. However, I now have a list of 227
Training elements that need to be completed (each recieving a mark
between 1 and 3). When I tried to put them all in one table, it said
there were too many fields.

Then I split them up into two tables and tried to join them with a
query based on first and last name. That produced all the fields I
needed, but did not show all the combo boxs (most, but not all) that I
had specified in the table set-up (Combo Box, Value List, "1","2","3").
Now I'm thinking I'll need to break them down into multiple smaller
tables, and display the fields via multiple subforms on a master form.

I'd like to know if people have a better solution. Actually, I'm pretty
sure someone does. Not even sure my idea of splitting them further will
work, but its the best I can come up with at the moment...

Thanks for your help,

Reg

Your current design has the fundemental problem that to add a new training
element, you need to add a new field. This means you need to change not
only table structure, but queries, forms, reports, modules, etc. To make
things much easier, you need to set up your table structure so it can cope
with adding/editing/deleting training elements without any need to change
any of the forms, reports, etc.
The standard solution is to have three tables:
tblEmployee - 1 record per employee
tblTraining - 1 record per training element
tblEmployeeTraining - 1 record for each bit of training an employee has done

This is the only sensible way to do this, but will involve pulling apart
almost all you have done and converting the data from the old to the new
format. However, there is not much point describing this technique further
unless we know you would be happy to take this radical re-design. Let us
know.
Nov 13 '05 #3
Brian,

I appreciate any help you can give me and considering I've restarted
this project twice already, once more won't hurt :). I had realised
that the structure was very limiting in so far as updating training
etc, but couldn't think of how else to do it. Your idea sounds
good....please explain :).

Nov 13 '05 #4
This is a basic students-classes database.

Student(StudentID*, FirstName, LastName...)
SectionRoster(StudentID*,SectionID*, Grade)
Section(SectionID*,CourseID, InstructorID, StartTime, EndTime)
Course(CourseID, CourseTitle,DepartmentID)
Department(DepartmentID, DepartmentName)

Documented absolutely to death. It's in Elmasri's book, I'd swear.
(Fundamentals of DB Systems), and probably a zillion other places...

Search for the right design on the web somewhere. Test it a little.
If you build the whole thing and it's wrong, getting
grades/averages/whatever is going to be a complete nightmare. IF you
do it right, itshouldbe easy.

Nov 13 '05 #5
I think I get the idea of what you're getting at...

tblEmployee (EmployeeID, Firstname, LastName)
tblTraining(TrainingID, TrainingDesc)
tblEmployeeTraining(EmployeeID, TrainingID, TrainingScore)

This makes good sense to me, but not sure exactly how you would make up
the third table. Normally I would make up a form and the user would put
data straight into it - enter "John" into name field, and it is
recorded under FirstName in tblEmployee. How would they enter a
Training Score when the first 2 values (EmployeeID, TrainingID) need to
be input into the record as well? I could do it via an SQL insert query
but I'm assuming you boys have a better and easier way. After all,
there's 227 training records one employee could have a score against.

What I'm trying to get at is how do you design the Form to allow data
entry. At the moment I'd like to have the Employee name at the top,
with a list of training options below, with a combo box for each
TrainingDesc offering the different scores available.

Thanks for your help,

Cheers

Reg

Nov 13 '05 #6
"Regnab" <p.*******@gmail.com> wrote in message
news:11*********************@o13g2000cwo.googlegro ups.com...
I think I get the idea of what you're getting at...

tblEmployee (EmployeeID, Firstname, LastName)
tblTraining(TrainingID, TrainingDesc)
tblEmployeeTraining(EmployeeID, TrainingID, TrainingScore)

This makes good sense to me, but not sure exactly how you would make up
the third table. Normally I would make up a form and the user would put
data straight into it - enter "John" into name field, and it is
recorded under FirstName in tblEmployee. How would they enter a
Training Score when the first 2 values (EmployeeID, TrainingID) need to
be input into the record as well? I could do it via an SQL insert query
but I'm assuming you boys have a better and easier way. After all,
there's 227 training records one employee could have a score against.

What I'm trying to get at is how do you design the Form to allow data
entry. At the moment I'd like to have the Employee name at the top,
with a list of training options below, with a combo box for each
TrainingDesc offering the different scores available.

Thanks for your help,

Cheers

Reg

Those are exactly the right questions to be asking. Almost all developers
would use the same type of 3-table structure to model the situation you
describe, but how do you view and edit the data? Here you could offer a
number of options depending on how much customisation/vba coding you are
prepared to do.
At its simplest, you use a subform with the master/child field set to
EmployeeID. This approach means that the correct training records are
displayed in the subform whenever you move to a new employee on the main
form. It also means that with any additions, the EmployeeID is
automatically added. So now you only need to add the TrainingID and the
score. The TrainingID is added by using a combobox which displays the name
but stores the ID (2 columns with the first set to zero-width). The score
is just a textbox.
OK, that's the simplest but it does have some problems. A combobox with
200-300 entries means that if someone was looking for 'Forklift' but it had
been written as 'Category A Forklift' it would be hard for the user to find
this in all those entries. Better would be where you press a button and
type 'forklift' and all possible matches were shown allowing the user to
select between a few.
There is also the problem that if a user has completed many types of
training, then displaying them in one large list might not be that easy to
look through. You could add a field to indicate TrainingType which might
come from another table such as:
1 Warehouse Skills
2 Health and Safety
3 IT Skills
Then you could break up the long list of training into easy to see bits. If
you needed to do some analysis of these training courses, then you could
even code up the courses so that you allocated a number of digits to
indicate the course content, e.g. digit1=type, digit2=compulsory or not,
etc. This type of 'masked field' allows for fast and flexible analysis, but
may be overkill for the start.

If you want some example sent by e-mail, just let me know if your posted
e-mail is valid (mine isn't) and I'll try and send you something.


Nov 13 '05 #7
What I'm trying to get at is how do you design the Form to allow data
entry. At the moment I'd like to have the Employee name at the top,
with a list of training options below, with a combo box for each
TrainingDesc offering the different scores available.

Thanks for your help,

Hmm...
"Have the employee name at the top" - so make the training form a
subform inside the Employee form.

"with a list of training options below,"
Umm... how about a continuous subform where you can choose the training
course from a combobox? And if you need to filter it, you can put an
UNBOUND textbox on the main form, and then set the rowsource of the
combobox to something like

Like Me.parentForm.txtFilter & "*"

and then you can come up with a manageable number of values in your
combobox. You can show pretty much whatever you want in your combobox
- just make it multi-column and show the ones you want to show. So you
have something like:

SectionID CourseNo CourseName DateOfTraining

as your combobox rowsource and you hide column(0), SectionID. then you
can filter on courseNo or whatever...

Nov 13 '05 #8
Brian, my email is as above, and I'd appreciate it if you could send me
examples. I'm trying to teach myself Access so any models will be very
useful.

I'll try out what yourself and Pietlin have suggested tonight and see
how I go. Ideally, I'd like to be able to have all the training records
(even those not completed by that employee) listed - allowing the user
to peruse the form and see what has and hasn't been done. To make it
easier to identify which training is required, I was going to divide
them into sections which would be put on a Tab Control - with section
names along the top (ie Mill, Administration). The user could click on
each tab and see what further training an employee would need to work
in each section.

Anyways, just thought I'd explain it a little more. if you could send
me the examples, that would be much appreciated.

Regards

Reg

Nov 13 '05 #9
Brian,

Thanks for the demos. It's pretty much exactly what I need to do. The
only contigency I was wondering about was when one training record is
associated with multiple departments - ie you want "First Aid" to
appear on 2 different tabs. I haven't chewed it over properly yet so
will hopefully work it out but just thought I'd mention it.

Cheers

Reg

Nov 13 '05 #10
Have worked out the one to many issue with the training...simple I
know...

Nov 13 '05 #11

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

Similar topics

61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
2
by: terence.parker | last post by:
I am often faced with the dilemma of whether to use a JOIN query across three tables in order to grab a bunch of results - or whether to create another table to represent what I want. The latter is...
3
by: Jon Ole Hedne | last post by:
My Access 2002-application need to work with tables from both Oracle and Access. To solve this, I want to run some querys on three views in Oracle and import the results into temporary...
11
by: deko | last post by:
I need to create different recordsets based on queries that use data from unbound fields in a form. I've discovered that I can't do this, and instead need to save the data in question (usually a...
15
by: Nathan Bloomfield | last post by:
How many fields can a table have before it is considered inefficient? The table's records will eventually number in the thousands (about 3000 per year).
10
by: MLH | last post by:
I have an A97 table with a Yes/No field named TowJob and a form bound to that table. The TowJob control on the form is bound to the same field. It is an option group with Yes and No bttns valued...
5
by: Mountain Bikn' Guy | last post by:
How would I do this? public sealed class UtilityClass { public static MyObject Object1;//see note below about importance of static object names in this class public static MyObject Object2;...
22
by: WXS | last post by:
Sometimes a method in a class requires the use of class instance variables/fields that will not be used outside of the method itself. Currently this means you must create a instance field in the...
2
by: Jody | last post by:
Hi I've been working on a database which basically incorporates 3 tables to describe say a widget which is either sold or leased. I have the Widget table which stores the information related...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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:
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...

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.