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 > Database Server Software > MySQL > Student Attandance Database - Design Suggestions Please

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-31-11, 12:09
blazzer1212 blazzer1212 is offline
Registered User
 
Join Date: Jul 2011
Posts: 5
Student Attandance Database - Design Suggestions Please

I would like to design a Attendance DB for following specs
*) There are 4 branches
*) Each branch has 60 Students

My first design

BRANCH
+ BranchID
+ BranchName

STUDENT
+ StudentID
+ StudentName

CLASSATTENDANCE
+ ClassID
+ Date
+ StudentID
+ Present
+ LeaveApplied

Here's my problems

I)
We have at least 4 Branches. There are 60 students in each branch.
So 60 * 4 = 240 records(tuples) in the CLASSATTENDANCE table per day. The records spanning even 6 months would be very large. I think the table would be too large to manage.
-----
I would like to know if there is more convenient way.

II)
CLASSATTENDANCE table solely depends on 'Date' attribute to identify the chronological order. Is there a better way, like categorizing by months.

I think creating a table for each month would solve it, like a table 'CLASSATTENDANCE+[MONTHNAME]'
------
Is that a good solution or is there any better one?
Reply With Quote
  #2 (permalink)  
Old 07-31-11, 16:44
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
I) 240 rows per day is not "very large" or "too large to manage" unless you ran this application for several thousand years

II) that's a horrible solution
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 08-01-11, 03:30
blazzer1212 blazzer1212 is offline
Registered User
 
Join Date: Jul 2011
Posts: 5
I) OK. I Agree.

II) Then what would be a better solution man?!
Reply With Quote
  #4 (permalink)  
Old 08-01-11, 03:36
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,525
Quote:
Originally Posted by blazzer1212 View Post
Then what would be a better solution man?!
what you have now

by the way, what's a branch? and how come there isn't a class table?
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 08-01-11, 03:42
blazzer1212 blazzer1212 is offline
Registered User
 
Join Date: Jul 2011
Posts: 5
Quote:
Originally Posted by r937 View Post
what you have now

by the way, what's a branch? and how come there isn't a class table?

OK. I was just worrying cause this is my first time with Database.

Branch is same as class, but also tells which class one is taking like Information Technology branch.

Thank You for your help.
Reply With Quote
  #6 (permalink)  
Old 08-01-11, 03:58
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
present and leaveapplied for in the same table doesn't feel right
they have the feel of mutually opposed data
ie either they are present or not

you may be better to have say an attendance code / type
which then subclassifies the attendance record
to, say
present
absent
absent, medical appointment
absent with prior knowledge
....and so on
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #7 (permalink)  
Old 08-01-11, 04:11
blazzer1212 blazzer1212 is offline
Registered User
 
Join Date: Jul 2011
Posts: 5
Do you want me to move 'leaveapplied' field to another table and use according to the value in the 'present' field?

If that is the case, how should I do it?
Reply With Quote
  #8 (permalink)  
Old 08-01-11, 04:45
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
Quote:
Originally Posted by blazzer1212 View Post
Do you want me to move 'leaveapplied' field to another table and use according to the value in the 'present' field?

If that is the case, how should I do it?
No I want you to do your own assignment, go through the design process, work out what you need, understand why you went down some blind allys and learn from the process. is just as valuable doing something wrong and learning form that as doing something right. often if you get others to do your homework you don't actually learn from the process. equally what contributors here tend to do is look at a data model from a real world perspective, from their experience and that may not be appropriate for validation of coursework

understand about relational table design, eliminating redundancies, duplications and so on.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #9 (permalink)  
Old 08-01-11, 06:50
blazzer1212 blazzer1212 is offline
Registered User
 
Join Date: Jul 2011
Posts: 5
Ok man. Will let you know if anything comes up.
Reply With Quote
Reply

Tags
attendance, database design

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