Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2015
    Posts
    1

    Unanswered: Student Attendance Database

    I would like to store student attendance in table attendance where I have created two attendance_master and attendance_detail tables. Similarly I have enrolled_master and enrolled_detail tables where students enrolled in different classes.

    Now I want to store attendance. How to relate attendance tables with enrolled tables as I have built relationship but it shows circular references between tables and I want to avoid it.

    Here is table structure:

    Attendance_Master:
    ATTNID - PK
    ATTNDATE
    ENROLLMENTID

    Attendance_detail:
    Attnid (FK)
    Std_enrolled_id (FK from Enrolled_Detail)
    Mark

    Enrolled_Master:
    EnrollmentID -PK
    Enroll_date

    Enroll_Detail:
    Enroll_ID (FK)
    StudentdID (FK)
    Student_Enrolled_ID -PK
    Last edited by muazzamazaz; 08-01-15 at 09:54.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    In the future post CREATE TABLE statements for all tables involved with question or solution.

    https://en.wikipedia.org/wiki/Third_normal_form
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool

    Quote Originally Posted by muazzamazaz View Post
    I would like to store student attendance . . .

    Here is table structure:
    . . . e t c . . .
    Your data model makes no sense, no wonder you have circular references and what seems Foreign Keys referencing missing tables.

    You could select a subset of this Student Registration Data Model.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

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
  •