You are on page 1of 7

ERD

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:

Entities -- Major categories of data and are represented by rectangles


Attributes -- Characteristics of entities and are listed within entity rectangles
Relationships -- Business relationships between entities and are represented by lines
An Entity is a person, place, object, event, or concept that an organization wants to maintain data on. Each entity has a unique identity that
differentiates it from other entities. A point of distinction must be made between entity types and entity instances. An entity type is a collection
of entities that share common properties. Entity types are also known as entity classes. An entity instance is an individual occurrence of an
entity type. A data model describes an entity type only once; however there may be numerous instances of that type within a database.

There are many notation styles that express cardinality.


Information Engineering Style

Chen Style
Bachman Style

Martin Style
Lets take an example and solve it using ER diagrams :

ER-DIAGRAM OF SEMSTER EXAMINATION SYSTEM:--


ASSUMPTIONS:

Data requirements:

The major characteristics of the semester examination system are……..

* 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:

STEP 1:ENTITIES USED IN E-R DIAGRAM

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.

9.Every exam has results.This is many to one relationship.


STEP 3:FIND THE KEY ATTRIBUTES

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

Data Flow Diagram


A data flow diagram (DFD) illustrates how data is processed by a system in terms of inputs and outputs. As its name
indicates its focus is on the flow of information, where data comes from, where it goes and how it gets stored.

History of Data Flow Diagrams


Data flow diagrams became popular in the 1970s in software development. They were first described in a classic text
about Structured Design written by Larry Constantine and Ed Yourdon. Yourdon & Coad's Object Oriented Analysis
and Design (OOA/OOD) was a way of visualizing software systems before UML diagrams.

Data Flow Diagram Tutorial


SmartDraw contains all the needed data flow diagram symbols and easy-to-use templates that help you get started.
Stamp shapes to your drawing area and connect them easily with keyboard shortcuts or intuitive commands located
on the SmartPanel to the left of your drawing area.

Data Flow Diagrams Symbols


There are essentially two different types of notations for data flow diagrams (Yourdon & Coad or Gane & Sarson)
defining different visual representations for processes, data stores, data flow and external entities.
Yourdon and Coad type data flow diagrams are usually used for system analysis and design, while Gane and Sarson
type DFDs are more common for visualizing information systems.
Visually, the biggest difference between the two ways of drawing data flow diagrams is how processes look. In the
Yourdon and Coad way, processes are depicted as circles, while in the Gane and Sarson diagram the processes are
squares with rounded corners.
Process Notations. A process transforms incoming data flow into outgoing data flow.

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.

Data Flow Diagram Levels


Context Diagram. A context diagram is a top level (also known as "Level 0") data flow diagram. It only contains one
process node ("Process 0") that generalizes the function of the entire system in relationship to external entities.
DFD Layers. Draw data flow diagrams can be made in several nested layers. A single process node on a high level
diagram can be expanded to show a more detailed data flow diagram. Draw the context diagram first, followed by
various layers of data flow diagrams.
DFD Levels. The first level DFD shows the main processes within the system. Each of these processes can be broken
into further processes until you reach pseudo code.

Q. What are the differences between flowchart and structure chart?

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.

You might also like