vamsikgummadi 0 Newbie Poster

E R Modeling

In software development process there are mainly six phases such as:
► Requirement
► Architecture
► Design
► Implementation
► Testing
► Deployment

For this software development process different model are available such as
► Agile
► Clean room
► Iterative
► RAD
► RUP
► Spiral
► Waterfall
► XP
► Scrum
► Component Assembly Model…

Suppose if we take the RAD model, it is a linear sequential software process that emphasizes an extremely short development life cycle. It is a component based construction approach. This is a type of time boxing approach. The RAD model development can be broadly classified into four stages:

► Business Modeling <=>Requirement and Architecture
► Data Modeling & Process Modeling <=>Design [DB Modeling]
► Application Generation <=> Implementation
► Testing and Turnover <=> Testing and Deployment

One of the most important part of “Database Modeling” is ER Modeling.
Why do we need an ER Model?
►ER model is a conceptual design. It is a simple, minimal and accurate description of database requirements.
►Identification of entities, relationships and attributes.
►Diagrammatic representation
►Offers an effective frame work for integrating multiple applications.


Core elements
► Entity
► Attributes
► Relationship type
► Attributes on relationship

** A database can be modeled as:
► A collection of entities
► Relation ship among entities.


Entity: A thing of significance about which information needs to be known is called an entity. An entity is a person, place, concept or thing about which business needs data.
Ex: Accounts Department --------Entity

An entity type is a collection of entities that share a common definition.
Ex: Department --------------------Entity Type

Entities can further be classified as Strong and Weak Entities.
Ex: Cinema ------ Strong Entity
Seat ------ Weak Entity
Seat is a weak entity because there would be no preference for a Seat without Cinema.

Attributes: Some thing which describes or qualifies an entity is known as an attribute. Attributes are the characteristics of entity type that we are interested in.
Ex 1: Employee ----------- Entity
Employee no -------- Attribute.
Attributes are further classified into:
► Simple and Composite attributes
► Multi valued attributes
► Derived attributes.


1.Simple and Composite attribute:
Ex: Employee----------Entity
Ename [FName, LName] = Tom Hanks
Address[ Street, City, State, Postal Code]= 12 Mile,Farmington Hills, MI,456112.
2.Multivalued attributes:
Ex: Phone Number [State code, Area code, Phone Number] = 248-186-1819.
3.Derived Attributes:
Ex: Age ---------------------------Can be calculated from date of birth
Experience---------------------Can be calculated from date of joining.

Attributes can also serve as keys while modeling:
► Candidate key. Ex: Empno, job.
► Primary key. Ex: Deptno, Dname.
► Composite Key. Candidate key with more than one attributes.


A relationship is an association among several entities. An attribute can also be a property of relation ship. There are mainly three types of relationships.

► Binary
Employee------Bank. Employee works for a bank and bank pays to an employee.

► Ternary
Employee-----Job----Branch. Employees can have different jobs (responsibilities) at different branches.

► Recursive
Employee------Employee. Employee works with another employee.


For a binary relationship set mapping should cardinality must be one of the following:
► One to One. Ex: Employee-Department.
► One to Many. Ex: Bank--------Employees.
► Many to One. Ex: Employee------Projects
► Many to Many. Ex: Bars serve different beers.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.