Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2011
    Posts
    5

    Unanswered: 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?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jul 2011
    Posts
    5
    I) OK. I Agree.

    II) Then what would be a better solution man?!

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    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?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    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.

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    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 on the Tiger 800 or the Norton

  7. #7
    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?

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    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 on the Tiger 800 or the Norton

  9. #9
    Join Date
    Jul 2011
    Posts
    5
    Ok man. Will let you know if anything comes up.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •