Saturday 20 December 2008

2.Draw Entity relationship diagram (ERD)

Analysis: System Requirement

Student
The LSBU based on “LSBU Virtual Learning Environment” keep information about student, their Id number (which is unique), username, password, first name, last name, their course and other relevant information about student. Also student can only have one course and more than one unit assign to it.
- Students can only access to materials under the unit which they enrolled, in this case to particular a course. 
- Students are able to download material or /and view the material.
- Students cannot create, update nor delete any material.
- Students must be fully enrolled in order to use the website. Username and password required.

Staff
Staff’s details are also kept by the application, the application keep record about their name, id number as unique number, age, address and other relevant information about staff. For each staff, material can be created pointing to particular unit.
- Staffs (tutors or lecturers) able to create, upload, update, and delete material.
- Those following action can only be perform to unit which the staff registered to.
- Staffs are able to send notification to student of which new material has been made. 

Courses
The application keeps a record about course detail such as course Id (unique_ auto increment), and course Name, etc.
- One course can have many units, many student and many staff assign to it. 
- Only the administration can add, delete or update the course.

Units
The application keeps a record about unit detail such as unit Id (unique_ auto increment), unit Name, etc.
- Units belong to courses, which mean one unit belong to more than one course.
- One unit have more than one student and one student can have many units.
- One unit have more than one staff and one staff can have many units.
- Only administration can add, delete or update unit.
- One unit can have more than one material.

Materials
The application keeps a record about material detail such as material Id (unique_ auto increment), material Name, date created, name of staff who created the material, etc.
- One material belongs to only one unit.
- Material can be create, delete and update only by staff.



Entity relationship diagram


ERD Explanation:

Student/Course : Student study only at on course cannot be more and the course have many student studied.

Unit/Course: Required courseUnit table – many to many relationship. Unit belong to more than one course and course offer many units to be learnt.

Unit/staff: Required staffUnit table – many to many relationship. One unit can have many staff (lecturer/tutor) and staff can teaches more than one unit.

Unit/Material: one unit can have more than one material which been created by staff (tutor/lecturer) and one material belong to one unit


Relational database design
- Courses (course_id, course_name)
- Student (std_id, std_Name, std_first, std_last, std_password, std_email, phone_no, course_id*)
- Unit (u_id, u_name)
- staff (s_id, s_Name, s_first, s_last, s_password, e_mail)
- material (m_id, m_name, content, fileName, m_url, date, s_id, u_id)
- staffUnit (s_u_id, s_id*, u_id*)
- courseUnit (courseUnit_id, course_id*, u_id*)

*Note: Underline = Primary key, asterisk * = Foreign Key






No comments: