0% found this document useful (0 votes)
33 views2 pages

DB Relations

There are different types of database relations including one-to-one, one-to-many (or many-to-one), many-to-many, and polymorphic. A user can like both comments and posts, so a "Like" can have multiple parent types. The document provides links about database relationships and the entity-relationship model.

Uploaded by

Sandeep Dwivedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

DB Relations

There are different types of database relations including one-to-one, one-to-many (or many-to-one), many-to-many, and polymorphic. A user can like both comments and posts, so a "Like" can have multiple parent types. The document provides links about database relationships and the entity-relationship model.

Uploaded by

Sandeep Dwivedi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Lecture 11: Database Relations

Let’s look at the different types of DB relations.


(irrespective of SQL or NoSQL databases, all these can be established)

One to One

One to Many OR Many to One


Many to Many

Polymorphic

(The small thing to notice here is that a user can like a comment also and a post also, so, a
‘Like’ can have multiple types of parents

Some good links to read!


- https://database.guide/the-3-types-of-relationships-in-database-design/
- https://code.tutsplus.com/articles/sql-for-beginners-part-3-database-relationships--net-
8561
- https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy