Professional Documents
Culture Documents
An Entity Relationship Diagram (ERD) or ER diagram is the best visual representation of a Database. Any Database Designer will follow
Entity Relationship Diagram to design physical database. An Entity-Relationship diagram (ERD) typically serves as the main deliverable of a
conceptual data model. While newer approaches to E-R modeling have developed, the E-R approach is still cited by some professionals as
"the premier model for conceptual database design". An ERD is a logical representation of an organization's data, and consists of three
primary components:
Chen Style
Bachman Style
Martin Style
Lets take an example and solve it using ER diagrams :
Data requirements:
* The university has many departments which are identified basically by the department_id.
Also the departments have a particular location (campus).
* Each department has teachers. Each teacher is assigned to teach a particular subject.
He also has to make question paper and evaluate the answer script. WE have assumed that
a teacher can take classes in different department but he will belong to a particular department.
* A particular department may offer few courses. One or more subjects may be same for different
courses as well as departments. Same subject (name) in two courses or department is separately
identified by the corresponding subject_id.
* Subject_id for a course of a department is unique.
* A student must register to appear in the exam. A registered student is considered as exam candidate
* The exam controller section is the administrator of this whole examination system.
ANSWER:
1.Student
2.Department
3.Teacher
4.Subject
5.Exam
6.Exam Candidate
7.Result
8.Routine
STEP 2:FIND THE RELATIONSHIPS
1.This is the 1-to-many binary relationship set between department and student entity sets
2.Belongs to is the 1-to-many binary relation ship set between DEPARTMENT and TEACHER sets.
Because- for a particular department there are many teacher but for a teacher only 1 department is fixed.
And the participation of the teacher entity sets in this relation ship sets is partial.
3.Teaches is the many-to-many binary relationship sets between teacher and subjects.
4.Enrolls is the one-to-one binary relationship sets between Student and Exam Candidate.
Component attributes are: date, month, and year.
5.Sits for is a many-to-many binary relationship sets between the Exam Candidate and the Examination.
6.Scheduled is the relationship that holds between the examination and the exam routine.
7.This is a many-to-many binary relationship set between the department and the examination.
8.This is the relationship sets between Exam Candidate and the Results.
1.Student: rollno
2.Department: dept.no
3.Teacher: teacher_id
4.Subject: subject_id
5.Exam: exam_id
6.Exam Candidate: exam_id
7.Result: roll no
8.Routine: exam_id
STEP 4:FIND THE OTHER ATTRIBUTES
1.Student:
Name, Roll No, Reg. No, Contact No
2.Department:
Department_id, Name, Location
3.Teacher:
Teacher_id, Name, Contact No, Status
4.Subject:
Name, Subject_id ,Course, Dept
5.Exam:
Exam_id, Roll No, Sub_id, Exam roll no.
6.Exam Candidate:
Semester, Year, Exam_id, Sub_id
7.Result:
Roll no, Exam_id, Sub_id, Grade, Date_of_publish
8.Routine:
Date, Time, Room No, Exam_id
STEP 5:COMPLETE THE ER-DIAGRAM
DFD
Datastore Notations. Datastores are repositories of data in the system. They are sometimes also referred to as files.
Dataflow Notations. Dataflows are pipelines through which packets of information flow. Label the arrows with the
name of the data that moves through it.
External Entity Notations. External entities are objects outside the system, with which the system communicates.
External entities are sources and destinations of the system's inputs and outputs.
1. A structure chart can represent an entire program with modules whereas a flowchart can
represent a module in a program.
2. In structure chart, rectangles are used to represent modules whereas in flowchart terminal,
process, input/output, flowline, connector, decision etc outlines are usually used.
3. Structure chart is used to identify relationship between modules.
Flow chart represents the sequence of events in a process.
4. Flow chart is easy to understand for beginners.
Structure chart is difficult for beginners to understand as solution is displayed in hierarchical
order, like a tree.
5. A structure chart is used to show how modules of a computer program relate to each other. A
flow chart shows a single module in detail.
6. A structure chart is more like an organizational chart (or org chart) -- showing the components
of some structure (e.g., organization or company). A flow charts is also a graphical representation
but of a process not how a structure is organized.