|
1 | | -# Databases for Junior-3 |
| 1 | +# Databases for Middle-1 |
2 | 2 |
|
3 | 3 | ## Questions |
4 | 4 |
|
5 | 5 | * What are base operations for relations? |
| 6 | +* What is projection? |
| 7 | +* Database normalization: |
| 8 | + * What is the main idea behind the normalization process? |
| 9 | + * What are the conditions for 1NF, 2NF, 3NF? |
| 10 | + * What are the general transformations that help us achieve the normal forms? |
| 11 | + * Normalize this table: [link](https://docs.google.com/spreadsheets/d/11DWWljndtwVSyRbYgKTbDXTnwM1E5ZiLrxwQdGvXm_8/edit?usp=sharing) (use `File->Make a copy` to get an editable copy). |
6 | 12 | * What are integrity and consistency? |
7 | 13 | * What is ACID? |
8 | | -* What is projection? |
| 14 | +* Transactions in PostgreSQL: |
| 15 | + * What is the general idea behind their implementation? (Describe MVCC) |
| 16 | + * Violations of isolation: dirty read, non-repeatable read, phantom read, serialization anomaly. What is their meaning? |
| 17 | + * Isolation levels: Read Uncommited, Read Committed, Repeatable Read, Serializable. What anomalies are allowed to happen under these levels? |
| 18 | + * What levels can trigger a serialization failure? How to handle it? |
| 19 | + * What happens when a query is run outside of any transaction? |
| 20 | + * Is it possible to nest transactions? |
9 | 21 | * What is CAP theorem? |
10 | 22 | * Does it work in real world? |
11 | 23 | * What combination of CAP guarantees is not encountered in practice? |
|
14 | 26 | * What are the pros and cons of adding an index? |
15 | 27 | * What are Views in PostgreSQL? |
16 | 28 | * What are Sequences in PostgreSQL? |
| 29 | + * How sequences may violate ACID? |
17 | 30 | * What is `VACUUM` operation in PostgreSQL? |
18 | 31 | * What is the `EXPLAIN` command? |
19 | 32 | * What do `ANALYZE` and `BUFFERS` add to command? |
|
32 | 45 |
|
33 | 46 | ### Resources |
34 | 47 |
|
| 48 | +* Database normalization: |
| 49 | + * [Database Normalization – in Easy to Understand English](https://www.essentialsql.com/database-normalization/) |
| 50 | + * [What is Normalization in DBMS](https://www.guru99.com/database-normalization.html) |
| 51 | + * [What does 1NF actually mean?](https://www.cargocultcode.com/what-does-first-normal-form-mean/) |
| 52 | +* [PostgreSQL docs — Transaction isolation](https://www.postgresql.org/docs/13/transaction-iso.html) |
35 | 53 | * CAP theorem |
36 | 54 | * [CAP теорема доступным языком](https://habr.com/ru/post/130577/) |
37 | 55 | * [Brewer's CAP Theorem](http://www.julianbrowne.com/article/brewers-cap-theorem) |
38 | 56 | * [Перевод](https://softwaremaniacs.org/blog/2010/01/31/brewers-cap-theorem/) |
39 | 57 | * [The CAP Theorem in practice](https://hub.packtpub.com/the-cap-theorem-in-practice-the-consistency-vs-availability-trade-off-in-distributed-databases/) |
40 | 58 | * Indexes |
| 59 | + * [PostgreSQL docs — Indexes](https://www.postgresql.org/docs/13/indexes.html) |
41 | 60 | * [Index types](https://thoughtbot.com/blog/postgres-index-types) |
| 61 | + * Note: with regards to the hash index, this article talks about an older version of PostgreSQL ([no newer than 9.6](https://www.postgresql.org/docs/9.6/indexes-types.html)), while in more recent ones ([starting from 10](https://www.postgresql.org/docs/10/hash-intro.html)), its problems have been solved, and now it's "fully crash recoverable", and thus are completely safe to use. |
42 | 62 | * `VACUUM`, `EXPLAIN` |
| 63 | + * [PostgreSQL docs — Using EXPLAIN](https://www.postgresql.org/docs/13/using-explain.html) |
43 | 64 | * [Introduction to VACUUM, ANALYZE, EXPLAIN, and COUNT](https://wiki.postgresql.org/wiki/Introduction_to_VACUUM,_ANALYZE,_EXPLAIN,_and_COUNT) |
44 | 65 | * [Explaining the unexplainable](https://www.depesz.com/2013/04/16/explaining-the-unexplainable/), [part 2](https://www.depesz.com/2013/04/27/explaining-the-unexplainable-part-2/), [part 3](https://www.depesz.com/2013/05/09/explaining-the-unexplainable-part-3/), [part 4](https://www.depesz.com/2013/05/19/explaining-the-unexplainable-part-4/) |
0 commit comments