Skip to content

Commit 34bc032

Browse files
Back-end/Middle-1/Database: add questions about normal forms and PSQL transactions (#333)
* Update db.md * Update db.md * Update db.md
1 parent b7750a5 commit 34bc032

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

backend/middle-1/db.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
# Databases for Junior-3
1+
# Databases for Middle-1
22

33
## Questions
44

55
* 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).
612
* What are integrity and consistency?
713
* 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?
921
* What is CAP theorem?
1022
* Does it work in real world?
1123
* What combination of CAP guarantees is not encountered in practice?
@@ -14,6 +26,7 @@
1426
* What are the pros and cons of adding an index?
1527
* What are Views in PostgreSQL?
1628
* What are Sequences in PostgreSQL?
29+
* How sequences may violate ACID?
1730
* What is `VACUUM` operation in PostgreSQL?
1831
* What is the `EXPLAIN` command?
1932
* What do `ANALYZE` and `BUFFERS` add to command?
@@ -32,13 +45,21 @@
3245

3346
### Resources
3447

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)
3553
* CAP theorem
3654
* [CAP теорема доступным языком](https://habr.com/ru/post/130577/)
3755
* [Brewer's CAP Theorem](http://www.julianbrowne.com/article/brewers-cap-theorem)
3856
* [Перевод](https://softwaremaniacs.org/blog/2010/01/31/brewers-cap-theorem/)
3957
* [The CAP Theorem in practice](https://hub.packtpub.com/the-cap-theorem-in-practice-the-consistency-vs-availability-trade-off-in-distributed-databases/)
4058
* Indexes
59+
* [PostgreSQL docs — Indexes](https://www.postgresql.org/docs/13/indexes.html)
4160
* [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.
4262
* `VACUUM`, `EXPLAIN`
63+
* [PostgreSQL docs — Using EXPLAIN](https://www.postgresql.org/docs/13/using-explain.html)
4364
* [Introduction to VACUUM, ANALYZE, EXPLAIN, and COUNT](https://wiki.postgresql.org/wiki/Introduction_to_VACUUM,_ANALYZE,_EXPLAIN,_and_COUNT)
4465
* [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

Comments
 (0)