From 30bb68049ba8201cc751f99bd7061e7377eb11db Mon Sep 17 00:00:00 2001 From: Kirill shcherbakov Date: Thu, 26 Dec 2024 15:59:07 +0200 Subject: [PATCH 1/4] feat: add junior-2 and junior-3 program --- .../node.js/junior-1/databases/PostgreSQL.md | 45 +++++++++---------- backend/node.js/junior-2/README.md | 6 +++ backend/node.js/junior-2/databases/sql.md | 24 ++++++++++ .../junior-2/tests/intergation-tests.md | 18 ++++++++ backend/node.js/junior-3/README.md | 8 ++++ backend/node.js/junior-3/databases/nosql.md | 10 +++++ backend/node.js/junior-3/databases/sql.md | 22 +++++++++ backend/node.js/junior-3/ts/ts.md | 21 +++++++++ 8 files changed, 131 insertions(+), 23 deletions(-) create mode 100644 backend/node.js/junior-2/README.md create mode 100644 backend/node.js/junior-2/databases/sql.md create mode 100644 backend/node.js/junior-2/tests/intergation-tests.md create mode 100644 backend/node.js/junior-3/README.md create mode 100644 backend/node.js/junior-3/databases/nosql.md create mode 100644 backend/node.js/junior-3/databases/sql.md create mode 100644 backend/node.js/junior-3/ts/ts.md diff --git a/backend/node.js/junior-1/databases/PostgreSQL.md b/backend/node.js/junior-1/databases/PostgreSQL.md index a90c1415..ed6fc445 100644 --- a/backend/node.js/junior-1/databases/PostgreSQL.md +++ b/backend/node.js/junior-1/databases/PostgreSQL.md @@ -1,28 +1,27 @@ # PostgreSQL -* What is PostreSQL? -* What are the basic most commonly used types? -* What are domains? How to create a domain? How to create custom type? Enum type? -* What is constraint? -* How to use this constraints? - * Primary Key - * Foreign Key - * Unique - * Not Null -* How to use transactions in sql? -* How to create dump? -* How to restore dump? -* What is a View table? - * How to create it? - * How to update it? - * What is materialized views? - +- What is PostgreSQL? +- What are the basic most commonly used types? +- What are domains? How to create a domain? How to create custom type? Enum type? +- What is constraint? +- How to use this constraints? + - Primary Key + - Foreign Key + - Unique + - Not Null +- How to use transactions in sql? +- How to create dump? +- How to restore dump? +- What is a View table? + - How to create it? + - How to update it? + - What is materialized views? ### Resources -* [Postgresql documentation: Chapter 8. Data Types](https://www.postgresql.org/docs/current/datatype.html) -* [A Look at PostgreSQL User-defined Data Types](https://neon.tech/postgresql/postgresql-tutorial/postgresql-user-defined-data-types) -* [PostgreSQL enum](https://neon.tech/postgresql/postgresql-tutorial/postgresql-enum) -* [Postgres Constraints for Newbies](https://www.crunchydata.com/blog/postgres-constraints-for-newbies) -* [PostgreSQL Transaction](https://neon.tech/postgresql/postgresql-tutorial/postgresql-transaction) -* [PostgreSQL Views](https://neon.tech/postgresql/postgresql-views) +- [Postgresql documentation: Chapter 8. Data Types](https://www.postgresql.org/docs/current/datatype.html) +- [A Look at PostgreSQL User-defined Data Types](https://neon.tech/postgresql/postgresql-tutorial/postgresql-user-defined-data-types) +- [PostgreSQL enum](https://neon.tech/postgresql/postgresql-tutorial/postgresql-enum) +- [Postgres Constraints for Newbies](https://www.crunchydata.com/blog/postgres-constraints-for-newbies) +- [PostgreSQL Transaction](https://neon.tech/postgresql/postgresql-tutorial/postgresql-transaction) +- [PostgreSQL Views](https://neon.tech/postgresql/postgresql-views) diff --git a/backend/node.js/junior-2/README.md b/backend/node.js/junior-2/README.md new file mode 100644 index 00000000..2b58a230 --- /dev/null +++ b/backend/node.js/junior-2/README.md @@ -0,0 +1,6 @@ +# Node.js Junior 2 level + +- [Docker](../../shared/junior-2/docker.md) +- [Linux](../../shared/junior-2/linux.md) +- [SQL](./databases/sql.md) +- [Integration Tests](./tests/intergation-tests.md) diff --git a/backend/node.js/junior-2/databases/sql.md b/backend/node.js/junior-2/databases/sql.md new file mode 100644 index 00000000..b9f8abe4 --- /dev/null +++ b/backend/node.js/junior-2/databases/sql.md @@ -0,0 +1,24 @@ +# Junior-2 Sql level + +##### `The Postgresql DBMS dialect` + +- What is an `ORDER BY` and what is it used for? +- What types of `ORDER BY` sorting exist? +- What is the `LIMIT`? +- What is the `OFFSET`? +- Give an example of how `LIMIT` and `OFFSET` can be used. + +### Tasks + +- Write an sql script that will pick up all users and sort them by id and creation time (descending sort), the script should pick up only 5 users. Table schema: + +``` + user table + ________________________________ +| id | email | created_at | name | +``` + +### Resources + +- [Postgresql documentation: Order by](https://www.postgresql.org/docs/current/queries-order.html) +- [Postgresql documentation: Take and limit](https://www.postgresql.org/docs/current/queries-limit.html) diff --git a/backend/node.js/junior-2/tests/intergation-tests.md b/backend/node.js/junior-2/tests/intergation-tests.md new file mode 100644 index 00000000..90ed18ca --- /dev/null +++ b/backend/node.js/junior-2/tests/intergation-tests.md @@ -0,0 +1,18 @@ +# Basics and terminology: + +- What is integration testing and how does it differ from unit testing? +- Which components are usually tested in an integration test? +- What are the advantages and disadvantages of integration testing? +- What tools do you know for conducting integration testing in Node.js ? +- What is the complexity of integration testing compared to unit testing? + +### Recommendations + +- It is best to raise a separate database that is designed specifically for testing (for example, raise the database via docker) + +### Resources + +- [Jest documentation](https://jestjs.io/docs) +- [Jest documentation: Getting started](https://jestjs.io/docs/getting-started) +- [Integration testing](https://en.wikipedia.org/wiki/Integration_testing) +- [Cypress](https://www.cypress.io) diff --git a/backend/node.js/junior-3/README.md b/backend/node.js/junior-3/README.md new file mode 100644 index 00000000..3715d9d2 --- /dev/null +++ b/backend/node.js/junior-3/README.md @@ -0,0 +1,8 @@ +# Node.js Junior 3 level + +- [Design Principles](../../../shared/junior-3/basicCodingAndDesignPrinciples.md) +- [Git](../../../shared/junior-3/git.md) +- [Testing](../../../shared/junior-3/testing.md) +- [Typescript](./ts/ts.md) +- [SQL](./databases/sql.md) +- [NoSql](./databases/nosql.md) diff --git a/backend/node.js/junior-3/databases/nosql.md b/backend/node.js/junior-3/databases/nosql.md new file mode 100644 index 00000000..cfe36c77 --- /dev/null +++ b/backend/node.js/junior-3/databases/nosql.md @@ -0,0 +1,10 @@ +# Junior-3 level Not only Sql + +- `BASE`, what is it? +- What kind of in-memory database do you know and what can it be used for? + +### Resources + +- [BASE](https://www.lifewire.com/abandoning-acid-in-favor-of-base-1019674) +- [Redis documentation](https://master--redis-doc.netlify.app/docs/) +- [Dev: Caching](https://dev.to/aseemwangoo/using-redis-for-caching-2022-2og5?ysclid=m55dcpi0cw300594505) diff --git a/backend/node.js/junior-3/databases/sql.md b/backend/node.js/junior-3/databases/sql.md new file mode 100644 index 00000000..768f6ef0 --- /dev/null +++ b/backend/node.js/junior-3/databases/sql.md @@ -0,0 +1,22 @@ +# Junior-3 level Sql + +##### `The Postgresql DBMS dialect` + +- What are `aggregation functions`? +- What are the `aggregation functions` for? +- What does each of these `aggregation functions` do? `COUNT`, `MIN`, `MAX`, `AVG`, `ARRAY_AGG`, `JSON_AGG`, `JSON_ARRAYAGG`, `SUM`, `XMLAGG` +- What is the `GROUP BY`? +- What is the `HAVING`? +- Give an example of how `LIMIT` and `OFFSET` can be used. +- What is the `JSONB`? +- Which data structure might `JSONB` be suitable for? + +- `ACID`, what is it? + +### Resources + +- [Postgresql documentation: Aggregate functions](https://www.postgresql.org/docs/current/functions-aggregate.html) +- [Dev: Aggregate functions](https://dev.to/timescale/how-postgresql-aggregation-works-and-how-it-inspired-our-hyperfunctions-design-33k6?ysclid=m55b6zmvxm400507156) +- [Postgresql documentation: JSONB](https://www.postgresql.org/docs/current/datatype-json.html) +- [ACID](https://en.wikipedia.org/wiki/ACID) +- [Dev: ACID](https://dev.to/karimerrahli/acid-in-database-systems-11ih?ysclid=m55d6li2ol351610386) diff --git a/backend/node.js/junior-3/ts/ts.md b/backend/node.js/junior-3/ts/ts.md new file mode 100644 index 00000000..87be3b2d --- /dev/null +++ b/backend/node.js/junior-3/ts/ts.md @@ -0,0 +1,21 @@ +# Typescript + +- What is metadata in typescript? +- Where can I use metadata? +- Which library would you use for metadata? +- What is a property descriptor? +- What types of decorators are there? +- What is function overloading? +- What properties do I need to include in tsconfig in order for the decorators to work? +- What are alias paths for in typescript? + +### Task + +- Write a decorator that will collect dependency data in the constructor. +- Write a decorator that, when a class method is instantiated, outputs a message with the class name to the console. + +### Resources + +- [Official documentation: decorators](https://www.typescriptlang.org/docs/handbook/decorators.html) +- [Reflect metadata](https://techsparx.com/nodejs/typescript/decorators/reflection.html) +- [Dev: functions overload](https://dev.to/logrocket/implementing-function-overloading-in-typescript-2o7j?ysclid=m55bql87gj305756575) From 07a1f0ad3903ec7709ff78ebf4d5227b4a293326 Mon Sep 17 00:00:00 2001 From: Kirill shcherbakov Date: Sat, 28 Dec 2024 09:52:00 +0200 Subject: [PATCH 2/4] feat: add self join --- backend/node.js/README.md | 5 ++++- backend/node.js/junior-3/databases/sql.md | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/node.js/README.md b/backend/node.js/README.md index 8015e78e..8c136e6b 100644 --- a/backend/node.js/README.md +++ b/backend/node.js/README.md @@ -1,7 +1,10 @@ # Список уровней: - **Junior:** - * [junior-1](./junior-1/README.md) + + - [junior-1](./junior-1/README.md) + - [junior-2](./junior-2/) + - [junior-3](./junior-3/README.md) - **Middle** diff --git a/backend/node.js/junior-3/databases/sql.md b/backend/node.js/junior-3/databases/sql.md index 768f6ef0..9a5bd2ea 100644 --- a/backend/node.js/junior-3/databases/sql.md +++ b/backend/node.js/junior-3/databases/sql.md @@ -10,6 +10,7 @@ - Give an example of how `LIMIT` and `OFFSET` can be used. - What is the `JSONB`? - Which data structure might `JSONB` be suitable for? +- What is the `SELF JOIN`? - `ACID`, what is it? From 8e25501812dc06bc6be61b3f144ca137a7df6abc Mon Sep 17 00:00:00 2001 From: Kirill shcherbakov Date: Sat, 28 Dec 2024 11:19:53 +0200 Subject: [PATCH 3/4] feat: add patterns to program --- backend/node.js/junior-3/README.md | 1 + backend/node.js/junior-3/patterns/patterns.md | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 backend/node.js/junior-3/patterns/patterns.md diff --git a/backend/node.js/junior-3/README.md b/backend/node.js/junior-3/README.md index 3715d9d2..d736999f 100644 --- a/backend/node.js/junior-3/README.md +++ b/backend/node.js/junior-3/README.md @@ -6,3 +6,4 @@ - [Typescript](./ts/ts.md) - [SQL](./databases/sql.md) - [NoSql](./databases/nosql.md) +- [Patterns](./patterns/patterns.md) diff --git a/backend/node.js/junior-3/patterns/patterns.md b/backend/node.js/junior-3/patterns/patterns.md new file mode 100644 index 00000000..465d72fa --- /dev/null +++ b/backend/node.js/junior-3/patterns/patterns.md @@ -0,0 +1,9 @@ +# Junior-3 level Patterns + +- What is `MVC`? +- What is `MVVM`? + +### Resources + +- [MVC pattern](https://doka-guide.vercel.app/tools/architecture-mvc/) +- [MVVM pattern](https://dev.to/nhannguyendevjs/basic-mvvm-architecture-in-javascript-with-knockoutjs-14nk?ysclid=m57ynnexqh42409593) From 07d7b8f20b64a67ace09bf1c4d3e84dbf762d61e Mon Sep 17 00:00:00 2001 From: Kirill shcherbakov Date: Sat, 28 Dec 2024 15:30:21 +0200 Subject: [PATCH 4/4] fix: add topics --- backend/node.js/junior-2/databases/sql.md | 5 ++++ backend/node.js/junior-3/databases/sql.md | 31 +++++++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/backend/node.js/junior-2/databases/sql.md b/backend/node.js/junior-2/databases/sql.md index b9f8abe4..e01887ec 100644 --- a/backend/node.js/junior-2/databases/sql.md +++ b/backend/node.js/junior-2/databases/sql.md @@ -2,8 +2,13 @@ ##### `The Postgresql DBMS dialect` +- ###### `ORDER BY` + - What is an `ORDER BY` and what is it used for? - What types of `ORDER BY` sorting exist? + +- ###### `LIMIT and OFFSET` + - What is the `LIMIT`? - What is the `OFFSET`? - Give an example of how `LIMIT` and `OFFSET` can be used. diff --git a/backend/node.js/junior-3/databases/sql.md b/backend/node.js/junior-3/databases/sql.md index 9a5bd2ea..e383b6fd 100644 --- a/backend/node.js/junior-3/databases/sql.md +++ b/backend/node.js/junior-3/databases/sql.md @@ -2,17 +2,26 @@ ##### `The Postgresql DBMS dialect` -- What are `aggregation functions`? -- What are the `aggregation functions` for? -- What does each of these `aggregation functions` do? `COUNT`, `MIN`, `MAX`, `AVG`, `ARRAY_AGG`, `JSON_AGG`, `JSON_ARRAYAGG`, `SUM`, `XMLAGG` -- What is the `GROUP BY`? -- What is the `HAVING`? -- Give an example of how `LIMIT` and `OFFSET` can be used. -- What is the `JSONB`? -- Which data structure might `JSONB` be suitable for? -- What is the `SELF JOIN`? - -- `ACID`, what is it? +- ###### `aggregation functions` + +* What are `aggregation functions`? +* What are the `aggregation functions` for? +* What does each of these `aggregation functions` do? `COUNT`, `MIN`, `MAX`, `AVG`, `ARRAY_AGG`, `JSON_AGG`, `JSON_ARRAYAGG`, `SUM`, `XMLAGG` +* What is the `GROUP BY`? +* What is the `HAVING`? + +- ###### `JSON structure in database` + +* What is the `JSONB`? +* Which data structure might `JSONB` be suitable for? + +- ###### `JOIN` + +* What is the `SELF JOIN`? + +- ###### `General` + +* `ACID`, what is it? ### Resources