Tuesday, 27 January 2015

ER Diagram Symbols and Meaning

  1. An entity–relationship model (ER model) is a data model for describing the data or information aspects of a business domain or its process requirements, in an abstract way that lends itself to ultimately being implemented in a database such as a relational database. The main components of ER models are entities (things) and the relationships that can exist among them.








ENTITIES

Entities are objects or concepts that represent important data. They are typically nouns, e.g. customersupervisorlocation, or promotion.
                   
  • Strong entities exist independently from other entity types. They always possess one or more attributes that uniquely distinguish each occurrence of the entity.


  • Weak entities depend on some other entity type. They don't possess unique attributes (also known as a primary key) and have no meaning in the diagram without depending on another entity. This other entity is known as the owner.

  • Associative entities , the entity describes a connection between two entities with an otherwise many-to-many relationship, for example, a student can registers in many course and a course can have many student.





RELATIONSHIPS

  • Relationships are meaningful associations between or among entities. They are usually verbs, e.g. assignassociate, or track. A relationship provides useful information that could not be discerned with just the entity types.
  • Weak relationships, or identifying relationships, are connections that exist between a weak entity type and its owner.


ATTRIBUTES

  • An Attribute describes a property or characterstic of an entity. For example, Name, Age, Address etc can be attributes of a Student. An attribute is represented using eclipse.





Key Attribute

Key attribute represents the main characterstic of an Entity. It is used to represent Primary key. Ellipse with underlying lines represent Key Attribute




Composite Attribute

An attribute can also have their own attributes. These attributes are known as Composite attribute.



 Relationship:

A Relationship describes relations between entities. Relationship is represented using diamonds.




There are three types of relationship that exist between Entities.
  • Binary Relationship
  • Recursive Relationship
  • Ternary Relationship 

Binary Relationship

Binary Relationship means relation between two Entities. This is further divided into three types.
  1. One to One : This type of relationship is rarely seen in real world.

  2. one-to-one example

    The above example describes that one student can enroll only for one course and a course will also have only one Student. This is not what you will usually see in relationship.

  1. One to Many : It reflects business rule that one entity is associated with many number of same entity. For example, Student enrolls for only one Course but a Course can have many Students.

  2. one-to-many example

    The arrows in the diagram describes that one student can enroll for only one course
    .
  3. Many to Many :

  4. many-to-many example

    The above diagram represents that many students can enroll for more than one courses.

Recursive Relationship

When an Entity is related with itself it is known as Recursive Relationship.

recursive relationship example

Ternary Relationship

Relationship of degree three is called Ternary relationship.


2 comments:

  1. I like the way you start and then conclude your thoughts. Thanks for this nice information.

    Cassandra Training Courses

    ReplyDelete
  2. Good information, most importantly useful. I advise you in the future be used for the presentation takioy information. It is very convenient to see slide with description. This makes it easy perception of information. If you want, here is a good template for this http://www.pptstar.com/diagrams/. I hope it will be useful to you. Good luck.

    ReplyDelete