# Mastering Rell · Learn Chromia

> This masterclass goes deep into the core ideas behind Rell. Because Rell is grounded in SQL, you write more efficient code once you understand how each Rell…

Source: https://chromia.com/learn/rell-masterclass/introduction/

Mastering RellLesson 1 of 8

1. [01Mastering Rell](https://chromia.com/learn/rell-masterclass/introduction/)
2. [02Comparing SQL tables and Rell entities](https://chromia.com/learn/rell-masterclass/entities/)
3. [03Code optimization example](https://chromia.com/learn/rell-masterclass/example/)
4. [04Keys and indexes](https://chromia.com/learn/rell-masterclass/indexes/)
5. [05INNER JOIN statement](https://chromia.com/learn/rell-masterclass/join/)
6. [06SELECT statement](https://chromia.com/learn/rell-masterclass/select/)
7. [07Subqueries](https://chromia.com/learn/rell-masterclass/sub-queries/)
8. [08UPDATE statement](https://chromia.com/learn/rell-masterclass/update/)

[Learn](https://chromia.com/learn/)[Mastering Rell](https://chromia.com/learn/rell-masterclass/)

01 / 08

# Mastering Rell

This masterclass goes deep into the core ideas behind Rell. Because Rell is grounded in SQL, you write more efficient code once you understand how each Rell entity maps onto an SQL table.

You begin by declaring entities and the relationships between them. Next, you see how those declarations become SQL statements and concrete tables in the database.

After that, you learn to build joins in Rell. Hands-on examples, many based on NFT models, show how to make your queries faster.

Want to see exactly what Rell sends to the database? Pass the `--sql-log` flag to commands like [chr test](https://docs.chromia.com/build/cli/commands/test/), [chr repl](https://docs.chromia.com/build/cli/commands/repl/), or [chr node start](https://docs.chromia.com/build/cli/commands/node/).

note

You need the [Chromia CLI tool](https://docs.chromia.com/build/cli/commands/) on your machine to run the commands shown throughout the course.

### Related materials

The course draws on the documentation listed below. Consult it whenever you want more background on a concept or technique:

| Section | Type | Documentation |
| --- | --- | --- |
| Rell | Entity | [Entity](https://docs.chromia.com/rell/language-features/modules/entity) |
| CLI | Installation | [Install CLI](https://docs.chromia.com/get-started/installation/) |
| CLI | Commands | [CLI Commands](https://docs.chromia.com/build/cli/commands/) |
| Rell | Language features | [Operations](https://docs.chromia.com/rell/language-features/modules/operation) |
| Rell | Language features | [Inner Join](https://docs.chromia.com/rell/language-features/database/overview#inner-join) |
| Rell | Language features | [Struct](https://docs.chromia.com/rell/language-features/modules/struct) |
| Rell | Language features | [Query](https://docs.chromia.com/rell/language-features/modules/query) |
| Rell | Language features | [Enum](https://docs.chromia.com/rell/language-features/modules/enum) |
| Rell | Language features | [Function](https://docs.chromia.com/rell/language-features/modules/function) |

## Repository link

You can find all of the course code in the [Rell masterclass repository](https://bitbucket.org/chromawallet/masterclass).

Written for this site from Chromia’s public course. Code samples are the course’s own.

[← Course**Mastering Rell**](https://chromia.com/learn/rell-masterclass/)[Next →**Comparing SQL tables and Rell entities**](https://chromia.com/learn/rell-masterclass/entities/)

On this page

* [Repository link](#repository-link)
