Entity relationship modelling

KS3 Computer Science

11-14 Years Old

48 modules covering EVERY Computer Science topic needed for KS3 level.

GCSE Computer Science

14-16 Years Old

45 modules covering EVERY Computer Science topic needed for GCSE level.

A-Level Computer Science

16-18 Years Old

66 modules covering EVERY Computer Science topic needed for A-Level.

GCSE Introduction to Databases (14-16 years)

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module

A-Level Relational Databases (16-18 years)

  • An editable PowerPoint lesson presentation
  • Editable revision handouts
  • A glossary which covers the key terminologies of the module
  • Topic mindmaps for visualising the key concepts
  • Printable flashcards to help students engage active recall and confidence-based repetition
  • A quiz with accompanying answer key to test knowledge and understanding of the module

Introduction

An E-R model is regularly the outcome of exact rating to explain and depict what is main to measures in a domain of work. It doesn’t draw the work measures; it just presents a work data design in geometrical shape an ER model can besides be imparted in an abuse structure, for example: one structure may be remote into at any rate zero townhouses, anyway one space must be managed in one structure.

Components may be depicted by associations, yet likewise by additional properties (credits), which join identifiers called “fundamental keys”. Diagrams made to address attributes similarly as components and associations may be called component trademark relationship graphs, instead of substance relationship models.

An ER model is customarily executed as a database. In a fundamental social database use, every section of a table addresses one event of a component type, and each field in a table addresses a property type. In a social database, an association between components is completed by taking care of the basic key of one component as a pointer or “new key” in the table of another component.

There is a show for ER/data models to be worked at a couple of degrees of consideration. Note that the applied reasonable physical reformist framework underneath is used in various kinds of specific, and is extraordinarily comparable to the three outline approach to manage programming planning.

What is ER Modeling

Substance Relationship Model (ER Modeling) is a geometrical method to manage database arrangement. It is a raised level data dummy that portrays data parts and their connection for a preplanned programming structure. An ER dummy is used to address authentic things.

An Entity is a thing or thing in reality that is conspicuous from the common atmosphere. For example, each delegate of affiliation is an alternate component. Following are some of the huge credits of components.

  • A component has a ton of properties
  • Element properties can have values

An element relationship graph depicts how elements identify with one another. In basic terms, it’s an image or a system of your business or a specific business measure. (Become familiar with business measure demonstrating).

A substance relationship outline gives a preview of how these elements identify with one another. You could consider it the outline that supports your business engineering, offering a visual portrayal of the connections between various arrangements of information (elements).

In the chart, elements are spoken to by boxes with lines connecting them to different ascribes, which portray the substance’s characteristics or qualities.

All that connections up as indicated by the connections between the substances – or how they cooperate with one another. Connections are once in a while alluded to as cardinalities, which depicts the corporation’s mathematically – yet we should basically call them connections.

Definition

The entity relationship model (ERM) is a computational model that describes the knowledge shape of a difficulty domain in terms of system and connections. As an object interaction diagram (ERD), the consequence of modelling using the ERM is graphically depicted. Thus, the computational form of a problem domain being modelled is expressed by an ERD. In database architecture and systems analysis, ERDs are commonly used to catch device or problem domain specifications. In specific, the ERD aids the archive builder in defining both the data and the instructions that are interpreted and used in an archive as utilized for data modelling. ERDs are quickly converted into schemas for relational databases.

Example:

