Skip to content

Commit

Permalink
Add JOINs piece to relational databases section (#470)
Browse files Browse the repository at this point in the history
* add joins piece and images

* Optimised images with calibre/image-actions

* Add JOINs piece to index.mdx

* Update authors.json

* Update authors.json

* add author to piece

* Apply suggestions from code review

* Apply suggestions from Niko's code review

Co-authored-by: Nikolas <[email protected]>

* Remove line breaks

* Fix code snippet under lateral joins

* image resizing and change index name

* Optimised images with calibre/image-actions

* update table properties image

* Optimised images with calibre/image-actions

* Add backticks to joins headings

* Explain join syntax in a bulleted list

* enlarge relationship betw tables image I hope

* Update heading to types of joins

* remove brackets from inner join query

* define anti-join

* Turn postgres definition into quote and move note to bottom of lateral joins

* update sql queries under relations section

* Update explanation about redundancy for one-to-many relation

* emphasize that primary key is not always used

* Update sql schemas

* show query for result set

* remove quote from sql schema

* add crosslinks

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nikolas <[email protected]>
  • Loading branch information
3 people authored May 6, 2024
1 parent 221910e commit 23c2469
Show file tree
Hide file tree
Showing 13 changed files with 956 additions and 116 deletions.
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.

0 comments on commit 23c2469

Please sign in to comment.