Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JOINs piece to relational databases section #470

Merged
merged 29 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
97274a4
add joins piece and images
grpatel Apr 25, 2024
c90c135
Optimised images with calibre/image-actions
github-actions[bot] Apr 25, 2024
1c16e1e
Add JOINs piece to index.mdx
grpatel Apr 25, 2024
e676d1c
Update authors.json
grpatel Apr 25, 2024
7260193
Update authors.json
grpatel Apr 25, 2024
568b378
add author to piece
grpatel Apr 25, 2024
7202fd7
Apply suggestions from code review
grpatel Apr 25, 2024
424f13c
Apply suggestions from Niko's code review
grpatel Apr 26, 2024
58530b6
Remove line breaks
grpatel Apr 26, 2024
80f3651
Fix code snippet under lateral joins
grpatel Apr 26, 2024
cf5ac0e
image resizing and change index name
grpatel Apr 26, 2024
7ffe9d4
Optimised images with calibre/image-actions
github-actions[bot] Apr 26, 2024
6409e19
update table properties image
grpatel Apr 26, 2024
4a86732
Merge branch 'dataguide' of https://github.com/prisma/dataguide into …
grpatel Apr 26, 2024
ee5f016
Optimised images with calibre/image-actions
github-actions[bot] Apr 26, 2024
2a399ee
Add backticks to joins headings
grpatel Apr 26, 2024
6c4d437
Explain join syntax in a bulleted list
grpatel Apr 26, 2024
f7f73ef
enlarge relationship betw tables image I hope
grpatel Apr 26, 2024
74f4756
Update heading to types of joins
grpatel Apr 26, 2024
218ae50
remove brackets from inner join query
grpatel Apr 26, 2024
4bd10bb
define anti-join
grpatel Apr 26, 2024
7260f3c
Turn postgres definition into quote and move note to bottom of latera…
grpatel Apr 26, 2024
2433152
update sql queries under relations section
grpatel Apr 26, 2024
7ab8e61
Update explanation about redundancy for one-to-many relation
grpatel Apr 26, 2024
d79092a
emphasize that primary key is not always used
grpatel Apr 26, 2024
2ff2391
Update sql schemas
grpatel Apr 26, 2024
7184537
show query for result set
grpatel Apr 26, 2024
3ae03ed
remove quote from sql schema
grpatel Apr 26, 2024
09ba455
add crosslinks
grpatel Apr 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions authors.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,10 @@
"name": "Dian Fay",
"avatar": "/authors/dmfay.jpg",
"bio": "Dian didn't exactly plan to drop out of college to specialize in SQL and backend development, but that’s how it happened. Fifteen years later, she's designed databases supporting everything from industrial logistics and traceability systems to million-plus user social media games. She is the current maintainer of MassiveJS, an open source data mapper for Node.js focused on using PostgreSQL to the fullest."
},
"grishmapatel": {
"name": "Grishma Patel",
"avatar": "https://github.com/grpatel.png",
"bio": "Grishma is a recent Computer Science graduate and worked as a Developer Advocate intern at Prisma."
}
}
408 changes: 408 additions & 0 deletions content/03-types/02-relational/07-what-are-joins-in-sql.mdx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors: ['justinellingwood']

Splitting related data into separate tables can be beneficial from the standpoint of consistency, flexibility, and certain types of performance. However, you still need a reasonable way of reintegrating records when the relevant information spans multiple tables.

In relational databases, _joins_ offer a way to combine the records in two or more tables based on common field values. Different types of joins can achieve different results depending on how unmatched rows should be handled. In this guide, we'll discuss the various types of joins that PostgreSQL offers and how you can use them to combine table data from multiple sources.
In relational databases, [_joins_](/types/relational/what-are-joins-in-sql) offer a way to combine the records in two or more tables based on common field values. Different types of joins can achieve different results depending on how unmatched rows should be handled. In this guide, we'll discuss the various types of joins that PostgreSQL offers and how you can use them to combine table data from multiple sources.

## What are joins?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors: ['justinellingwood']

Though it's often useful to separate data into discrete tables for performance and consistency purposes, you often need to consult data from multiple tables to answer certain requests. _Joining_ tables is a way of combining the data from various tables by matching each record based on common field values.

There are a few different types of joins, which offer various ways of combining table records. In this article, we'll cover how MySQL implements joins and discuss the scenarios in which each is most useful.
There are a few different types of [joins](/types/relational/what-are-joins-in-sql), which offer various ways of combining table records. In this article, we'll cover how MySQL implements joins and discuss the scenarios in which each is most useful.

## What are joins?

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
654 changes: 540 additions & 114 deletions content/index.mdx

Large diffs are not rendered by default.

Loading