50 likes | 158 Vues
CHAPTER 5 DATABASES. Jason C. H. Chen, Ph.D. Professor of MIS School of Business Administration Gonzaga University Spokane, WA 99223 chen@jepson.gonzaga.edu. Entity-Relationship Modeling (ER-M). 1. Data Modeling (Student-Advisor).
E N D
CHAPTER 5 DATABASES Jason C. H. Chen, Ph.D. Professor of MIS School of Business Administration Gonzaga University Spokane, WA 99223 chen@jepson.gonzaga.edu Entity-Relationship Modeling (ER-M)
1. Data Modeling(Student-Advisor) • Each semester, each student must be assigned an adviser who counsels students about degree requirements, and helps students register for classes. Each student must register for classes with the help of an adviser, but if the students’ assigned adviser is not available, the student may register with any adviser. We must keep track of students, the assigned adviser for each, and the name of the adviser with whom the student registered for the current term (therefore, there is a relationship between “Student” and “Course”). Represent this situation of students, advisers and course with an E-R diagram. Also, draw a data model for this situation using the tool you have been told to use in your course. • Entity and attributes • Relationship and cardinality
Advisor Student Course ERM for Project Advisor_IDStudent_IDCourse_ID Name Student Name Title Department Major Credits Title Phone Registration Course Student Student_ID Course_ID Semester Year Advisor_Student Adviser_ID Student_ID Semester Year Advisor
S_ID C_ID C_ID S_ID Advisor Student Course S_NameS_Major C_TitleC_Credits C_TitleC_Credits S_NameS_Major Ad_ID Ad_NameAd_Department Advisor Student Course Ad_ID Ad_NameAd_Department Student_Advisor Enrollment Ad_IDS_ID C_IDS_ID SemesterYear SemesterYear 1a) 1b) break down M:N into two 1:M