Results 1 to 4 of 4

Thread: E-learning (ER)

  1. #1
    Join Date
    May 2012
    Posts
    2

    E-learning (ER)

    Hi !
    I'm new at database and I have a mini project !
    I chose E-learning and made up a case study
    I have two design and I don't know which one is better !

    My case study is a website that offer a tutorials or what so ever
    Each student must reigister to the website at first and they will reseve a rigister id .
    Each student must reigister the course they want , they can take nothing or many courses .
    Each teacher must teach one course only .
    The course can have one or many teachers .

    First I have 4 tabels

    -Teacher
    T_ID {PK}
    name
    gender
    salary
    nationality

    -Student
    S_ID {PK}
    name
    gender
    user_name
    password
    SSN
    phone
    NATIONALITY

    -Course
    C_no {PK}
    c_name
    DESCRIPTION

    -Registration
    R_ID {PK}
    i_date
    e_date
    cost

    The first ER:
    http://i47.tinypic.com/2czrbww.png


    The second ER:
    http://i46.tinypic.com/2yjugb5.png

    we put an entity for the Registration but some told us it's not nessory
    and some said it's better than the second

    ** Registration entity can be removed

    I appreciate any help
    sorry for my english if u didn't understand it ~

  2. #2
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    The first er is a good start. But there are no relationships between the various tables. How would you join the registration to student and course or teacher to course?

  3. #3
    Join Date
    May 2012
    Posts
    2
    I already gave them relationship but still not sure

    see what I came up with :

    Student --enroll in--> Registration
    course --register in --> Registration
    Teacher --teach or give --> course

    I kinda think it's week , don't know
    can help me improve it for somthing better

  4. #4
    Join Date
    Aug 2004
    Location
    Dallas, Texas
    Posts
    831
    Try adding a foreign key to the tables and create a physical relationship. Wouldn't there be an fk from teacher to course? This tells us who is teaching the course. A student will take a course so shouldn't there be a fk to course in student take?

Posting Permissions

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