Please enable JavaScript.
Coggle requires JavaScript to display documents.
Data Modelling (ER Diagram) - Coggle Diagram
Data Modelling (ER Diagram)
A. Key Elements
Entities
Attributes
Relationships
Cardinality
c. All other observation that makes the UML
Created in a database, which is a collection of information that is organized so that data can be easily stored, managed, updated, and retrieved.
Visual way to understand how the elements in a database work with each other
Complex and logical diagrams can be drawn using this method
Consist of PK (primary keys) and FK (foreign keys)
B. Notions and their significance
Entities
Object which is a person, place or thing to be tracked in a database.
Entities will be the rows in a database
EXAMPLE part 1
Online ordering system-entity will be customer, order, product
Attributes
Consists of various properties or traits in an entity
Attributes will be the columns in a database
EXAMPLE part 2 Attributes in the entity of a customer will be cust_id, first name, last name, street. Order will be order no, cust_id, customer name, street city state, zep, ship date.Product will be prod id, quantity and product type
Relationships
Describes how the entities will interact with each other
A line is drawn from one entity to another to show interactions or connection
EXAMPLE part 3 Relationship will be the straight line drawn from Customer to Order, then Order to Product
Cardinality
It has a notion attached to the relationship line to define numerical context, particularly with minimums and maximums.
Define by one (-|-), many ( -<- ), one (and only one): (-||-), zero or one (-o-|-), one or many (-|<-), zero or many (-o<-)
EXAMPLE Part 4
Cardinality will be defined from each entity to entity using the numerical context. Customer to Order- zero to many (customer can have zero order or many orders), Order to Customer - one and only one (an order will only belong to one customer), Order to Product-one or many (an order can have one product or an order can consist of many products) and Product to Order-zero to many (product can have zero orders or product can be on many orders)