(DBMS_2) ER Model

Entity Relationship model

Why?

  1. It provides a preview of how all your tables should connect and what filed are going to be on each table.
  2. It helps to describe entities, attributes, relationships

How?

example of Entity Relationship Diagram:

https://www.guru99.com/er-diagram-tutorial-dbms.html

Real World Example:

https://www.guru99.com/er-diagram-tutorial-dbms.html
  1. Entity: Anything in real world

> weak entity means anything existing because an entity exists; for example, a car belongs to CEO in a company. If the CEO leaves a company, then this CEO car should also be eliminate from database.

2. Relation: define the relationship between entities

3. Attribute: the characteristic of entity

4. Cardinality: define the type of relationship: One-to-One, One-to-Many, May to One, Many-to-Many

What?

https://www.guru99.com/er-diagram-tutorial-dbms.html

With following example:

In a market, there are a lot of people, both buyers and sellers, sellers has a lots of goods and buyers use money to buy them. Of course, the buyer can also sell what they bought. Then, the design should be as follow:

Step1: Define Entities:

Step2: Define Relationship

Step3: Cardinality

Step4: Identify Atrributes

Reference