If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > database design for school grades

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-08-08, 15:23
Jym Jym is offline
Registered User
 
Join Date: Jun 2005
Posts: 30
database design for school grades

I'm designing a database so I can enter my students marks using SQLite which is a non-relational database.

The information I have is
Course Name & Code (for example 'International Business', 'BUS800')
Course Section (for example '001')
Course Term (for example 'Fall'
Year Taught ('2007')

Student name & number ('John Doe', '000 000 000')

Assignments (there maybe 4 assignments and 2 exams)

Student Grade (grade for each assignment)

So I was thinking this might be the optimal way to make the database so I can compare the different classes or just print out marks from one course.

Table course (c_RowID, course_name, course_code) // 'International Business' 'US800'
Table section (s_RowID, section_number) // '001'
Table terms (t_RowID, term_name) // 'fall'
Table year (y_RowID, year_taught) // '2008'

TABLE course_relations (cr_rowID, c_rowID, s_rowID, t_rowID, y_rowID) //where cr_rowID is course_relations rowID so I can then compare this to Students, and Assignment Marks

Table student(student_ID, first_name, last_name)
Table assignments(a_rowID, assign_name)

TABLE assign_course_relations (acr_rowID, cr_rowID, a_rowID) //this would then control which assignment is for which course

Table student_assign_relations (student_ID, acr_rowID, Grade)

---------------
Is this the correct way of going about it ?

Any advice is appreciated TIA
Reply With Quote
  #2 (permalink)  
Old 01-08-08, 19:17
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
here is an exercise for you:

try to see how many of those tables make sense if you do not use an "id" but rather use some other identifying unique key for each table
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 01-09-08, 00:25
Jym Jym is offline
Registered User
 
Join Date: Jun 2005
Posts: 30
Sorry I have no clue what that means, I'm not really a database person, I can just fudge my way through it on the best of days. (come downtown to Ryerson and show me what you mean )
Reply With Quote
  #4 (permalink)  
Old 01-09-08, 00:36
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
to answer your original question ("Is this the correct way of going about it ?") you are very very close

about coming down to ryerson, that's a wonderful idea, contact me via my site and maybe we can set something up
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On