---
date: '2024-09-11'
description: database schema design using entity sets, attributes, relationships, and many-to-many or many-to-one relationship constraints.
id: Entity-Relationship Models
modified: 2026-06-05 15:08:42 GMT-04:00
tags:
  - sfwr3db3
title: Entity-Relationship Models
created: '2024-09-11'
published: '2024-09-11'
pageLayout: default
slug: thoughts/university/twenty-four-twenty-five/sfwr-3db3/Entity-Relationship-Models
permalink: https://aarnphm.xyz/thoughts/university/twenty-four-twenty-five/sfwr-3db3/Entity-Relationship-Models.md
generator:
  quartz: v4.6.0
  hostedProvider: Cloudflare
  baseUrl: aarnphm.xyz
full: https://aarnphm.xyz/llms-full.txt
---
## E/R model

> sketch databse schemas including constraints.

- Entity set = rectangle
- Attribute = oval, with a line to the rectangle (representing its entity set)

## relationship

- connects two or more entity sets.
- represented by a _diamonds_

value of a relationship is a **relationship set**

### many-to-many relationship

> an entity of either set can be connected to many entities of the other set.

### many-to-one relationship

> each entity of the first set can be connected to at most one entity of the second set.
> and each entity of the second set can be connected to at least one entity of the first set.

