Monday, April 6, 2015

ENTITY RELATIONSHIP

¡A relationship: Is connection between entity classes.
lE.g. PERSONS AND AUTOMOBILES
lPEOPLE OWNS AUTOMOBILES.
¡TYPES OF RELATIONSHIPS
lONE-ONE RELATIONSHIP
lONE-MANY ___,,_____
lMANY-MANY ___,,____



¡ONE – ONE
lFor each entity instance in parent entity class there is at most one associated entity instance in the dependent entity class.
¡E.g In Christian marriage: each husband there is at most one current legal wife. A wife has at most one current legal husband.
¡ONE – MANY
lOne entity instance in parent entity class is associated with zero or more entity instances in the dependent class, but each entity instance in the dependent entity class is associated with at most entity instance in parent entity class.
E.g Mother may have many children but child has only one birth mother.


¡MANY – many
lThere are no restrictions on how many entity instances in either entity class are associated with a single entity instance in the other table.
¡E.g students and Courses

3. LOGICAL DATA MODEL
¡To build the logical data model you need entities and data items identified in the requirements, then determine if there are any relationships between the entities.
¡
¡Entity Relationship diagram contains:
1.Boxes for entities
2.Circles for Relationship types.
3.Lines for Relationships between entities, beginning with the parent Entity
l---------- is optional relationship
l________ is required relationship
ENTITY RELATIONSHIP DIAGRAM


¡ONE – TO – ONE
lRelationship is single valued in both directions.
¡ONE – TO – MANY
lRelationship is multi-valued in one direction – one row in the parent table is associated with many rows in the dependent table.
¡MANY – TO – MANY
lRelationship is multi-valued in one direction – one in the dependent table is associated with many rows in the parent table.
¡MANY- TO – MANY
lRelationships are multi-valued in both directions.
Note: Entities that o not relate to another entity may result in “stand alone” table with no relationships defined.

¡One to one Relationship
lManager manages one department; a department has only one manager.

make love

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment

 
biz.