> For the complete documentation index, see [llms.txt](https://eleven-fifty-academy.gitbook.io/sql-101-basics/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eleven-fifty-academy.gitbook.io/sql-101-basics/part-1-transact-sql/1.9-diagramming-notation.md).

# 1.9: Diagramming Notation

Now that you know how to create and seed tables, it is important to understand how multiple tables work together. Special notation is used to model these relationships. Two common sets of symbols are shown in the table below.<br>

![Relationship Table](https://1712903417-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAU8YgF0bbt1vxBgc5B%2F-LAU8dTUP51jQtyZvnhQ%2F-LAU8qzyKz-Rx8TF-BPt%2F1.9_2.9table.png?generation=1524162329666538\&alt=media)

To understand these relationships, think about an English sentence and how it is structured -- noun, verb, predicate.

* When you consider a relation, identify the two entities first. Take the one-to-many example in the table above. The two entities are **lecturer** and **course**. The entity you start at (**lecturer**) is the "noun" of your sentence.
* Find the connecting line. Is this example, it's easy because there is only one line in the diagram.
* Follow the line to find the entity it connects to (**course**). This the final entity, or the "predicate" of your sentence.
* The symbol that touches your *final entity* is the "verb" of your sentence.
* If any symbol touches the "noun", ignore it.
* Following the sentence structure and using the lecturer-course example, you end up with **lecturer \[0..\*] course** or "One lecturer has zero or many courses," which has been abbreviated to "One lecturer can have many courses."<br>

You can follow the same process going the other direction. This time, start at **course**. This is now your noun. Follow the line to the other entity, which is **lecturer**; this is your new predicate. The symbol touching the predicate is your verb. So, following the sentence structure for this model, you get **course \[1] lecturer** or "A course has one and only one lecturer."<br>

At this point, these two notations may seem interchangeable. However, UML is used for object diagrams, whereas Crow's Foot is used for entity relationship diagramming. This lesson will not go deeper into the differences between these two, but there are plenty of resources available if you'd like to learn more.<br>

* You can read about Crow's Foot notation in more detail by following [this link](http://www.vertabelo.com/blog/technical-articles/crow-s-foot-notation).<br>
* To read more about UML, including composition and aggregation, visit [this site](https://www.visual-paradigm.com/guide/uml-unified-modeling-language/uml-aggregation-vs-composition).

For now, use what you've learned to complete the challenges below. Instead of writing SQL scripts, you'll be drawing diagrams and filling in the blanks to model several relationships. Make sure to use **both** UML and Crow's Foot notation.<br>

![Challenge Table](https://1712903417-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAU8YgF0bbt1vxBgc5B%2F-LAU8dTUP51jQtyZvnhQ%2F-LAU8r6GDTTRlrG-3yxu%2F1.9_2.9challenge.png?generation=1524162329658120\&alt=media)

Click on [1.12 Solutions](/sql-101-basics/part-1-transact-sql/1.12-solutions.md#19-diagramming-notation-solution) to see the solution for this challenge. Then, continue to [Part 1.10: Foreign Keys](/sql-101-basics/part-1-transact-sql/1.10-foreign-keys.md).
