Home Web Development SQL Server Entity Relationship Model Tutorial in Urdu

Entity Relationship Model Tutorial in Urdu

13
1

Today I have shared very important knowledge about Entity Relationship Model. A data model is a group of conceptual tools that describes data, its relationships, and semantics. It also consists of the consistency constraints that the data adheres to. The Entity-Relationship, Relational, Network, and Hierarchical models are examples of data models. The development of every database begins with the basic step of analyzing its data in order to determine the data model that would best represent it. Once this step is completed, the data model is applied to the data.The process of applying an appropriate data model to the data, in order to organize and structure it, is called data modeling.

Entity Relationship Model

Entity Relationship Model Below Details Wise Guide

Data modeling can be broken down into three broad steps:

  • Conceptual Data Modeling

The data modeler identifies the highest level of relationships in the data.

  • Logical Data Modeling

The data modeler describes the data and its relationships in detail. The data modeler creates a logical model of the database.

  • Physical Data Modeling

The data modeler specifies how the logical model is to be realized physically.

The Entity-Relationship (E-R) model belongs to the first classification.  Data can be perceived as real world objects called entities and the relationships that exist between them. For example, in an organization, both employee and department are real world objects. An employee belongs to a department.

E-R model consists of five basic components as follows:

  • Entity

An entity is a real-world object that exists physically and is distinguishable from other objects. For example, employee, department, vehicle, and account.

  • Relationship

A relationship is an association or bond that exists between one or more entities.For example, belongs to, and owns, works for, saves in, and so on.

  • Attributes

Attributes are features that an entity has. Attributes help distinguish every entity from another.For example, the attributes of a student would be roll_number, name, and so on.

  • Entity Set

An entity set is the collection of similar entities. For example, the employees of an organization collectively form an entity set called employee entity set.

  • Relationship Set

A collection of similar relationships between two or more entity sets is called a relationship set. For example, the set of all ‘work in’ relations that exists between the employees and the department is called the ‘work in’ relationship set.

Relationships associate one or more entities and can be of three types as follows:

Self-relationships

  • Relationships between entities of the same entity set are called self-relationships.
  • For example, a team member works for the manager.
  • The relation, ‘works for’, exists between two different employee entities of the same employee entity set.

Binary Relationships

  • Relationships that exist between entities of two different entity sets are called binary relationships.
  • For example, an employee belongs to a department.
  • The employee entity belongs to an employee entity set. The department entity belongs to a department entity set.

Ternary Relationships

  • Relationships that exist between three entities of different entity sets are called ternary relationships.
  • For example, an employee works in the accounts department at the regional branch.
  • The relation, ‘works’ exists between all three, the employee, the department, and the location.

Relationships can also be classified as per mapping cardinalities as follows:

One-to-One

  • This kind of mapping exists when an entity of one entity set can be associated with only one entity of another set.
  • For example, every vehicle has a unique registration.
  • No two vehicles can have the same registration details.
  • The relation is one-to-one, that is, one vehicle-one registration.
  • The mapping cardinality can be seen in the following figure:

One-to-Many

  • This kind of mapping exists when an entity of one set can be associated with more than one entity of another entity set.
  • For example, a customer can have more than one vehicle.
  • Therefore, the mapping is a one to many mapping, that is, one customer – one or more vehicles.
  • The mapping cardinality can be seen in the following figure:

Many-to-One

  • This kind of mapping exists when many entities of one set is associated with an entity of another set.
  • This association is done irrespective of whether the latter entity is already associated with other or more entities of the former entity set.
  • For example, every vehicle has only one manufacturing company but the same company or coalition can manufacture more than one kind of vehicle.
  • The mapping can be seen in the following figure:

Many-to-Many

  • This kind of mapping exists when any number of entities of one set can be associated with any number of entities of the other entity set.
  • For example, a customer can have more than one account and an account can have more than one customer associated with it in case it is a joint account or similar.
  • Therefore, the mapping is many-to-many, that is, one or more customers associated with one or more accounts.
  • The mapping cardinality can be seen in the following figure:

Weak Entity Sets

  • Entity sets that do not have enough attributes to establish a primary key are called weak entity sets.

Strong Entity Sets

  • Entity sets that have enough attributes to establish a primary key are called strong entity sets.
  • Consider the scenario of an educational institution where at the end of each semester, students are required to complete and submit a set of assignments.
  • The teacher keeps track of the assignments submitted by the students.
  • An assignment and a student can be considered as two separate entities.
  • The assignment entity is described by the attributes assignment_number and subject.
  • The student entity is described by roll_number, name, and semester.
  • The assignment entities can be grouped to form an assignment entity set and the student entities can be grouped to form a student entity set.
  • The entity sets are associated by the relation ‘submitted by’.
  • The attributes, assignment_number, and subject, are not enough to identify an assignment entity uniquely.
  • The roll_number attribute alone is enough to uniquely identify any student entity. Therefore, roll_number is a primary key for the student entity set.
  • The assignment entity set is a weak entity set since it lacks a primary key.
  • The student entity set is a strong entity set due to the presence of the roll_number.

Above All of Entity Relationship Model details, basically, I have made a video tutorial about Entity Relationship Model for helpless I hope my video tutorial most beneficial for you. Below I have shared with three parts watch step by step.

Entity Relationship Model Tutorial in Urdu

After Watch my Video Tutorial about Entity Relationship Model and Read Complete Article, I hope you learn something new and I hope you like, kindly share with personal friends on social media networks and subscribe your email address for post updates. If you have any question/ suggestion about this topic to comment me or email me after received your comment or email I will reply with your answer about 24 hours. Thanks for the read and watch my video tutorial.

Subscribe My YouTube Channel For Get Updates 🙂

  • yar ap se bohut zruri bat kerni hy kisi trha rabta kro