Entity Relationship Diagram2
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Entity Relationship Diagram2

  • 17,676 views
Uploaded on

This presentation was created by me for Database subject. it described the whole process of creating ERD i.e. entity relationship diagrams

This presentation was created by me for Database subject. it described the whole process of creating ERD i.e. entity relationship diagrams

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
  • thankss
    Are you sure you want to
    Your message goes here
  • tnx
    Are you sure you want to
    Your message goes here
  • 10x
    Are you sure you want to
    Your message goes here
No Downloads

Views

Total Views
17,676
On Slideshare
17,538
From Embeds
138
Number of Embeds
8

Actions

Shares
Downloads
742
Comments
3
Likes
5

Embeds 138

http://www.ustudy.in 60
http://www.slideshare.net 55
http://ustudy.in 11
https://blackboard.strayer.edu 5
http://theoracledbms.blogspot.com 3
http://twitter.com 2
http://203.144.133.44 1
http://www.slideee.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ENTITY RELATIONSHIP DIAGRAM BY MEER SADAF NAEEM
  • 2. Part-1 Understanding the Fundamentals
  • 3. BASIC CONCEPTS
  • 4. WHAT IS ENTITY?
    • Person
  • 5. WHAT IS ENTITY?
    • Place
  • 6. WHAT IS ENTITY?
    • Object
  • 7. WHAT IS ENTITY?
    • Event
  • 8. ATTRIBUTES Descriptive properties possessed by each member of an entity set. Student Name Address Class Roll number Percentage
  • 9. ENTITY SET/TYPE: Student A Student B Student C Student D ENTITY SET : STUDENT
    • Set of entities of the same type that share the same attributes.
  • 10. STUDENT A STUDENT B STUDENT C STUDENT D Mr. A Mr.D Mr. C Mr. B ENTITY SET : STUDENT ENTITY SET : TEACHER
  • 11. What is relationship?
    • Meaningful association among several entities.
  • 12. RELATIONSHIP SET/TYPE: A set of relationships of the same type.
  • 13. Student A Student C Student B Mr. C Mr. B Mr. A ENTITY SET : STUDENT ENTITY SET : TEACHER RELATIONSHIP SET : SUBJECT
  • 14. DEGREE OF RELATIONSHIP SET The number of entity sets that participate in a relationship set.
  • 15. Student A Student C Student B Mr. C Mr. B Mr. A ENTITY SET : STUDENT ENTITY SET : TEACHER RELATIONSHIP SET : SUBJECT
  • 16. TYPES OF ATTRIBUTES
    • Single and composite:
        • roll number is an example of single attribute as it can not be divided further.
        • Name can be divided further into 3 parts consisting of first name , middle name , last name so it is an example of composite attribute .
  • 17. TYPES OF ATTRIBUTES
    • Single valued and multivalued:
          • The attributes which have single value are single valued attributes such roll number.
          • The attributes which has a set of values are called multivalued attributes . Such as any student can have more than 1 telephone number .
  • 18. TYPES OF ATTRIBUTES
    • Derived attribute:
          • These attributes are derived from the existing attributes of entities.
          • The value of a derived attribute is not stored , but computed when required.
  • 19. Student Name Address Class Roll number Date-of-birth
  • 20. TYPES OF ATTRIBUTES
    • Descriptive attribute:
          • The attribute of the relationship is called descriptive attribute.
  • 21. Cardinality
    • One to many
    • Many to one
    • One to one
    • Many to many
    • It expresses the number of entities to which another entity can be associated via a relationship set.
  • 22. ONE TO MANY A B a1 a4 a2 a3 b4 b3 b2 b1
  • 23. MANY TO ONE A B b2 a1 a2 a5 b3 b2 b1 a3 a4
  • 24. ONE TO ONE A B a1 a2 a3 a4 b4 b3 b2 b1
  • 25. MANY TO MANY A B a1 a3 a2 b4 b3 b2 b1 a4
  • 26. ROLE
    • Not specified when entity sets that participate in a relationship set are distinct.
    • Clarification is needed only when the entity sets of a relationship set are not distinct.
    The function that an entity plays in a relationship is called that entity’s role.
  • 27. RECURSIVE RELATIONSHIP
    • When entities are self-linked then such a relationship is called a recursive relationship.
  • 28. TOTAL PARTICIPATION
    • The participation of an entity set E in a relationship set R is said to be TOTAL if every entity in E participates in at least one relationship in R.
  • 29. Student A Student C Student B Mr. C Mr. B Mr. A ENTITY SET : STUDENT ENTITY SET : TEACHER RELATIONSHIP SET : SUBJECT
  • 30. PARTIAL PARTICIPATION
    • The participation an entity set E in a relationship set R is said to be PARTIAL if only some entities in E participate in relationships in R.
  • 31. MR.A MR.C MR.D MR.B CALCULUS JAVA DBMS FACULTY COURSES RELATIONSHIP SET:COURSE
  • 32. Design issues
    • Example : should location be an entity or attribute?
    • Can a project be in more than one location?
    • Does location need to be described in more detail?
  • 33. Weak entity set
    • Existence of weak entity set depends on the existence of a strong entity set which is called the identifying entity set.
    • The relationship is always many-to-one from weak to identifying.
    • Participation of the weak entity set in the relationship must be total.
    An entity set that does not have sufficient attributes to form a primary key is referred to as a weak entity set.
  • 34. Part-2 Introducing to Identifiers
  • 35. Identifiers
    • Candidate Key
      • All available unique , required identifiers of an entity
    • Primary Key
      • A unique, required identifier of an entity
      • The best one of candidate keys
    • Foreign Key
      • A reference key to another entity
      • This key is the primary key of another entity
  • 36. Primary Key
    • Natural primary key:
    • A natural primary key is one that exists in the data itself.
    • Surrogate primary key:
    • The primary key that you have created where non existed before.
    • Primary key requires the consideration not just of the current data, but of possible future data as well.
  • 37. Why is it important to identify primary key?
    • The primary key is the main “Handle” that the database server uses to grab the information in which you are interested.
    • By identifying a primary key, you are telling the server which information you want to work with at the moment.
  • 38. Foreign Key
    • A primary key of one table that is included in another table.
    • Links the records in one database table to another table.
  • 39.