Presentation2

12
HI, EVERYBODY!!

Transcript of Presentation2

Page 1: Presentation2

HI, EVERYBODY!!

Page 2: Presentation2

GROUP MEMBERSSERIAL NO.

NAME ID

1 SIFAT ARA SABA 21-1032 TANIA AKTAR 21-1183 KEYA DATTA 21-1244 AEYSHA AKTER RANI 21-1585 MD. IMTIAJ HOSSAIN 21-0976 MD. RAKIBUL ISLAM 21-0737 MD. SHAKIL AHMED 21-1068 RUHUL AMIN 21-1339 MD. PAPPU MIAH 21-17810 MD. SAYED MURSALIN 21-013

Page 3: Presentation2

ER DIAGRAM An entity relationship diagram

shows the relationship of entity sets stored in a database. At first glance an entity relationship diagram looks like a flowchart.

Page 4: Presentation2

An entity relationship diagram for a college database

Now we are going to design an ER diagram for a college database. At first we have to discuss the database of a college that is normally seen...

1. A college contains many departments.

2. Each department has a number of sections.

3. Each department can offer any number of courses.

Page 5: Presentation2

An entity relationship diagram for a college database

4. Many instructor work in a department.5. An instructor can work only in one

department. 6. An instructor can be head of his concerned

department. 7. An instructor teaches any number of

courses. 8. Each course is taught by only one instructor.9. Each student is enlisted in only one section.10. Each course can have any number of

students.

Page 6: Presentation2

ER DIAGRAM Now we have to follow the 4 step procedures to

construct the ER diagram for the above database..

1. Identify the entities and relationship..

Here the entities are- Department Section Courses Instructors students

Page 7: Presentation2

THE RELATIONSHIP

Department Has sections

Department Has Courses

Department Has Instractor

Students Enroll Courses

Instractor Teaches Course

Page 8: Presentation2

2. Integrate the entities and relationships

DEPT. HAS SECTIONINST

RUCTED BY

HAS

OFFER

COURSE

TAUGHTBY

INSTRUCTOR

ENROLLED BY

STUDENTS

M

1

1

N

M

NM

M

M

M

M

1

Page 9: Presentation2

1. A department has many sections and each department can have many sections, so the cardinality between dept. and sections is many to many. (M:N)

2. One dept offer many courses but one particular course can be offered by only one department and courses. So the cardinality between dept and courses is one to many. (1:N)

3. A department has many instructor but one instructor can be a member of only one department. So the cardinality between department and instructor is one to many. (1:N)

3. Assign Cardinalities between the relationships:

Page 10: Presentation2

4.One course can b enrolled by many students and one student can enrolled for may courses. Hence the cardinality between students and courses is many to many. (M:N)

5. One course is taught by only one instructor but one instructor teaches many courses. Hence the cardinality between courses and instructor is many to one.(N:1)

Page 11: Presentation2

4. Specify the data attributes:

Department: name, location Ccourse: course name, course code,

duration Instructor: ID, name, Phone number,

Designation. Student: ID, name, phone number Section: A, B, C

Page 12: Presentation2

DEPT

OFFER

COURSE

ENROLLEDBYSTUDENTS

HAS

INSTRACTOR

HAS

SECTION

TAUGHTBY

Name

Location

Dutrion

Code

Name

Phone

Name

Id

Designation

Phone

Name

Id BA

Now the complete diagram is