Duplicate data where I don't want it

G

Guest

I have created a database that is for a teacher. there is a Table of students with first and last name fields. There are tables for each subject, i.e. math,reading, etc with grade data for each of several categories within the subject, and for each trimester. The problem is if I have a duplicate last name, when I enter data for the grade of the duplicate last name student, it changes the grade of the previous (1st) student to match. Investigating reveales that data records for grades are not being created for the students with duplicate last names, but rather only one grade record that is applied to all with the same last name.

I am using Forms, with the student name, and subform with the grades to input the data.
Suggestions would be appreciated.
 
S

Scott McDaniel

I would assume that your problem is with the design of your tables. I would
picture a table cluster like this:

tblTeacher
============
lngTeacherID
strLastName
etc

tblStudent
==========
lngStudentID
strLastName
etc etc

tblCourses
===========
lngCourseID
lngTeacherID (FK to tblTeacher)
strCourseName
etct

tblCourseMembership
===============
lngStudentID (PK with lngCourseID)
lngCourseID (PK with lngStudentID)

tblGrades
===========
lngGradeID
lngCourseID
dteDateOfGrade
lngTypeOfGrade
etc etc

and on and on ... this is VERY rudimentary, but it gives you some idea of
what you should be looking for. Remember that Access is NOT an Excel
spreadsheet; records should "relate" to one another. For example, a Course
record would be related to a Teacher record (can't have a course without a
teacher). I would encourage you to read up on relational database design.
There are several good books and web sites (Google on "relation database
design" and you'll get swamped with hits).

--



Scott McDaniel
CS Computer Software
www.thedatabaseplace.net

Gil said:
I have created a database that is for a teacher. there is a Table of
students with first and last name fields. There are tables for each subject,
i.e. math,reading, etc with grade data for each of several categories within
the subject, and for each trimester. The problem is if I have a duplicate
last name, when I enter data for the grade of the duplicate last name
student, it changes the grade of the previous (1st) student to match.
Investigating reveales that data records for grades are not being created
for the students with duplicate last names, but rather only one grade record
that is applied to all with the same last name.
 
O

onedaywhen

'...records should "relate" to one another'?

Try searching the google groups archive on "Rows are not records".

BTW I don't consider 85 results as getting swamped.

--
 
S

Scott McDaniel

onedaywhen said:
'...records should "relate" to one another'?

Sorry ... I meant to say that TABLES should be related to one another. I
assumed that the OP was a novice designer and was trying to use phrases more
easily understood.
Try searching the google groups archive on "Rows are not records".

I get quite a lot of hits, but don't see where this helps the OP
BTW I don't consider 85 results as getting swamped.

The search phrase should have been "relational database design" -
fumblefingers on my part. Using this phrase, I get around 800,000 hits.
Better?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top