0% found this document useful (0 votes)
110 views

Conceptual Database Design - Entity Relationship (ER) Modeling

ER modeling is a technique for conceptual database design that uses entity-relationship diagrams to represent relationships between entities. The document defines key concepts in ER modeling including entities, attributes, relationships, cardinality, and participation. It also discusses advantages like being intuitive and helping with physical database design, and disadvantages such as potential ambiguities in the derived physical design.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

Conceptual Database Design - Entity Relationship (ER) Modeling

ER modeling is a technique for conceptual database design that uses entity-relationship diagrams to represent relationships between entities. The document defines key concepts in ER modeling including entities, attributes, relationships, cardinality, and participation. It also discusses advantages like being intuitive and helping with physical database design, and disadvantages such as potential ambiguities in the derived physical design.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

ConceptualDatabaseDesignEntityRelationship(ER)Modeling

DatabaseDesignTechniques

1.ERModeling(TopdownApproach)

2.Normalization(BottomUpapproach)

WhatisERModeling?

Agraphicaltechniqueforunderstandingandorganizingthedataindependentofthe
actualdatabaseimplementation

Weneedtobefamiliarwiththefollowingtermstogofurther.

Entity

Anythingthathasanindependentexistenceandaboutwhichwecollectdata.Itisalso
knownasentitytype.

InERmodeling,notationforentityisgivenbelow.

Entityinstance

Entityinstanceisaparticularmemberoftheentitytype.

Exampleforentityinstance:Aparticularemployee

RegularEntity

Anentitywhichhasitsownkeyattributeisaregularentity.

Exampleforregularentity:Employee.

Weakentity

Anentitywhichdependsonotherentityforitsexistenceanddoesn'thaveanykey
attributeofitsownisaweakentity.

Exampleforaweakentity:Inaparent/childrelationship,aparentisconsideredasa
strongentityandthechildisaweakentity.

InERmodeling,notationforweakentityisgivenbelow.

http://www.careerbless.com/db/rdbms/c1/design.php 1/8
6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

Attributes

Properties/characteristicswhichdescribeentitiesarecalledattributes.

InERmodeling,notationforattributeisgivenbelow.

DomainofAttributes

Thesetofpossiblevaluesthatanattributecantakeiscalledthedomainoftheattribute.
Forexample,theattributedaymaytakeanyvaluefromtheset{Monday,Tuesday...
Friday}.Hencethissetcanbetermedasthedomainoftheattributeday.

Keyattribute

Theattribute(orcombinationofattributes)whichisuniqueforeveryentityinstanceis
calledkeyattribute.

E.gtheemployee_idofanemployee,pan_card_numberofapersonetc.Ifthekeyattribute
consistsoftwoormoreattributesincombination,itiscalledacompositekey.

InERmodeling,notationforkeyattributeisgivenbelow.

Simpleattribute

Ifanattributecannotbedividedintosimplercomponents,itisasimpleattribute.

Exampleforsimpleattribute:employee_idofanemployee.

Compositeattribute

Ifanattributecanbesplitintocomponents,itiscalledacompositeattribute.

Exampleforcompositeattribute:Nameoftheemployeewhichcanbesplitinto
First_name,Middle_name,andLast_name.

SinglevaluedAttributes

http://www.careerbless.com/db/rdbms/c1/design.php 2/8
6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

Ifanattributecantakeonlyasinglevalueforeachentityinstance,itisasinglevalued
attribute.

exampleforsinglevaluedattribute:ageofastudent.Itcantakeonlyonevaluefora
particularstudent.

MultivaluedAttributes

Ifanattributecantakemorethanonevalueforeachentityinstance,itisamultivalued
attribute.Multivalued

exampleformultivaluedattribute:telephonenumberofanemployee,aparticular
employeemayhavemultipletelephonenumbers.

InERmodeling,notationformultivaluedattributeisgivenbelow.

StoredAttribute

Anattributewhichneedtobestoredpermanentlyisastoredattribute

Exampleforstoredattribute:nameofastudent

DerivedAttribute

Anattributewhichcanbecalculatedorderivedbasedonotherattributesisaderived
attribute.

Exampleforderivedattribute:ageofemployeewhichcanbecalculatedfromdateofbirth
andcurrentdate.

InERmodeling,notationforderivedattributeisgivenbelow.

Relationships

Associationsbetweenentitiesarecalledrelationships

Example:Anemployeeworksforanorganization.Here"worksfor"isarelationbetween
theentitiesemployeeandorganization.

