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

database structure problem - advice please?

Here's what I was doing, it is obviously stupid because i have exceeded the
"too many fields defined error"

I have to create a database driven application that allows students to
update the records of which classes they took, what grade they received, and
what semester they took the class in.

I was using one database table, with some unique identifiers for each
student. Then for each of the 50 classes they have to take, I had 4 fields
each, one for whether they took it or not, one for the semester, one for the
year, one for the grade they received.

So all in all I had 4x50 fields for the classes and then the various unique
identifiers.

I just can't fathom how to simplify this problem. Anybody got any ideas?
Nov 13 '05 #1
3 1196
TblStudent
StudentID
<<Other fields you need>>

TblClass
ClassID
<<Other fields you need>>

TblSemester
SemesterID
Semester

TblStudentClass
StudentClassID
StudentID
ClassID
ClassYear
SemesterID
Grade

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Johnson" <jo*****@spam.troll> wrote in message
news:0jS_c.1225$sS4.693@trndny03...
Here's what I was doing, it is obviously stupid because i have exceeded the "too many fields defined error"

I have to create a database driven application that allows students to
update the records of which classes they took, what grade they received, and what semester they took the class in.

I was using one database table, with some unique identifiers for each
student. Then for each of the 50 classes they have to take, I had 4 fields each, one for whether they took it or not, one for the semester, one for the year, one for the grade they received.

So all in all I had 4x50 fields for the classes and then the various unique identifiers.

I just can't fathom how to simplify this problem. Anybody got any ideas?

Nov 13 '05 #2
In message <0jS_c.1225$sS4.693@trndny03>, Johnson <jo*****@spam.troll>
writes
Here's what I was doing, it is obviously stupid because i have exceeded the
"too many fields defined error"

I have to create a database driven application that allows students to
update the records of which classes they took, what grade they received, and
what semester they took the class in.

I was using one database table, with some unique identifiers for each
student. Then for each of the 50 classes they have to take, I had 4 fields
each, one for whether they took it or not, one for the semester, one for the
year, one for the grade they received.

So all in all I had 4x50 fields for the classes and then the various unique
identifiers.

I just can't fathom how to simplify this problem. Anybody got any ideas?


It's a classic problem in database design. What you have is information
about three different types of thing, and putting all of that data in
one table is not a good idea. It simplifies database design but can lead
to problems, particularly if you ever need to go back and edit existing
records. Look up "normalization" (or normalisation if you want English
as well as American references.)

You need to split the table. If you normalise the data you find that
there are three different entities; Student, Semester, Class (as Frank
has already pointed out.)

Once you have the data in separate tables you can create a query that
links them. You can create forms and reports based on the query rather
than individual tables. You may find it easier to create one
Student/Semester query and use that on a form then have the Class data
on a subform. Experiment a little and let us know if you hit problems.


--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.

Nov 13 '05 #3
Yeah you guys are right. I must have stayed up too late last night because
right now it all seems so clear. I love that breakthrough feeling. The
application is coming along great now. Thanks fellas.
"Bernard Peek" <ba*@shrdlu.com> wrote in message
news:9D**************@shrdlu.com...
In message <0jS_c.1225$sS4.693@trndny03>, Johnson <jo*****@spam.troll>
writes
Here's what I was doing, it is obviously stupid because i have exceeded the"too many fields defined error"

I have to create a database driven application that allows students to
update the records of which classes they took, what grade they received, andwhat semester they took the class in.

I was using one database table, with some unique identifiers for each
student. Then for each of the 50 classes they have to take, I had 4 fieldseach, one for whether they took it or not, one for the semester, one for theyear, one for the grade they received.

So all in all I had 4x50 fields for the classes and then the various uniqueidentifiers.

I just can't fathom how to simplify this problem. Anybody got any ideas?


It's a classic problem in database design. What you have is information
about three different types of thing, and putting all of that data in
one table is not a good idea. It simplifies database design but can lead
to problems, particularly if you ever need to go back and edit existing
records. Look up "normalization" (or normalisation if you want English
as well as American references.)

You need to split the table. If you normalise the data you find that
there are three different entities; Student, Semester, Class (as Frank
has already pointed out.)

Once you have the data in separate tables you can create a query that
links them. You can create forms and reports based on the query rather
than individual tables. You may find it easier to create one
Student/Semester query and use that on a form then have the Class data
on a subform. Experiment a little and let us know if you hit problems.


--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.

Nov 13 '05 #4

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

Similar topics

9
by: Bob Bedford | last post by:
Where to find a comprehensive document on how take datas from XML and put them in a Mysql Database. I've many sites sending us XML files. We have to parse datas and save those datas on Mysql. ...
0
by: Zed | last post by:
I am creating an Access database to monitor monthly performance figures for approximately 100 call center agents. Every month, each agent will have a total of about 15 different measurements...
1
by: Arun | last post by:
Hi..I am arun and Thanks to all of you in advance for solving my problem... I am working as a quality co-op for Maytag and I have developed a defect tracking database using access and VBA. It...
1
by: Nathan Bloomfield | last post by:
Hi, I am a new database developer and would appreciate some advice on improving the efficiency of my database. The code below is an example of one of the more complex queries in the database...
2
by: z | last post by:
I'm developing a couple of applications that I need some advice on which database structure to use. My first thought is SQL Server of course, but after looking at my potential users and their...
2
by: Shwetabh | last post by:
Hi, I am using MS-SQL server to store my database. My problem is that I have around 150+ database files in DBF format. Each database file consists of fields ranging from 2 to 33 in number. Also,...
14
by: Mikee Freedom | last post by:
Good Morning all, New member to the list, hoping you might be able to give me some much needed advice. Basically, I have a client who would like to offer the ability for his users to have...
12
by: Robbo | last post by:
Hi, My database contains 45 tables the structure of which is evolving as I develop. I need a utility that will "read" the structure of this database and it's tables and then create an identical...
10
by: Fenix [Youth Director] | last post by:
Hello, I am in need of advice or examples of how I should build my database for a small non-profit youth computer gaming organization. I am a beginner at database design and I know this project...
9
by: Peter Duniho | last post by:
Is there a straightfoward API in .NET that allows for inspection of a database? That is, to look at the structure of the database, without knowing anything in advance about it? For example,...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...

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.