An association representative is a substance. On the off chance that Peter is a Microsoft developer (a worker), he may have credits (properties, for example, name, age, weight, tallness, and so on. Obviously, they hold esteems that are applicable to them.

Qualities can be given for each worth. A solitary characteristic makes them mean in many occurrences. In any case, for properties of a few qualities, it’s additionally conceivable. First off, Peter’s age has a solitary definition. Yet, his property “telephone numbers” can have a few qualities. Substances can have collaborations with one another. Let’s think about the easiest model. Accept that each Microsoft Programmer is given a Computer. It is evident that Peter’s PC is as yet a substance. Dwindle utilizes that PC, and Peter utilizes a similar PC. As it were, among Peter and his PC, there is a shared relationship.

We model elements, their characteristics, and connections between substances in Entity Relationship Modeling.

Enhanced Entity Relationship (EER) Model

Improved Entity Relationship (EER) Model is a raised level data model which offers increases to the novel Entity Relationship (ER) model. EER Models supports more nuanced plans. EER Modeling rose as a response for showing significantly complex databases.

EER uses UML documentation. UML is the contraction for Unified Modeling Language; it is a comprehensively valuable showing language used when arranging object-arranged systems. Components are addressed as class traces. Associations are addressed as connections between components. The layout shown underneath shows an ER graph using the UML documentation.

Entity relationship modelling: EER Model.

Objective of ER Modelling

Directly you may think why use ER showing when we can fundamentally make the database and the aggregate of its things without ER illustrating? One of the troubles went up against when arranging a database is the way that originators, architects, and end-customers will all in all view data and its usage in an unforeseen manner. If this condition is left unchecked, we can end up making a database system that doesn’t meet the necessities of the customers.

Particular contraptions fathomed by all partners (specialized similarly as non-specific customers) are fundamental in making database structures that meet the requirements of the customers. Trauma center models are cases of such contraptions.

Trauma center outlines in like manner increase customer proficiency as they can be easily changed over into social tables.

Logical examination: ER graph for “MyFlix” Video Library We should now work with the MyFlix Video Library database structure to help understand the possibility of ER diagrams. We will use this database for all hand-on in the remainder of this instructional exercise

MyFlix is a business substance that rents out movies to its people. MyFlix has been taking care of its records truly. The organization by and by requirements to move to a DBMS

Let ‘s take a gander at the means for this information base to build up the EER graph:

  • Identify the substances and decide the connections that exist among them
  • Each substance, trademark, and relationship should have appropriate names that can likewise be promptly perceived by non-specialized people
  • Relationships ought not be legitimately associated with each other. Elements can be connected by associations
  • In a given element, each characteristic ought to have a special name.

Entities in the “MyFlix” library

In our ER diagram, the entities to be included are:

  • The Members:
    • It will carry member details for this organization
  • Films:
    • This entity will hold movie information
  • The categories:
    • This body would carry knowledge that positions films in various types, such as “Drama,” “Action,” and “Epic,” etc.
  • Rentals for Movies:
    • This body would retain details for films rented out to members.
  • Payments:
    • This body would maintain records about the payments received by the members.

Explanation the relationships among these Entities

The Representatives and Films

As regards the relations between the two bodies, the following holds true.

  • During a given time, a member can rent more than 1 video.
  • In a particular period, more than one member can rent a movie.

We will see from the above example that the essence of the partnership is multiple-to-many. Many-to-many partnerships are not supported by relational databases. We need to add an individual at the intersection. This is the role played by the company Movie Rentals. It has a one-to-many tie to the table of participants and another one-to-many tie to the table of films.

Entities for Movies and Categories

About movies and categories, the following is true.

  • A film should only belong to a genre, but there can be more than one film in a genre.

We can conclude from this that the essence of the relationship between the table of categories and films is one-to-many.

Members and Corporations with Fees

The above refers to members and fees.

  • A member may have only one account but can make a multitude of payments.

From this, we can conclude that the essence of the link between members and payment institutions is one-to-many.

Simple Diagram in ER Modelling

We have two student and college organizations and their relationships in the following diagram. As a college may have several students, the connection between student and college is many to one, but a student cannot study at the same time in many colleges. The student entity has characteristics such as Stu-Id, Stu-Name & Stu-Addr and the college entity has characteristics such as Col-ID & Col-Name. In an E-R diagram, here are the geometric forms and their meaning.

Entity relationship modelling Image 1

Here:

  • Rectangles are representing the Entity sets
  • Ellipse are representing the Attributes
  • Diamonds are representing the Relationship Set
  • Lines are representing that they link features to Entity Sets and Entity sets to connections Set
  • Double Ellipse are representing the Multivalued features
  • Dashed Ellipse are representing the Derived features
  • Double Rectangle are representing the Weak Entity Sets
  • Double Lines are representing the Total involvement of an entity in a connection set

Components of a ER Diagram

As we see in the upper diagram, there are three main components of ER Modelling:

Entity relationship modelling Image 2

Entity

An individual is an information item or segment. An item in an ER chart is spoken to as a square shape.

For example: We have two understudy and school elements in the accompanying ER graph and these two components have many to one connection to the same digit of the understudy’s investigation in a solitary school. We’ll learn more about associations later, focusing on associations for the occasion.

Entity relationship modelling Image 3

Weak Entity:

A powerless element is a substance that can’t be interestingly characterized with its own attributes and relies upon a relationship with another element. A twofold square shape speaks to the weak element. For eg, without understanding the bank to which the record has a place, a ledger may not be interestingly characterized, so a feeble substance is a financial balance.

Entity relationship modelling Image 4

Attributes

An attribute defines an entity’s property. In the ER diagram, an attribute is represented as an oval. Four types of features are available:

  1. Key attribute
  2. Composite attribute
  3. Multivalued attribute
  4. Derived attribute

Key Attribute:

From an article bundle, a key property may extraordinarily characterize an item. Understudy move numbers, for instance, will extraordinarily accept an understudy from a gathering of replacement. The key trait is talked to by similar oval as various credits, aside from the key property text is featured.

Composite Attribute:

A trait is characterized as a composite characteristic, which is a blend of different ascribes. For eg, the understudy address is a composite trait in an understudy substance as a place is composed of various ascribes, for example, pin code, state, nation.

Multivalued Attribute:

Multivalued credits are known as properties that can hold various qualities. It is talked about in an ER Diagram with twofold ovals. A single can have more than one telephone number, for example, with the goal that the characteristic of the telephone number is multivalued.

Derived Attribute:

A reason quality is one that has a powerful worth and is gotten from an alternate trait. In an ER Diagram, it is spoken to by run ovals. Individual age, for instance, is an inferred property as it alters after some time and can be gotten from another (Date of Birth) characteristic.

E-R graph with multivalued and inferred credits

Entity relationship modelling Image 5

Relationship:

In the ER graph, a relationship is spoken to by a precious stone shape, which shows the connection between elements. Four types of organizations exist:

  1. One to One
  2. One to Many
  3. Many to One
  4. Many to Many

One to One:

In the event that a solitary occasion of material is associated with a lonely incident of another element, so the affiliation is viewed as balanced. An individual, for instance, has just a single identification and one element is given a visa.

Entity relationship modelling Image 6

One to Many:

On the off chance that a solitary occasion of an element is associated with more than one example of another substance, so it is viewed as a connection among one and many. For instance, numerous requests can be put by a customer, yet numerous clients can’t put in a request.

Entity relationship modelling Image 7

Many to One:

On the off chance that a solitary occurrence of another substance is connected with more than one occasion of an element, at that point, many are alluded to as one affiliation. For example, numerous understudies can learn at a solitary school, and yet, an understudy can’t learn at numerous universities.

Entity relationship modelling Image 8

Many to Many:

In the event that more than one case of an element is associated with more than one case of another substance, it is viewed as a connection among numerous and many. First off, an undertaking can be appointed to a few tasks, and numerous understudies can dole out a venture.

Entity relationship modelling Image 9

Total Elements of an Entity set:

A The total consideration of the arrangement of substances implies that every element in the arrangement of elements must-have in any event one relationship inside the arrangement of connections. First of all, every school must have at any rate one related understudy in the graph underneath.

Entity relationship modelling Image 10

Creating a database in ER Modelling

It is simple to create a relational database when everything has been described, as follows:

  • Each entity type can be directly mapped to a relationship (the ‘database table’)
  • Attributes can be directly mapped to each attribute type (“columns” in the database table)
  • It is possible to map attributes directly to attributes (‘columns’ in the database table).

Limitations in ER Modelling

An ER model depicts the relations between elements. It is adjusted to speak to social information. Information that can only with significant effort be placed into this structure ought not to be demonstrated with an ER model. Trauma center is pointed toward planning an information base without any preparation; utilizing it to depict and change a data set that as of now exists might be harder to do.

Indeed, even where it is appropriate on a basic level, ER demonstrating is once in a while utilized as a different movement. One explanation behind this is there are numerous apparatuses that permit charting and that have other plans to uphold legitimately on social information base administration frameworks. These instruments can extricate information base graphs that are near ER outlines from existing data sets, and they give elective perspectives on the data contained in such charts.

In a study, Brodie and Liu couldn’t locate a solitary example of substance relationships demonstrated inside an example of ten Fortune 100 organizations. Badia and Lemire accuse this absence of utilization of the absence of direction yet additionally on the absence of advantages, for example, absence of help for information reconciliation.

Advantage and Disadvantage of ER Model

The ER model is a conceptual reflection of knowledge about an organization. The ER model is a diagrammatic representation of the database’s functional structure.

The ER model represents an entity-attribute relationship.

First of all, Peter Chen created the ER diagram in 1976.

Advantage:

  • Reasonably it is basic: ER model is extremely straightforward since, supposing that we know connection among substances and traits, at that point we can undoubtedly draw an ER graph.
  • Better visual portrayal: ER model is a diagrammatic portrayal of any legitimate structure of information base. By observing ER outline, we can undoubtedly comprehend relationship among elements and relationship.
  • Viable specialized device: It is a powerful specialized instrument for information base planner
  • Profoundly coordinated with social model: ER model can be handedly changed over into social model by essentially changing over ER model into tables.
  • Simple change to any information model: ER model can be handily changed over into another information model like progressive information model, network information model, etc.
  • Conceptual simplicity
  • Representation of visuals
  • Efficient correspondence
  • Integration with the model of a relational database

Disadvantage:

  • Restricted limitations and particular
  • Loss of data content: Some data be lost or covered up in ER model
  • Restricted relationship portrayal: ER model speaks to restricted relationships when contrasted with other information models like social models and so forth.
  • No portrayal of information control: It is hard to show information control in ER models.
  • Mainstream for significant level plan: ER model is exceptionally famous for planning elevated level plan
  • No industry standard for documentation
  • Representation of minimal restriction
  •  No representation for partnerships
  • No data manipulation representation
  • Loss of data

Uses of entity relationship diagrams

Data set plan: ER outlines are utilized to demonstrate and plan social data sets, regarding the rationale and business rules (in a sensible information model) and as far as the particular innovation to be executed (in a physical information model.) In programming designing, an ER graph is frequently an underlying advance in deciding necessities for a data frameworks venture. It’s likewise later used to display a specific information base or information bases. A social information base has a proportionate social table and can possibly be communicated that path varyingly.

Information base investigating: ER outlines are utilized to examine existing information bases to discover and resolve issues in rationale or organization. Drawing the outline ought to uncover where it’s turning out badly.

Business data frameworks: The charts are utilized to plan or dissect social information bases utilized in business measures. Any business cycle that utilizes handled information including elements, activities and interchange can conceivably profit from a social information base. It can smooth out cycles, reveal data all the more effectively and improve results.

Business measure re-designing (BPR): ER outlines help in dissecting information bases utilized in business measure re-designing and in displaying another data set arrangement.

Training: Databases are the present strategy for putting away social data for instructive purposes and later recovery, so ER Diagrams can be important in arranging those information structures.

Examination: Since so much exploration centers around organized information, ER charts can assume a key part in setting up helpful information bases to dissect the information.

Summary:

  • The full type of ER is Entity and Relationships Diagrams. They assume a significant part in the information base planning measure. They fill in as a non specialized instrument for specialized and non-specialized individuals.
  • Substances speak to true things; they can be applied as a business request or physical, for example, a client.
  • All substances must be given exceptional names.
  • Trauma center models additionally permit the information base originators to recognize and characterize the relations that exist among substances.
  • The whole ER Model is joined underneath. You can essentially import it in MySQL Workbench

References:

  1. Batini C., Ceri S., and Navathe S.B. Conceptual Database Design: An Entity-Relationship Approach. Benjamin/Cummings, Reading, MA, 1991.
  2. Chen P.P. The entity relationship model – toward a unified view of data. ACM Trans. Database Sys., 1(1):9–36, 1976.
  3. https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model
  4. https://www.guru99.com/er-modeling.html
  5. https://beginnersbook.com/2015/04/e-r-model-in-dbms/
  6. https://link.springer.com/referenceworkentry/10.1007%2F978-0-387-39940-9_148
  7. https://www.lucidchart.com/pages/er-diagrams
  8. https://facts.kiddle.co/Entity-relationship_model
  9. https://pctechnicalpro.blogspot.com/2017/04/advantages-disadvantages-er-model-dbms.html