InERmodeling,notationforrelationshipisgivenbelow.

http://www.careerbless.com/db/rdbms/c1/design.php 3/8
6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

HoweverinERModeling,ToconnectaweakEntitywithothers,youshoulduseaweak
relationshipnotationasgivenbelow

DegreeofaRelationship

Degreeofarelationshipisthenumberofentitytypesinvolved.Thenaryrelationshipis
thegeneralformfordegreen.Specialcasesareunary,binary,andternary,wherethe
degreeis1,2,and3,respectively.

Exampleforunaryrelationship:Anemployeeiaamanagerofanotheremployee

Exampleforbinaryrelationship:Anemployeeworksfordepartment.

Exampleforternaryrelationship:customerpurchaseitemfromashopkeeper

CardinalityofaRelationship

Relationshipcardinalitiesspecifyhowmanyofeachentitytypeisallowed.Relationships
canhavefourpossibleconnectivitiesasgivenbelow.

1.Onetoone(1:1)relationship

2.Onetomany(1:N)relationship

3.Manytoone(M:1)relationship

4.Manytomany(M:N)relationship

http://www.careerbless.com/db/rdbms/c1/design.php 4/8
6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

Theminimumandmaximumvaluesofthisconnectivityiscalledthecardinalityofthe
relationship

ExampleforCardinalityOnetoOne(1:1)

Employeeisassignedwithaparkingspace.

Oneemployeeisassignedwithonlyoneparkingspaceandoneparkingspaceisassigned
toonlyoneemployee.Henceitisa1:1relationshipandcardinalityisOneToOne(1:1)

InERmodeling,thiscanbementionedusingnotationsasgivenbelow

ExampleforCardinalityOnetoMany(1:N)

Organizationhasemployees

http://www.careerbless.com/db/rdbms/c1/design.php 5/8
6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

Oneorganizationcanhavemanyemployees,butoneemployeeworksinonlyone
organization.Henceitisa1:NrelationshipandcardinalityisOneToMany(1:N)

InERmodeling,thiscanbementionedusingnotationsasgivenbelow

ExampleforCardinalityManytoOne(M:1)

ItisthereverseoftheOnetoManyrelationship.employeeworksinorganization

OneemployeeworksinonlyoneorganizationButoneorganizationcanhavemany
employees.HenceitisaM:1relationshipandcardinalityisManytoOne(M:1)

http://www.careerbless.com/db/rdbms/c1/design.php 6/8
6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

InERmodeling,thiscanbementionedusingnotationsasgivenbelow.

CardinalityManytoMany(M:N)

Studentsenrollsforcourses

Onestudentcanenrollformanycoursesandonecoursecanbeenrolledbymanystudents.
HenceitisaM:NrelationshipandcardinalityisManytoMany(M:N)

InERmodeling,thiscanbementionedusingnotationsasgivenbelow

RelationshipParticipation

1.Total

Intotalparticipation,everyentityinstancewillbeconnectedthroughtherelationshipto
anotherinstanceoftheotherparticipatingentitytypes

2.Partial

Exampleforrelationshipparticipation

ConsidertherelationshipEmployeeisheadofthedepartment.

http://www.careerbless.com/db/rdbms/c1/design.php 7/8
6/4/2017 ConceptualDatabaseDesignEntityRelationship(ER)Modeling

Hereallemployeeswillnotbetheheadofthedepartment.Onlyoneemployeewillbethe
headofthedepartment.Inotherwords,onlyfewinstancesofemployeeentityparticipate
intheaboverelationship.Soemployeeentity'sparticipationispartialinthesaid
relationship.

Howevereachdepartmentwillbeheadedbysomeemployee.Sodepartmententity's
participationistotalinthesaidrelationship.

AdvantagesandDisadvantagesofERModeling(MeritsandDemeritsofER
Modeling)

Advantages

1.ERModelingissimpleandeasilyunderstandable.Itisrepresentedinbusinessusers
languageanditcanbeunderstoodbynontechnicalspecialist.

2.IntuitiveandhelpsinPhysicalDatabasecreation.

3.Canbegeneralizedandspecializedbasedonneeds.

4.Canhelpindatabasedesign.

5.Givesahigherleveldescriptionofthesystem.

Disadvantages

1.PhysicaldesignderivedfromERModelmayhavesomeamountofambiguitiesor
inconsistency.

2.Sometimediagramsmayleadtomisinterpretations

http://www.careerbless.com/db/rdbms/c1/design.php 8/8

You might also like