User Tools

Site Tools


en:web_development:databases:joins

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:web_development:databases:joins [2021/12/23 07:42]
mag created
en:web_development:databases:joins [2023/08/16 09:33] (current)
Line 19: Line 19:
 | Scarlet Witch | Hero | 1964 | Magic | NULL | NULL | NULL | NULL | | Scarlet Witch | Hero | 1964 | Magic | NULL | NULL | NULL | NULL |
  
-  * <html>NULL</hmtl> means 'no information' and we'd read this to mean 'false' when we interpret the results.+  * <html>NULL</html> means 'no information' and we'd read this to mean 'false' when we interpret the results.
  
 ==== Multiple Tables ==== ==== Multiple Tables ====
Line 43: Line 43:
   * Let's take a look at the second. Click on the table called 'appearances' in the left pane of PHPMyAdmin.   * Let's take a look at the second. Click on the table called 'appearances' in the left pane of PHPMyAdmin.
   * Here we see a table with a list of hero/movie pairs.   * Here we see a table with a list of hero/movie pairs.
 +
 +==== Unique Index ====
 +
   * Remember that every table must have a unique index. But in this list, Iron Man and Loki both appear more than once in 'character_name' and 'The Avengers' appears five times in 'movie', so neither is appropriate for our primary index.   * Remember that every table must have a unique index. But in this list, Iron Man and Loki both appear more than once in 'character_name' and 'The Avengers' appears five times in 'movie', so neither is appropriate for our primary index.
   * Instead, we create a new field that will be unique. By custom, we call it 'id'.   * Instead, we create a new field that will be unique. By custom, we call it 'id'.
en/web_development/databases/joins.1640274165.txt.gz · Last modified: 2023/08/16 09:33 (external edit)