Sei sulla pagina 1di 31

DEFINE

THE ENTITY IDENTIFY THE ENTITY TYPES AND SETS OF ENTITY EXPLAIN THE ATTRIBUTE AND A VALUE SET EXPLAIN E-R MODEL EXPLAIN THE FOLLOWING RELATIONSHIP TYPES IN E-R MODEL: 1:1(ONE TO ONE) 1:M(ONE TO MANY) M:N(MANY TO MANY) DRAW E-R MODEL BASED ON A GIVEN SITUATION

Entity

is an object of the real world which can store data and can be defined with clarity. Example : something that exist physically such as individual, place, article or something that exists conceptually such as an event or concept in a user environment.

ENTITY
invidual venue / place

EXAMPLE
Customer, Worker, Supplier District, State, Country

object
event concept

Stationary, Furniture
Purchase Order, Booking, Sale Project, Account, Unit

Recursive Entity -A recursive entity is one in which a relation can exist between occurrences of the same entity set. This occurs in a unary relationship.
Composite Entity -If a Many to Many relationship exist we must create a bridge entity to convert it into 1 to Many. Bridge entity composed of the primary keys of each of the entities to be connected. The bridge entity is known as a composite entity. A composite entity is represented by a diamond shape with in a rectangle in an ER Diagram.

Strong

Entity Type

Entity type that is not existence-dependent on some other entity type.

Weak

Entity Type

Entity type that is existence-dependent on some other entity type.

Entity Set An entity may be concrete such as a person, book etc or may be abstract such as account,loan etc. The ER model refers to a specific table row as an entity instance or entity occurrence. Collection of similar entities (Entity Set) often corresponds to a table. Each entity set has a key.All entities in an entity set have the same set of attributes. Thus entity set is a set of entities of the same type that share the same properties or attributes. An entity is represented by a rectangle containing the entity name, which is a noun usually written in capital letters.

description or an entity characteristic is known as an attribute.


to differentiate object in an entity. symbol used to represent attribute is oval and connected to entities by lines

Used The

Simple

Attribute has only one component, exist independently and cannot be broken up. ( name or gender ) Attribute comprises of many components, each one existing independently.

Composite

address with sub attributes such as house_no, road_no, town, postcode)

Solitary

Valued Attribute is an attribute that consists of only a single value. (matric_no, ic_no )
Attribute is an attribute consisting of many values. ( telephone no) Attribute is an attribute where its values is derived from the value of related attributes or set of other attributes.( age
attribute derived from the date of birth )

Multi-Valued Derived

matricno

[ simple attribute]

studentname

gender houseno

STUDENT

dateofbirth road

[ composite attribute ]

address garden

phoneno postcode

specialty

[ multi-valued attribute]
[ derived attribute]

age

ONE TO ONE
TYPES IN ER MODEL ONE TO MANY MANY TO MANY

One to one 1 :1 This type of relationship takes place when a single occurrence of an entity is related to just one Occurrence of a second entity. For example, a ROOF covers one BUILDING; a BUILDING is covered by one ROOF.

One-to-many 1:M Relationships occur when each record in TableA may have many linked records in TableB but each record in TableB may have only one corresponding record in TableA.

EXAMPLE II In the one-to-many relationship a loan is associated with at most one customer via borrower, a customer is associated with several (including 0) loans via borrower

Many to many M: N Relationship where multiple rows from table A can correspond to multiple rows in table B. An example of such a relationship is a school where teachers teach students. In most schools each teacher can teach multiple students and each student can be taught by multiple teachers.

EXAMPLE II A customer is associated with several (possibly 0) loans via borrower A loan is associated with several (possibly 0) customers via borrower

The

relationship type order connects entities chemical and supplier. The relationship is many-to-many because each chemical can be from several suppliers and each supplier has a number of chemicals.

An

order has a purchase date, amount, and total cost as well as the chemical and supplier information. Thus, order has attributes PurchaseDate, amount, and TotalCost that we cannot appropriately associate with chemical or supplier.

Potrebbero piacerti anche